From: windwiny Date: 2013-01-07T12:09:41+09:00 Subject: ruby 1.9.3p362 ranges as conditions bug? --f46d042f925e83c61004d2aa0bdf Content-Type: text/plain; charset=UTF-8 Hello, I am test this has a problem, ruby -v ruby 1.9.3p362 (2012-12-25 revision 38607) [x86_64-darwin12.2.1] vs = (1..9).to_a => [1, 2, 3, 4, 5, 6, 7, 8, 9] v1 = vs.select { |n| if n==3..n==6 then 1 end } => [3, 4, 5, 6] v2 = vs.select { |n| if n==2..n==16 then 1 end } => [2, 3, 4, 5, 6, 7, 8, 9] v3 = vs.select { |n| if n==3..n==6 then 1 end } => [1, 2, 3, 4, 5, 6] v1 and v3 use some condition , return value is different. --f46d042f925e83c61004d2aa0bdf Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello,

=C2=A0 I am test this has a problem,
ruby -v
ruby 1.9.3p362 (2012-12-25 revision 386= 07) [x86_64-darwin12.2.1]


vs =3D (1= ..9).to_a
=3D> [1, 2, 3, 4, 5, 6, 7, 8, 9]

v1 =3D vs= .select { |n| if n=3D=3D3..n=3D=3D6 then 1 end }
=3D> [3, 4, 5= , 6]

v2 =3D vs.select { |n| if n=3D=3D2..n=3D=3D16= then 1 end }
=3D> [2, 3, 4, 5, 6, 7, 8, 9]

v3 =3D vs.select = { |n| if n=3D=3D3..n=3D=3D6 then 1 end }
=3D> [1, 2, 3, 4, 5, = 6]

v1 and v3 use some condition , return value is = different.


--f46d042f925e83c61004d2aa0bdf--