[MacRuby] #997: Calling a method removed with rb_undef_method gives an ArgumentError instead of a NoMethodError (was: FIxnum.new gives a strange error on MacRuby)
MacRuby
ruby-noreply at macosforge.org
Wed Jan 5 14:12:14 PST 2011
#997: Calling a method removed with rb_undef_method gives an ArgumentError
instead of a NoMethodError
------------------------------------+---------------------------------------
Reporter: mrada@… | Owner: eloy.de.enige@…
Type: defect | Status: new
Priority: minor | Milestone: MacRuby 1.0
Component: MacRuby | Keywords: #reduction
------------------------------------+---------------------------------------
Comment(by pthomson@…):
This is showing up on all methods undefined with {{{ rb_undef_method }}} -
try NilClass.new, FalseClass.new, TrueClass.new, and so on.
In the VM source it looks like {{{ RoxorCore::undef_method }}} just uses
class_replaceMethod to replace the old method with the {{{
rb_vm_undefined_imp }}} method.
Laurent, since we can't remove methods (I think) with the ObjC runtime,
could we replace the rb_vm_undefined_imp method with one that actually
raises an undefined method exception instead of calling method_missing?
Changing the title to reflect what's really going on.
--
Ticket URL: <http://www.macruby.org/trac/ticket/997#comment:3>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list