Actions
Bug #10170
closedCore dumped when using recursion in define_method
Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
2.0.0p247, 2.0.0p353,
Backport:
Description
So if we have this
class A
define_method :a do
a
end
end
and call A.new.a
we got SystemStackError
but with alias
class A
define_method :a do
a
end
end
when calling
x=A.new
x.a
in irb or
x=A.new
x.a; x.a
in pry gives
segmentation fault (core dumped)
But ruby -e 'class A; define_method :a do; a; end; end; A.new.a;'
gives segfault randomly
Ubuntu 13.10
Actions
Like0
Like0Like0Like0Like0Like0