Sha256: 30b9931b1d917aebfea521197155bc206460c946f7648d2cf042e107687b3096
Contents?: true
Size: 699 Bytes
Versions: 2
Compression:
Stored size: 699 Bytes
Contents
# Core object in hierarchy. Most of the implementation of this core # object are implemented in {Kernel}. class Object def initialize(*a) # ... end def ==(other) `return self === other;` end def equal?(other) self == other end def __send__(method_id, *args, &block) `var method = self['m$' + method_id]; if ($B.f == arguments.callee) { $B.f = method; } return method.apply(self, args);` end def instance_eval(&block) raise ArgumentError, "block not supplied" unless block_given? `block.call(self);` self end def method_missing(sym, *args) raise NoMethodError, "undefined method `#{sym}` for #{self.inspect}" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
opal-0.3.10 | corelib/object.rb |
opal-0.3.9 | corelib/object.rb |