From: Ara.T.Howard@... Date: 2004-11-02T06:43:51+09:00 Subject: Re: Another scrach on head On Tue, 2 Nov 2004, mark sparshatt wrote: > then they'll be surprised when something like > > re = /./ > if re.match("a").true? then > puts "match" > end > > never prints match don't you think would suprise most newbies too? harp:~ > cat a.rb re = /./ if re.match("a") == true puts "match" end harp:~ > ruby a.rb (nothing) i don't think there is anyway around that the fact that newbies must learn that true (in ruby) is a singleton object and that fact can bite you many ways - and this is not limited to only #true? regards. -a -- =============================================================================== | EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov | PHONE :: 303.497.6469 | When you do something, you should burn yourself completely, like a good | bonfire, leaving no trace of yourself. --Shunryu Suzuki ===============================================================================