Project

General

Profile

Actions

Bug #7732

closed

refinements: super() in define_method => stack level too deep (SystemStackError)

Bug #7732: refinements: super() in define_method => stack level too deep (SystemStackError)

Added by sowcow (Alexander K.) almost 13 years ago. Updated almost 13 years ago.

Status:
Rejected
Target version:
-
ruby -v:
ruby 2.0.0dev (2012-12-01 trunk 38126)
Backport:
[ruby-core:51588]

Description

class Any
end

module Bug
refine Any do
define_method :to_s do
super()
end
end
end

using Bug
p Any.new.to_s # stack level too deep (SystemStackError)

other example and workaround solution https://gist.github.com/4603064

Actions

Also available in: PDF Atom