Browse Source

Merge branch 'less-globals' into requirejs

Herbert Vojčík 11 years ago
parent
commit
f79699902f
2 changed files with 3 additions and 1 deletions
  1. 1 1
      bin/amberc.js
  2. 2 0
      test/Test.js

+ 1 - 1
bin/amberc.js

@@ -418,7 +418,7 @@ AmberC.prototype.create_compiler = function(compilerFilesArray) {
 			// data is an array where index 0 is the error code and index 1 contains the data
 			content += data[1];
 		});
-		content = content + 'return smalltalk;})();';
+		content = content + 'return global_smalltalk;})();';
 		self.defaults.smalltalk = eval(content);
 		console.log('Compiler loaded');
 		self.defaults.smalltalk.ErrorHandler._setCurrent_(self.defaults.smalltalk.RethrowErrorHandler._new());

+ 2 - 0
test/Test.js

@@ -1,3 +1,4 @@
+(function(smalltalk,nil,_st){
 smalltalk.addPackage('Test');
 smalltalk.addClass('NodeTestRunner', smalltalk.Object, [], 'Test');
 
@@ -67,3 +68,4 @@ referencedClasses: ["OrderedCollection", "TestCase", "TestSuiteRunner", "ResultA
 smalltalk.NodeTestRunner.klass);
 
 
+})(global_smalltalk,global_nil,global__st);