Issue #6730 has been reported by pajamapajama (Bhushan Lodha).

----------------------------------------
Bug #6730: last method not really returning last element of range
https://bugs.ruby-lang.org/issues/6730

Author: pajamapajama (Bhushan Lodha)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 1.9.2p320 (2012-04-20 revision 35421) [x86_64-darwin10.8.0]


1.9.2p320 :001 > (0...5).each {|n| p n}
0
1
2
3
4
 => 0...5 
1.9.2p320 :002 > (0...5).last(2)
 => [3, 4] 
1.9.2p320 :003 > (0...5).last
 => 5 
1.9.2p320 :004 > 

The last method on line number 003 should return 4



-- 
http://bugs.ruby-lang.org/