From: Nobuyoshi Nakada Date: 2007-06-04T16:19:25+09:00 Subject: Re: Ruby problem with conditional ranges Hi, At Mon, 4 Jun 2007 15:56:31 +0900, Todd A. Jacobs wrote in [ruby-talk:254228]: > print $_.sub(/^##/, '') if /^## two/ .. /^## four/ print $_.sub(/^##/, '') if ~/^## two/ .. ~/^## four/ > but I get the whole file with the leading pound signs stripped off. > What's wrong here? Because Range object isn't nil nor false, and you'd see a warning if you run with -w option. warning: range literal in condition -- Nobu Nakada