From: Martin DeMello Date: 2004-08-12T16:01:11+09:00 Subject: Re: Bug in Range#end with exclusive ranges? Austin Ziegler wrote: > > In mathematical range notation, the difference between 0..50 and > 0...50 is [0, 50] and [0, 50). Thus: It doesn't seem quite right that Ruby should do this though irb(main):001:0> a = (0..50) a = (0..50) => 0..50 irb(main):002:0> b = (0.0..50.0) b = (0.0..50.0) => 0.0..50.0 irb(main):004:0> a.last a.last => 50 irb(main):005:0> a.last.class a.last.class => Fixnum irb(main):006:0> b.last.class b.last.class => Float irb(main):007:0> a.include?(49.9) a.include?(49.9) => true irb(main):008:0> b.include?(49.9) b.include?(49.9) => true Shouldn't Range#include work differently for integers? martin