From: Martin Kahlert Date: 2001-12-06T17:07:44+09:00 Subject: [ruby-talk:27657] Inconsistence in ranges with if Hi! I just came across an inconsistency: #!/usr/bin/env ruby (1..3).each {|i| puts i} puts (1...3).each {|i| puts i} puts a = ["one", "two", "three", "four", "five", "six"] a.each do |l| puts l if l =~ /two/ .. l =~ /five/ end puts a.each do |l| puts l if l =~ /two/ ... l =~ /five/ end This prints: 1 2 3 1 2 two three four five two three four five But i thought it should print 1 2 3 1 2 two three four five two three four Am i correct here? Thanks, Martin. -- The early bird catches the worm. If you want something else for breakfast, get up later.