[MacRuby] #901: Segfault occurs when calls super within instance's method that was defined with define_method.
#901: Segfault occurs when calls super within instance's method that was defined with define_method. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby #$ cat t.rb module DefinedSpecs class Superclass def super1 defined? super end define_method(:super2) { defined? super } end class Subclass < Superclass def super1 defined? super end define_method(:super2) { defined? super } end end sup = DefinedSpecs::Superclass.new p sup.class p sup.super1 p sup.super2 sub = DefinedSpecs::Subclass.new p sub.class p sub.super1 p sub.super2 }}} Result: {{{ $ ruby -v t.rb ruby 1.9.1p429 (2010-07-02 revision 28523) [i386-darwin10] DefinedSpecs::Superclass nil nil DefinedSpecs::Subclass "super" "super" $ macruby -v t.rb MacRuby 0.7 (ruby 1.9.2) [universal-darwin10.0, x86_64] DefinedSpecs::Superclass nil zsh: segmentation fault macruby -v t.rb }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/901> MacRuby <http://macruby.org/>
#901: Segfault occurs when calling defined? from super within instance's method that was defined with define_method. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@…): It seems to crash in defined?. -- Ticket URL: <http://www.macruby.org/trac/ticket/901#comment:1> MacRuby <http://macruby.org/>
#901: exception occurs when calling defined?(super) outside method block ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@…): I committed a change as r4511 which now raises an exception when defined?(super) is used outside a method block. We could eventually support that, but later (so I keep the bug open). At least it doesn't crash anymore. -- Ticket URL: <http://www.macruby.org/trac/ticket/901#comment:2> MacRuby <http://macruby.org/>
#901: exception occurs when calling defined?(super) outside method block ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: MacRuby Later Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Changes (by lsansonetti@…): * milestone: => MacRuby Later Comment: For Later. -- Ticket URL: <http://www.macruby.org/trac/ticket/901#comment:3> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby