Hi,

2013/1/7 windwiny <windwiny.ubt / gmail.com>:
> 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.
>
>
Hi,

2013/1/7 windwiny <windwiny.ubt / gmail.com>:
> Run code on irb, pry has different result, write code to file, run from
> file, that return same result. Maybe it is (1.9.3p362)irb's bug.
>
I confirmed this bug also occurred on ruby trunk.
I filed a bug issue on behalf of you.
https://bugs.ruby-lang.org/issues/7671

Regards,

Park Heesob