Actions
Bug #6730
closedlast method not really returning last element of range
Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.2p320 (2012-04-20 revision 35421) [x86_64-darwin10.8.0]
Backport:
Description
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
Actions
Like0
Like0