Skip to content

Commit

Permalink
Merge pull request amber-smalltalk#225 from herby/gh-224
Browse files Browse the repository at this point in the history
Copy inherited methods first, methods last. Fix #224.
  • Loading branch information
NicolasPetton committed Jun 13, 2012
2 parents 827e5b6 + bb0c62c commit 4a95f86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,11 @@ function Smalltalk(){

st.methods = function(klass) {
var methods = {};
var copyFrom = klass.fn.prototype.methods;
var copyFrom = klass.fn.prototype.inheritedMethods;
for(var i=0, k=Object.keys(copyFrom), l=k.length; i<l; ++i) {
methods[k[i]] = copyFrom[k[i]];
}
copyFrom = klass.fn.prototype.inheritedMethods;
copyFrom = klass.fn.prototype.methods;
for(var i=0, k=Object.keys(copyFrom), l=k.length; i<l; ++i) {
methods[k[i]] = copyFrom[k[i]];
}
Expand Down

0 comments on commit 4a95f86

Please sign in to comment.