From: Gregory Brown Date: 2007-08-14T02:19:56+09:00 Subject: Re: Prototype (the real thing from Ara) problem. On 8/13/07, Wayne E. Seguin wrote: > On Aug 13, 2007, at 13:05 , ara.t.howard wrote: > > On Aug 12, 2007, at 3:34 PM, Robert Dober wrote: > > > >> after my primitive research and my *very slow* implementation of > >> Prototypes ... > > > > btw - i've learned something since my initial implementation: > > > > obj = Object.new.instance_eval do > > > > @var = 42 > > > > def method > > @var > > end > > > > self > > end > > > > i was quite suprised that it worked - it would be interesting to > > play with that in the context of a prototype impl. > > > > cheers. > > > > a @ http://drawohara.com/ > > What does the self at the end accomplish? it returns the object. See this example: >> a = Object.new.instance_eval { 2 } => 2 >> a => 2 >> a = Object.new.instance_eval { self } => #