lib/assets/javascripts/opal/runtime.js in opal-0.3.37 vs lib/assets/javascripts/opal/runtime.js in opal-0.3.38

- old
+ new

@@ -140,10 +140,14 @@ constructor._isObject = false; constructor._donate = __donate; constructor._sdonate = __sdonate; + constructor['$==='] = module_eqq; + constructor.$to_s = module_to_s; + constructor.toString = module_to_s; + Opal[id] = constructor; return constructor; }; @@ -167,10 +171,11 @@ constructor._donate = __donate constructor._sdonate = __sdonate; constructor['$==='] = module_eqq; constructor.$to_s = module_to_s; + constructor.toString = module_to_s; var smethods; smethods = superklass._smethods.slice(); @@ -197,10 +202,11 @@ constructor._donate = function(){}; constructor._sdonate = __sdonate; constructor['$==='] = module_eqq; constructor.$to_s = module_to_s; + constructor.toString = module_to_s; var smethods = constructor._smethods = Class._methods.slice(); for (var i = 0, length = smethods.length; i < length; i++) { var m = smethods[i]; constructor[m] = Object[m]; @@ -219,9 +225,16 @@ return constructor; }; Opal.puts = function(a) { console.log(a); }; + + // Method missing dispatcher + Opal.mm = function(mid) { + return function() { + return this.$method_missing.apply(this, [mid].concat(__slice.call(arguments))); + } + }; // Initialization // -------------- boot_defclass('BasicObject', BasicObject)