I tried this code:

http://gist.github.com/585143

but why do i get a: asd.rb:6:in `method_missing': wrong number of
arguments (1 for 0) (ArgumentError) -- when i try to call
method_missing like that?

if i use method_missing(*args) it works, does method_missing requires
that i use an argument?

Thanks

On Fri, Sep 17, 2010 at 2:16 PM, Alex Stahl <astahl / hi5.com> wrote:
> method_missing is a great tool for dynamically adding/handling methods
> which aren't currently part of the object.
>
> I was just reading up on this in the free Ruby Best Practices book
> (check out ch. 3): =A0http://rubybestpractices.com
>
>
>
> On Fri, 2010-09-17 at 12:20 -0500, Rick DeNatale wrote:
>> On Fri, Sep 17, 2010 at 11:55 AM, Diego Viola <diego.viola / gmail.com> wr=
ote:
>> > Nice, so method_missing is called when I call a method that I didn't
>> > defined myself?
>> >
>> > Thanks,
>>
>> It's called when a message is sent to an object which doesn't have a
>> method. =A0If it does it doesn't matter who defined it.
>>
>>
>
>
>
>