<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18828"></HEAD>
<BODY style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px"
id=MailContainerBody leftMargin=0 topMargin=0 CanvasTabStop="true"
name="Compose message area">
<DIV><FONT face=Calibri>Hi folks,</FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri>I gave an informal Ruby talk yesterday to some teammates
and we did a bit of hands-on stuff. A couple of things arose which I
couldn't explain; I wonder if someone on this list might be able to
answer.</FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri>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 going on?</FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri>Secondly someone asked if functions were first-class
objects and if you can for example get the code for a function. I rather
think the ruby way is to use blocks as a way to get functions called back.
Or maybe to turn them into a proc object?</FONT></DIV>
<DIV><FONT face=Calibri></FONT> </DIV>
<DIV><FONT face=Calibri>Thanks for any advice,</FONT></DIV>
<DIV><FONT face=Calibri>Simon</FONT></DIV></BODY></HTML>