From: Robert Dober Date: 2006-09-28T05:47:47+09:00 Subject: Re: How to copy a method from one class to another ------=_Part_39574_29383197.1159390064413 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline > > > > So I thaught somebody might come up with a definition, but no :( Wikipedia tells us first class objects are - being expressible as an anonymous literal value - being storable in variables - being storable in data structures - having an intrinsic identity (independent of any given name) - being comparable for equality with other entities - being passable as a parameter to a procedure/function - being returnable as the result of a procedure/function - being constructable at runtime http://en.wikipedia.org/wiki/First-class_object I would define Ruby Methods as first class objects as they meet *all* the conditions above Object.instance_method(:send) == Object.instance_method(:send) ==> true, Trans what was that object_id thing about? I hope you all agree that strings are first class objects and of course "a"=="a" ==> true but "a".object_id == "a".object_id ==> false. Nobody gonna talk me out of it anymore, Ruby's methods are 1st class (not buisness class or ecconomie class, no Sir) First Class :) Cheers Robert Any argument would lead back to "is object_id identity aequivalent to object identity", hopefully we can spare this. R. > -- > > ------=_Part_39574_29383197.1159390064413--