From: Joel VanderWerf Date: 2007-11-02T15:45:49+09:00 Subject: Re: Create a method with name, containing illegal characters ara.t.howard wrote: > > On Oct 31, 2007, at 9:20 AM, Trans wrote: > >> >> Reminds we, I've thought this notation might be interesting in place >> of send: > >> foo."a-b" > > js does that. i don't think it's worth it though when you can just do > > alias_method '[]', 'send' > > foo['a-b'] > > another alternative is tweaking string > > class String > def /(obj) obj.send self end > end > > 'a-b' / foo > > or similar > > one more char - no hacks. OTOH, foo."a-b" is conservative... -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407