From: Matt Armstrong Date: 2001-12-08T09:38:41+09:00 Subject: [ruby-talk:27879] Re: Inconsistence in ranges with if Martin Kahlert writes: > 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 Martin, you got my interest here. Can you explain how ranges in conditionals actually work here? I don't understand what your a.each iterators are doing. -- matt