[MacRuby-devel] [macruby] #13: dispatcher goes into infinite loop, crashes rather than throwing NoMethodError
macruby
ruby-noreply at macosforge.org
Thu Aug 21 18:55:31 PDT 2008
#13: dispatcher goes into infinite loop, crashes rather than throwing
NoMethodError
---------------------------------+------------------------------------------
Reporter: jean_pierre at mac.com | Owner: lsansonetti at apple.com
Type: defect | Status: closed
Priority: blocker | Milestone: MacRuby 0.3
Component: MacRuby | Resolution: fixed
Keywords: |
---------------------------------+------------------------------------------
Changes (by lsansonetti at apple.com):
* status: new => closed
* resolution: => fixed
* milestone: MacRuby 1.0 => MacRuby 0.3
Comment:
Fixed in trunk.
{{{
$ cat /tmp/t.rb
class Giant
def name
@name
end
def setName(name)
@name = name
end
end
g = Giant.new
g.name = 'Fasolt'
$ macruby /tmp/t.rb
/tmp/t.rb:11:in `<main>': undefined method `name=' for #<Giant:0x28a11f0>
(NoMethodError)
}}}
The foo=: shortcut only works if setFoo: is a real Objective-C method. It
does not work if setFoo: is implemented in Ruby to not cause confusion, if
one defines both foo=: and setFoo:, as these are 2 different methods.
--
Ticket URL: <http://www.macruby.org/trac/ticket/13#comment:2>
macruby <http://macruby.org/>
More information about the MacRuby-devel
mailing list