Browse Source

Small refactors.

Herby Vojčík 6 years ago
parent
commit
88c237441f
3 changed files with 6 additions and 12 deletions
  1. 1 2
      lang/base/kernel-fundamentals.js
  2. 4 9
      lang/src/Kernel-Objects.js
  3. 1 1
      lang/src/Kernel-Objects.st

+ 1 - 2
lang/base/kernel-fundamentals.js

@@ -139,8 +139,7 @@ define(function () {
 
         st.method = function (spec) {
             var that = new SmalltalkMethod();
-            var selector = spec.selector;
-            that.selector = selector;
+            that.selector = spec.selector;
             that.args = spec.args || [];
             that.protocol = spec.protocol;
             that.source = spec.source;

+ 4 - 9
lang/src/Kernel-Objects.js

@@ -450,21 +450,16 @@ selector: "notNil",
 protocol: "testing",
 fn: function (){
 var self=this,$self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return $recv($self._isNil())._not();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"notNil",{})});
-//>>excludeEnd("ctx");
+return true;
+
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "notNil\x0a\x09^ self isNil not",
+source: "notNil\x0a\x09^ true",
 referencedClasses: [],
 //>>excludeEnd("ide");
 pragmas: [],
-messageSends: ["not", "isNil"]
+messageSends: []
 }),
 $globals.ProtoObject);
 

+ 1 - 1
lang/src/Kernel-Objects.st

@@ -146,7 +146,7 @@ isNil
 !
 
 notNil
-	^ self isNil not
+	^ true
 ! !
 
 !ProtoObject class methodsFor: 'initialization'!