Browse Source

"Smalltalk globals" returning self, for future compatibility

Herbert Vojčík 10 years ago
parent
commit
3bec1ef8b1
2 changed files with 21 additions and 0 deletions
  1. 16 0
      js/Kernel-Infrastructure.js
  2. 5 0
      st/Kernel-Infrastructure.st

+ 16 - 0
js/Kernel-Infrastructure.js

@@ -2317,6 +2317,22 @@ referencedClasses: []
 }),
 smalltalk.SmalltalkImage);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "globals",
+protocol: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self;
+}, function($ctx1) {$ctx1.fill(self,"globals",{},smalltalk.SmalltalkImage)})},
+args: [],
+source: "globals\x0a\x09\x22Future compatibility to be able to use Smalltalk globals at: ...\x22\x0a\x09^ self",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.SmalltalkImage);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "includesKey:",

+ 5 - 0
st/Kernel-Infrastructure.st

@@ -798,6 +798,11 @@ current
 	^ self
 !
 
+globals
+	"Future compatibility to be able to use Smalltalk globals at: ..."
+	^ self
+!
+
 includesKey: aKey
 	<return smalltalk.hasOwnProperty(aKey)>
 !