From: David Flanagan Date: 2007-09-11T14:05:29+09:00 Subject: Re: integer range literals in conditionals with -e option Nobuyoshi Nakada wrote: >> Anyone know what the history and current status of this is? Is the code >> in parse.y vestigal, or is a regresson that this feature stopped >> working in 1.8? > > > # I'm surprised that nobody noticed it over 2 years. > > I thought of these alternatives: > > a) delay the transformation of NODE_DOT till conditional > expressions take place (the following patch) > > b) use Range#=== (as you thought), but this would alter the > semantics and make some inconsistency > > c) eliminate the feature. > My opinion is that if this feature has been broken for two years and no one has noticed, then it is time to eliminate the feature. I can't see a justification for keeping this line number comparison shortcut at the same time that Kernel.gsub and related methods are being removed. To put this another way: if -e in Ruby 1.9 allows integer range literals in conditionals to be compared against the current line number, then I think that -e should also add gsub, sub, split, back in to Kernel. David