|
@@ -204,9 +204,9 @@ define("amber/boot", [ 'require', './browser-compatibility' ], function (require
|
|
methodDict[stSelector] = method;
|
|
methodDict[stSelector] = method;
|
|
methods.push(method);
|
|
methods.push(method);
|
|
manip.installMethod(method, rootAsClass);
|
|
manip.installMethod(method, rootAsClass);
|
|
- targetClasses.forEach(function (target) {
|
|
|
|
- manip.installMethod(method, target);
|
|
|
|
- });
|
|
|
|
|
|
+ targetClasses.forEach(function (target) {
|
|
|
|
+ manip.installMethod(method, target);
|
|
|
|
+ });
|
|
return method;
|
|
return method;
|
|
};
|
|
};
|
|
|
|
|
|
@@ -262,12 +262,12 @@ define("amber/boot", [ 'require', './browser-compatibility' ], function (require
|
|
}
|
|
}
|
|
|
|
|
|
function ManipulationBrik(brikz, st) {
|
|
function ManipulationBrik(brikz, st) {
|
|
- this.installMethod = function (method, klass) {
|
|
|
|
|
|
+ this.installMethod = function (method, klass) {
|
|
Object.defineProperty(klass.fn.prototype, method.jsSelector, {
|
|
Object.defineProperty(klass.fn.prototype, method.jsSelector, {
|
|
value: method.fn,
|
|
value: method.fn,
|
|
enumerable: false, configurable: true, writable: true
|
|
enumerable: false, configurable: true, writable: true
|
|
});
|
|
});
|
|
- }
|
|
|
|
|
|
+ };
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -589,7 +589,7 @@ define("amber/boot", [ 'require', './browser-compatibility' ], function (require
|
|
propagateMethodChange(klass, method);
|
|
propagateMethodChange(klass, method);
|
|
|
|
|
|
var usedSelectors = method.messageSends,
|
|
var usedSelectors = method.messageSends,
|
|
- targetClasses = stInit.initialized() ? st.wrappedClasses() : [];
|
|
|
|
|
|
+ targetClasses = stInit.initialized() ? st.wrappedClasses() : [];
|
|
|
|
|
|
dnu.make(method.selector, targetClasses);
|
|
dnu.make(method.selector, targetClasses);
|
|
|
|
|
|
@@ -752,7 +752,7 @@ define("amber/boot", [ 'require', './browser-compatibility' ], function (require
|
|
/* Boolean assertion */
|
|
/* Boolean assertion */
|
|
st.assert = function(shouldBeBoolean) {
|
|
st.assert = function(shouldBeBoolean) {
|
|
// jshint -W041
|
|
// jshint -W041
|
|
- if (typeof shouldBeBoolean === "boolean") return shouldBeBoolean;
|
|
|
|
|
|
+ if (typeof shouldBeBoolean === "boolean") return shouldBeBoolean;
|
|
else if (shouldBeBoolean != null && typeof shouldBeBoolean === "object" && shouldBeBoolean.klass === globals.Boolean) {
|
|
else if (shouldBeBoolean != null && typeof shouldBeBoolean === "object" && shouldBeBoolean.klass === globals.Boolean) {
|
|
return shouldBeBoolean == true;
|
|
return shouldBeBoolean == true;
|
|
} else {
|
|
} else {
|
|
@@ -933,7 +933,8 @@ define("amber/boot", [ 'require', './browser-compatibility' ], function (require
|
|
};
|
|
};
|
|
|
|
|
|
function pushContext(setup) {
|
|
function pushContext(setup) {
|
|
- return thisContext = new SmalltalkMethodContext(thisContext, setup);
|
|
|
|
|
|
+ thisContext = new SmalltalkMethodContext(thisContext, setup);
|
|
|
|
+ return thisContext;
|
|
}
|
|
}
|
|
|
|
|
|
function popContext(context) {
|
|
function popContext(context) {
|
|
@@ -1098,11 +1099,11 @@ define("amber/boot", [ 'require', './browser-compatibility' ], function (require
|
|
* otherwise unchanged
|
|
* otherwise unchanged
|
|
*/
|
|
*/
|
|
this.asReceiver = function (o) {
|
|
this.asReceiver = function (o) {
|
|
- if (o == null) return nil;
|
|
|
|
- if (typeof o === "object") {
|
|
|
|
- return o.klass != null ? o : globals.JSObjectProxy._on_(o);
|
|
|
|
- }
|
|
|
|
- return o;
|
|
|
|
|
|
+ if (o == null) return nil;
|
|
|
|
+ if (typeof o === "object") {
|
|
|
|
+ return o.klass != null ? o : globals.JSObjectProxy._on_(o);
|
|
|
|
+ }
|
|
|
|
+ return o;
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
|