From: "Todd A. Jacobs" Date: 2007-06-04T15:56:31+09:00 Subject: Ruby problem with conditional ranges I'm running into a problem doing a conditional range in ruby. The sample code is: #!/usr/bin/ruby ## one ## two ## three ## four ## five File.open($0, 'r') { |f| while f.gets print $_.sub(/^##/, '') if /^## two/ .. /^## four/ end } I'm expecting: two three four but I get the whole file with the leading pound signs stripped off. What's wrong here? -- "Oh, look: rocks!" -- Doctor Who, "Destiny of the Daleks"