|  | @@ -127,11 +127,13 @@ category: 'evaluating',
 | 
	
		
			
				|  |  |  fn: function (anObject){
 | 
	
		
			
				|  |  |  var self=this;
 | 
	
		
			
				|  |  |  return smalltalk.withContext(function($ctx1) { 
 | 
	
		
			
				|  |  | -return new self(anObject);
 | 
	
		
			
				|  |  | -return self}, function($ctx1) {$ctx1.fill(self,"newValue:",{anObject:anObject},smalltalk.BlockClosure)})},
 | 
	
		
			
				|  |  | +var $1;
 | 
	
		
			
				|  |  | +$1=_st(self)._newWithValues_([anObject]);
 | 
	
		
			
				|  |  | +return $1;
 | 
	
		
			
				|  |  | +}, function($ctx1) {$ctx1.fill(self,"newValue:",{anObject:anObject},smalltalk.BlockClosure)})},
 | 
	
		
			
				|  |  |  args: ["anObject"],
 | 
	
		
			
				|  |  | -source: "newValue: anObject\x0a\x09\x22Use the receiver as a JS constructor.\x0a\x09*Do not* use this method to instanciate Smalltalk objects!\x22\x0a\x09<return new self(anObject)>",
 | 
	
		
			
				|  |  | -messageSends: [],
 | 
	
		
			
				|  |  | +source: "newValue: anObject\x0a^ self newWithValues: { anObject }",
 | 
	
		
			
				|  |  | +messageSends: ["newWithValues:"],
 | 
	
		
			
				|  |  |  referencedClasses: []
 | 
	
		
			
				|  |  |  }),
 | 
	
		
			
				|  |  |  smalltalk.BlockClosure);
 | 
	
	
		
			
				|  | @@ -143,11 +145,13 @@ category: 'evaluating',
 | 
	
		
			
				|  |  |  fn: function (anObject,anObject2){
 | 
	
		
			
				|  |  |  var self=this;
 | 
	
		
			
				|  |  |  return smalltalk.withContext(function($ctx1) { 
 | 
	
		
			
				|  |  | -return new self(anObject, anObject2);
 | 
	
		
			
				|  |  | -return self}, function($ctx1) {$ctx1.fill(self,"newValue:value:",{anObject:anObject,anObject2:anObject2},smalltalk.BlockClosure)})},
 | 
	
		
			
				|  |  | +var $1;
 | 
	
		
			
				|  |  | +$1=_st(self)._newWithValues_([anObject,anObject2]);
 | 
	
		
			
				|  |  | +return $1;
 | 
	
		
			
				|  |  | +}, function($ctx1) {$ctx1.fill(self,"newValue:value:",{anObject:anObject,anObject2:anObject2},smalltalk.BlockClosure)})},
 | 
	
		
			
				|  |  |  args: ["anObject", "anObject2"],
 | 
	
		
			
				|  |  | -source: "newValue: anObject value: anObject2\x0a\x09\x22Use the receiver as a JS constructor.\x0a\x09*Do not* use this method to instanciate Smalltalk objects!\x22\x0a\x09<return new self(anObject, anObject2)>",
 | 
	
		
			
				|  |  | -messageSends: [],
 | 
	
		
			
				|  |  | +source: "newValue: anObject value: anObject2\x0a^ self newWithValues: { anObject. anObject2 }.",
 | 
	
		
			
				|  |  | +messageSends: ["newWithValues:"],
 | 
	
		
			
				|  |  |  referencedClasses: []
 | 
	
		
			
				|  |  |  }),
 | 
	
		
			
				|  |  |  smalltalk.BlockClosure);
 | 
	
	
		
			
				|  | @@ -159,10 +163,33 @@ category: 'evaluating',
 | 
	
		
			
				|  |  |  fn: function (anObject,anObject2,anObject3){
 | 
	
		
			
				|  |  |  var self=this;
 | 
	
		
			
				|  |  |  return smalltalk.withContext(function($ctx1) { 
 | 
	
		
			
				|  |  | -return new self(anObject, anObject2,anObject3);
 | 
	
		
			
				|  |  | -return self}, function($ctx1) {$ctx1.fill(self,"newValue:value:value:",{anObject:anObject,anObject2:anObject2,anObject3:anObject3},smalltalk.BlockClosure)})},
 | 
	
		
			
				|  |  | +var $1;
 | 
	
		
			
				|  |  | +$1=_st(self)._newWithValues_([anObject,anObject2,anObject3]);
 | 
	
		
			
				|  |  | +return $1;
 | 
	
		
			
				|  |  | +}, function($ctx1) {$ctx1.fill(self,"newValue:value:value:",{anObject:anObject,anObject2:anObject2,anObject3:anObject3},smalltalk.BlockClosure)})},
 | 
	
		
			
				|  |  |  args: ["anObject", "anObject2", "anObject3"],
 | 
	
		
			
				|  |  | -source: "newValue: anObject value: anObject2 value: anObject3\x0a\x09\x22Use the receiver as a JS constructor.\x0a\x09*Do not* use this method to instanciate Smalltalk objects!\x22\x0a\x09<return new self(anObject, anObject2,anObject3)>",
 | 
	
		
			
				|  |  | +source: "newValue: anObject value: anObject2 value: anObject3\x0a^ self newWithValues: { anObject. anObject2. anObject3 }.",
 | 
	
		
			
				|  |  | +messageSends: ["newWithValues:"],
 | 
	
		
			
				|  |  | +referencedClasses: []
 | 
	
		
			
				|  |  | +}),
 | 
	
		
			
				|  |  | +smalltalk.BlockClosure);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +smalltalk.addMethod(
 | 
	
		
			
				|  |  | +smalltalk.method({
 | 
	
		
			
				|  |  | +selector: "newWithValues:",
 | 
	
		
			
				|  |  | +category: 'evaluating',
 | 
	
		
			
				|  |  | +fn: function (aCollection){
 | 
	
		
			
				|  |  | +var self=this;
 | 
	
		
			
				|  |  | +return smalltalk.withContext(function($ctx1) { 
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +var blankObject = function() {};
 | 
	
		
			
				|  |  | +blankObject.prototype = self.prototype;
 | 
	
		
			
				|  |  | +var newObject = new blankObject;
 | 
	
		
			
				|  |  | +var result = self.apply(newObject, aCollection);
 | 
	
		
			
				|  |  | +return typeof result === "object" ? result : newObject;;
 | 
	
		
			
				|  |  | +return self}, function($ctx1) {$ctx1.fill(self,"newWithValues:",{aCollection:aCollection},smalltalk.BlockClosure)})},
 | 
	
		
			
				|  |  | +args: ["aCollection"],
 | 
	
		
			
				|  |  | +source: "newWithValues: aCollection\x0a\x22Answer an object that's been created in JS via `new` and had `self` applied to it.\x0aThis algorithm was inspired by http://stackoverflow.com/a/6069331.\x0a\x0aHere's a general breakdown of what's going on:\x0a1) Create a new, blank function object.\x0a2) Set it's prototype to `self`'s prototype. Remember, we're in a BlockClosure, and presumably this BlockClosure is wrapping a JS function, and also presumably this function is used as a constructor.\x0a3) Instantiate a new version of the function object just created. This forces the interpreter to set the internal [[prototype]] property to what was set on the function before. This has to be done, as we have no access to the [[prototype]] property externally.\x0a4) Apply `self` to the object I just instantiated.\x22\x0a<\x0avar blankObject = function() {};\x0ablankObject.prototype = self.prototype;\x0avar newObject = new blankObject;\x0avar result = self.apply(newObject, aCollection);\x0areturn typeof result === \x22object\x22 ? result : newObject;\x0a>",
 | 
	
		
			
				|  |  |  messageSends: [],
 | 
	
		
			
				|  |  |  referencedClasses: []
 | 
	
		
			
				|  |  |  }),
 |