[LRUG] Ruby functions

Anthony Green email at acgreen.co.uk
Thu Oct 29 01:16:37 PDT 2009





On 29/10/2009 07:15, "Simon Sebright" <simonsebright at hotmail.com> wrote:

> First, in irb, we reopened the Fixnum class and added a method double.  Then
> we successfully called 5.double.  Then we looked at 5.methods and it wasn't
> there.  Why is that?  A feature of irb, or is there something more subtle

Are you sure ?

I just did a simple test and it is there.

Try 5.methods.sort to see them in alphabetical order.

Tony





More information about the Chat mailing list