2
0
Pārlūkot izejas kodu

Fixed String >> asJSONString

Nicolas Petton 13 gadi atpakaļ
vecāks
revīzija
205b3b1ca4
3 mainītis faili ar 31 papildinājumiem un 0 dzēšanām
  1. 11 0
      js/Kernel-Collections.deploy.js
  2. 16 0
      js/Kernel-Collections.js
  3. 4 0
      st/Kernel-Collections.st

+ 11 - 0
js/Kernel-Collections.deploy.js

@@ -1207,6 +1207,17 @@ return self;}
 }),
 smalltalk.String);
 
+smalltalk.addMethod(
+'_asJSONString',
+smalltalk.method({
+selector: 'asJSONString',
+fn: function (){
+var self=this;
+return self;
+return self;}
+}),
+smalltalk.String);
+
 
 smalltalk.addMethod(
 '_streamClass',

+ 16 - 0
js/Kernel-Collections.js

@@ -1717,6 +1717,22 @@ referencedClasses: []
 }),
 smalltalk.String);
 
+smalltalk.addMethod(
+unescape('_asJSONString'),
+smalltalk.method({
+selector: unescape('asJSONString'),
+category: 'converting',
+fn: function (){
+var self=this;
+return self;
+return self;},
+args: [],
+source: unescape('asJSONString%0A%09%5Eself'),
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.String);
+
 
 smalltalk.addMethod(
 unescape('_streamClass'),

+ 4 - 0
st/Kernel-Collections.st

@@ -450,6 +450,10 @@ reversed
 
 asJavaScriptSelector
 	^(self asSelector replace: '^_' with: '') replace: '_.*' with: ''.
+!
+
+asJSONString
+	^self
 ! !
 
 !String methodsFor: 'copying'!