Has ruby been unwatted? :)


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
=> nil
(irb):1: stack level too deep (SystemStackError)

has ruby been unwatted? :slight_smile:


Works fine in 1.8.7 but is borked in 1.9.2

On Mon, Mar 26, 2012 at 7:57 AM, Siddharth Venkatesan
<[email protected]



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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs