From: sto.mar@... Date: 2013-06-12T01:27:42+09:00 Subject: Re: Loop with range question Am 11.06.2013 18:04, schrieb Scott H.: > ================ > i=0 > loop do > i+=1 > next if i== (3..6) > print "#{i} " > break if i==10 > end > > expected => 1 2 7 8 9 10 > actual => 1 2 3 4 5 6 7 8 9 10 > (so I thought by wrapping the range in a “()” it would convert to > 3,4,5,6 and then be able to jump over these integers on output) > ================ This might help: 2.0.0-p195 :018 > (3..6).include? 5 => true 2.0.0-p195 :019 > (3..6).include? 10 => false Note that a Range and an Integer can never be equal. --