From: Sebastian Hungerecker Date: 2007-11-16T01:21:56+09:00 Subject: Re: Struct constructor Wayne Magor wrote: > So how is [] defined in Ruby? Just curious. obj[stuff] is syntactig sugar for obj.[](stuff) and obj[stuff]=otherstuff is syntactic sugar for obj.[]=(stuff,otherstuff). Stuff can be multiple values seperated by commas, otherstuff can't. > It must be a special-case. Not more so than <, >, <=, >=, <<, >>, ~, ^, &, +, +@, -, -@, *, ** and so on. Also all methods ending with a equals sign (where you can write obj.bla = blo instead of obj.bla=(blo)). HTH, Sebastian -- NP: Lake of Tears - Raistlin and the Rose Jabber: sepp2k@jabber.org ICQ: 205544826