In article <20020604025917Q.maki / rubycolor.org>, TAKAHASHI Masayoshi wrote:
[...]

Thanks for the summary.

>[ruby-dev:17228] Re: ((1.2)..(3.4)).to_a
>
>  Take_tk pointed out that (1.2)..(3.4) is something odd.
>
[...]
>     p( ((1.2)..(3.4)).to_a ) #=> [1, 2, 3]
>
>     But 1 is not included in 1.2 .. 3.4
>
>  The fundamental problem is that Range class has some
>  functions of Interval. #to_a method is natural for Range
>  (ordered discrete set), but not uniquely for Interval
>  (continuous set). Therefore, for Range objects of some
>  classes (ex. Time or Float), definitions of #to_a method
>  (or #each method) do not seem to be unique.
>  The issue is still open.
[...]

This bit me in production code about a week ago when I was using min/max on
a float range instead of begin/end, and include? instead of ===.

e.g. 

a = (1.2)..(3.4)
a.min -> 1			a.begin -> 1.2
a.max -> 3			a.end -> 3.4
a.include?(2.3) -> false	a === 2.3 -> true

The problem appears to be the Enumerable mixin.