I was recently watching Gary Bernhardt’s “Wat” video. When i tried to
recreate the “method_missing” trick in irb, got the following error…
irb(main):001:0> def method_missing(*args); args.join(" "); end
(irb):1: stack level too deep (SystemStackError)
has ruby been unwatted?
Works fine in 1.8.7 but is borked in 1.9.2
On Mon, Mar 26, 2012 at 7:57 AM, Siddharth Venkatesan
IRB must be doing something that isn’t compatible. Instead of declaring
global method missing, put it on the main object (then you aren’t
the behaviour of everything else).
def self.method_missing(*args); args.join(" "); end