[MacRuby] #901: Segfault occurs when calls super within instance's method that was defined with define_method.
MacRuby
ruby-noreply at macosforge.org
Mon Sep 13 05:44:51 PDT 2010
#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/>
More information about the macruby-tickets
mailing list