فهرست منبع

Trivial fix to issue #34.

Göran Krampe 12 سال پیش
والد
کامیت
11969ad4f3
3فایلهای تغییر یافته به همراه5 افزوده شده و 5 حذف شده
  1. 1 1
      js/Kernel.deploy.js
  2. 3 3
      js/Kernel.js
  3. 1 1
      st/Kernel.st

+ 1 - 1
js/Kernel.deploy.js

@@ -5524,7 +5524,7 @@ smalltalk.method({
 selector: 'next:',
 fn: function (anInteger){
 var self=this;
-return smalltalk.send((1), "_to_collect_", [anInteger, (function(each){return smalltalk.send(self, "_next", []);})]);
+return smalltalk.send(smalltalk.send((1), "_to_", [anInteger]), "_collect_", [(function(each){return smalltalk.send(self, "_next", []);})]);
 return self;}
 }),
 smalltalk.Random);

+ 3 - 3
js/Kernel.js

@@ -7867,11 +7867,11 @@ selector: 'next:',
 category: 'accessing',
 fn: function (anInteger){
 var self=this;
-return smalltalk.send((1), "_to_collect_", [anInteger, (function(each){return smalltalk.send(self, "_next", []);})]);
+return smalltalk.send(smalltalk.send((1), "_to_", [anInteger]), "_collect_", [(function(each){return smalltalk.send(self, "_next", []);})]);
 return self;},
 args: ["anInteger"],
-source: unescape('next%3A%20anInteger%0A%20%20%20%20%5E1%20to%3A%20anInteger%20collect%3A%20%5B%3Aeach%20%7C%20self%20next%5D'),
-messageSends: ["to:collect:", "next"],
+source: unescape('next%3A%20anInteger%0A%20%20%20%20%5E%281%20to%3A%20anInteger%29%20collect%3A%20%5B%3Aeach%20%7C%20self%20next%5D'),
+messageSends: ["collect:", "to:", "next"],
 referencedClasses: []
 }),
 smalltalk.Random);

+ 1 - 1
st/Kernel.st

@@ -2747,7 +2747,7 @@ next
 !
 
 next: anInteger
-    ^1 to: anInteger collect: [:each | self next]
+    ^(1 to: anInteger) collect: [:each | self next]
 ! !
 
 Object subclass: #Point