From: "David A. Black" Date: 2005-05-06T02:09:56+09:00 Subject: Re: object reference handle (like perl's reference to scalar) --927295978-1632360211-1115312975=:513 Content-Type: MULTIPART/MIXED; BOUNDARY="927295978-1632360211-1115312975=:513" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --927295978-1632360211-1115312975=:513 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Hi -- On Fri, 6 May 2005, Eric Mahurin wrote: > --- Florian Gro=DF wrote: >> Eric Mahurin wrote: >> >>> Below is what I think is a general purpose solution to >> making >>> references. I provide several ways to do it. Here is an >>> example: >>> >>> a =3D (0..5).to_a -> [0,1,2,3,4,5] >>> w =3D ref{"a[2..4]"} # uses eval >>> x =3D a.ref[2..4] # uses [] and []=3D methods >>> y =3D a.ref("[]","[]=3D",2..4) # specify methods manually >>> z =3D a.ref(["[]",2..4],["[]=3D",2..4]) # unique args to >> get/set >>> [...] >> >> This looks very interesting, if only from the toying >> standpoint. Any >> chance of you pushing this a bit with a RubyForge project and >> a gem release? > > I just registered this under the name "reference". That might be a somewhat confusing or misleading term, since Ruby variables already contain references to objects. Something with 'wrapper' in it, or something, maybe? David --=20 David A. Black dblack@wobblini.net --927295978-1632360211-1115312975=:513-- --927295978-1632360211-1115312975=:513--