From: dblack@... Date: 2003-02-04T08:43:21+09:00 Subject: Re: Designing API strings vs symbols? Hi -- On Tue, 4 Feb 2003, Tom Sawyer wrote: > On Monday 03 February 2003 03:56 pm, Eric Hodel wrote: > > > 'foo bar baz'.intern # => :foo bar baz > > what foolishness is this! A Symbol. > begots! this boggles my mind. is this good and right? what can i call thus? > > class Foo > attr_accessor 'test me'.intern > def initialize > self.send('test me='.intern, 2) > end > end > t = Foo.new > puts t.send('test me'.intern) > > that this works, i find irksome. IRK.... Easy solution: don't do it :-) End of irkage. send lets you get around some of the constraints of the parser, but by the same token (so to speak :-) it can lead to some rather arcane constructs. David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav