From: Hugh Sasse Staff Elec Eng Date: 2001-08-01T21:13:18+09:00 Subject: [ruby-talk:18954] Re: newbie autovivification On Wed, 1 Aug 2001, Nat Pryce wrote: > > > Please add this cool Python stuff to Ruby. > > > > > > If 25 < foo < 75 : print "middle" > > > > This would be nice, but it requires hacking the parser, which (as far as > > I understand) is already a complex beast. At least "25 < x < 75" raises an > > exception in Ruby. It doesn't silently give the wrong answer (as in C). > > And you can use a range: > > print "middle" if 25..75 === foo > > I wrote about this a while ago. See: http://www.eng.cse.dmu.ac.uk/~hgs/ruby/comparisons.html > Hugh hgs@dmu.ac.uk