From: Josh Cheek Date: 2012-03-26T22:37:30+09:00 Subject: Re: has ruby been unwatted? :) --0016e6d975e8acdead04bc257979 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Mar 26, 2012 at 7:57 AM, Siddharth Venkatesan wrote: > Hi, > > 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? :) > > Siddharth > > IRB must be doing something that isn't compatible. Instead of declaring a global method missing, put it on the main object (then you aren't affecting the behaviour of everything else). def self.method_missing(*args); args.join(" "); end --0016e6d975e8acdead04bc257979 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Mon, Mar 26, 2012 at 7:57 AM, Siddharth = Venkatesan <n= eotamizhan@gmail.com> wrote:

Siddharth


IRB must be doing something= that isn't compatible. Instead of declaring a global method missing, p= ut it on the main object (then you aren't affecting the behaviour of ev= erything else).

def self.method_missing(*args); args.join(" "); en= d
--0016e6d975e8acdead04bc257979--