1
0
Selaa lähdekoodia

Merge branch 'master' into impCodeGenerator

Nicolas Petton 12 vuotta sitten
vanhempi
commit
5225e2f00b
3 muutettua tiedostoa jossa 4 lisäystä ja 4 poistoa
  1. 1 1
      js/Kernel-Collections.deploy.js
  2. 2 2
      js/Kernel-Collections.js
  3. 1 1
      st/Kernel-Collections.st

+ 1 - 1
js/Kernel-Collections.deploy.js

@@ -1935,7 +1935,7 @@ smalltalk.method({
 selector: "at:ifAbsent:",
 fn: function (anIndex, aBlock) {
 var self=this;
-return String(self)[anIndex - 1] || aBlock();
+return String(self).charAt(anIndex - 1) || aBlock();
 return self;}
 }),
 smalltalk.String);

+ 2 - 2
js/Kernel-Collections.js

@@ -2732,10 +2732,10 @@ selector: "at:ifAbsent:",
 category: 'accessing',
 fn: function (anIndex, aBlock) {
 var self=this;
-return String(self)[anIndex - 1] || aBlock();
+return String(self).charAt(anIndex - 1) || aBlock();
 return self;},
 args: ["anIndex", "aBlock"],
-source: "at: anIndex ifAbsent: aBlock\x0a\x09<return String(self)[anIndex - 1] || aBlock()>",
+source: "at: anIndex ifAbsent: aBlock\x0a\x09<return String(self).charAt(anIndex - 1) || aBlock()>",
 messageSends: [],
 referencedClasses: []
 }),

+ 1 - 1
st/Kernel-Collections.st

@@ -938,7 +938,7 @@ asciiValue
 !
 
 at: anIndex ifAbsent: aBlock
-	<return String(self)[anIndex - 1] || aBlock()>
+	<return String(self).charAt(anIndex - 1) || aBlock()>
 !
 
 escaped