Hi,

I feel that 1.8's Range#max is good.

1.9's Range#max sometimes does strange behavior.
>irb
irb(main):001:0> RUBY_DESCRIPTION
=> "ruby 1.9.3dev (2011-04-11 trunk 31261) [i386-mswin32_100]"
irb(main):002:0> (1..1.2).max
=> 1.2
irb(main):003:0> (1...1.2).max
TypeError: cannot exclude non Integer end value
irb(main):004:0> (1.1..3.2).max
=> 3.2
irb(main):005:0> (1.1..2).max
=> 2
irb(main):006:0> (1.1...2).max
=> 1

(1.1...2).max is 1 ?!!!
I cannot think it is correct result.

Here is 1.8's

irb(main):001:0> RUBY_DESCRIPTION
=> "ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-mingw32]"
irb(main):002:0> (1..1.2).max
=> 1
irb(main):003:0> (1...1.2).max
=> 1
irb(main):004:0> (1.1..3.2).max
TypeError: can't iterate from Float
irb(main):005:0> (1.1..2).max
TypeError: can't iterate from Float
irb(main):006:0> (1.1...2).max
TypeError: can't iterate from Float

Here is better though it is sad not to be able to treat Float.

btw, I have used Range only with Integer :-)
-- 
Masaya TARUI
No Tool,No Life.