On May 29, 2008, at 3:51 PM, Leon Bogaert wrote:

> Hi all,
>
> A quick question: is it possible to monkey patch the Array [] method  
> in
> ruby?
>
> I tried:
>
> class Array
>   def []=(elem)
>     raise 'Yesss... It works!'
>   end
> end



Try [], not []=. They're different methods.