From: Ara.T.Howard@... Date: 2004-09-29T11:14:21+09:00 Subject: Re: Best name for "this method" ? --8323328-118896877-1096423362=:1405 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-118896877-1096423362=:1405" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-118896877-1096423362=:1405 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Wed, 29 Sep 2004, trans. (T. Onoma) wrote: > On Tuesday 28 September 2004 06:24 pm, Ara.T.Howard@noaa.gov wrote: >> probably possible: >> >> =C2=A0 =C2=A0 =C2=A0irb(main):029:0> def method_missing(m,*a,&b);Class = =3D=3D=3D (c =3D >> eval(m.to_s)) ? c::new(*a,&b) : super;end >> =C2=A0 =C2=A0 =C2=A0=3D> nil >> >> =C2=A0 =C2=A0 =C2=A0irb(main):030:0> Range(1,2) >> =C2=A0 =C2=A0 =C2=A0=3D> 1..2 >> >> ?? > > Oooo... me likes. > > Just added to my lib. > > T. it might be dangerous - although i can see why it would be. just pointing = out it can be done easily. generally at this point guy chimes in with somethin= g subversive that could be done by using eval - perhaps something like class Evil def to_s 'system "rm -rf ."' end end Evil() it does look nice though. cheers. -a -- =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D | EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov | PHONE :: 303.497.6469 | A flower falls, even though we love it; | and a weed grows, even though we do not love it.=20 | --Dogen =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D --8323328-118896877-1096423362=:1405-- --8323328-118896877-1096423362=:1405--