[MacRuby-devel] [MacRuby] #122: error in objects initialized with an options hash and KVO (maybe a caching issue in dispatcher)
MacRuby
ruby-noreply at macosforge.org
Wed Sep 3 17:23:35 PDT 2008
#122: error in objects initialized with an options hash and KVO (maybe a caching
issue in dispatcher)
--------------------------------+-------------------------------------------
Reporter: rich at infoether.com | Owner: lsansonetti at apple.com
Type: defect | Status: new
Priority: blocker | Milestone: MacRuby 0.3
Component: MacRuby | Resolution:
Keywords: |
--------------------------------+-------------------------------------------
Comment(by lsansonetti at apple.com):
It's because objects()[0] is not an instance of Foo, but Foo itself (the
class).
{{{
$ cat /tmp/t.rb
class Foo
def initialize(subject, options={})
end
end
p [Foo.new(1, :x => 42, :y => 43), Foo.new(2, :x => 42, :y => 43)]
$ ./miniruby /tmp/t.rb
[Foo, #<Foo:0x1077480>]
$
}}}
Looks definitely like a bad bug in the core :-)
--
Ticket URL: <http://www.macruby.org/trac/ticket/122#comment:2>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list