From: "sowcow (Alexander K.)" Date: 2013-01-23T18:25:31+09:00 Subject: [ruby-core:51588] [ruby-trunk - Bug #7732][Open] refinements: super() in define_method => stack level too deep (SystemStackError) Issue #7732 has been reported by sowcow (Alexander K.). ---------------------------------------- Bug #7732: refinements: super() in define_method => stack level too deep (SystemStackError) https://bugs.ruby-lang.org/issues/7732 Author: sowcow (Alexander K.) Status: Open Priority: Normal Assignee: Category: Target version: ruby -v: ruby 2.0.0dev (2012-12-01 trunk 38126) 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 -- http://bugs.ruby-lang.org/