From: "Todd A. Jacobs" Date: 2007-06-05T09:51:28+09:00 Subject: Re: Ruby problem with conditional ranges On Mon, Jun 04, 2007 at 04:35:25PM +0900, come wrote: > Implicit match against "$_" is not anymore supported in version 1.8. Thanks. Your explanation was very helpful. It works better now, but the range operator *still* catches more than it should. For example: #!/usr/bin/ruby -w ## one ## two ## three ## four ## five File.open($0) do |file| while file.gets print $_.sub(/^## /, '') if ($_ =~ /^## two/)...($_ =~ /^## four/) end end prints up to "four" when (as I understand it) it should stop at "three" since "## four" would make the if-statement false. Am I still missing something obvious? -- "Oh, look: rocks!" -- Doctor Who, "Destiny of the Daleks"