From: Brian Candler Date: 2010-06-07T04:53:58+09:00 Subject: Re: inject method of Array class Brian Candler wrote: > RichardSchollar wrote: >> I have only just started using Ruby (and am a total noob, in case this >> wasn't obvious ;-)) and was wondering if I type the following into irb >> (for instance) I don't see the "include" method listed: >> >> Array.methods > > You want: Array.instance_methods > > (that is: not methods of the class Array object itself, but methods of > objects which are instances of class Array) Or alternatively you could do: Array.new.methods to create an instance, and then see what methods it has. irb(main):001:0> Array.new.methods.grep(/inject/) => ["inject"] -- Posted via http://www.ruby-forum.com/.