From: Diego Viola Date: 2010-09-18T00:55:37+09:00 Subject: Re: method_missing Nice, so method_missing is called when I call a method that I didn't defined myself? Thanks, Diego On Fri, Sep 17, 2010 at 6:37 AM, Brian Candler wrote: > Diego Viola wrote: >> I've been using Ruby for 2 years or more now, and I am still learning >> this awesome language. But I can't grasp my head about method_missing >> and how it works, can someone please help me understand about how >> method_missing works? > > class Foo >  def bar(*args) >    puts "You called bar with #{args.inspect}" >  end >  def method_missing(*args) >    puts "method_missing with #{args.inspect}" >  end > end > > f = Foo.new > f.bar(1,2,3) > f.wibble(4,5,6) > -- > Posted via http://www.ruby-forum.com/. > >