ActionsLike0
Bug #8739
closedRange#last と#last(n)で挙動の統一がされていない
Description
Range#lastは終端を返しますが、#last(n)は最後の要素を返します。
引数の有無で挙動が異なるのは意図したものでしょうか?
意図したものであれば、返す値を終端か要素どちらかに挙動を統一出来ないでしょうか。
#終端が返る
(1...5).last => 5
#最後の要素が返る
(1...5).last(1) => [4]
Updated by matz (Yukihiro Matsumoto) over 11 years ago
- Status changed from Open to Rejected
- Assignee set to matz (Yukihiro Matsumoto)
Updated by naruse (Yui NARUSE) over 11 years ago
- Status changed from Closed to Assigned
- Assignee changed from matz (Yukihiro Matsumoto) to nobu (Nobuyoshi Nakada)
- Target version set to 2.1.0
Updated by nobu (Nobuyoshi Nakada) over 11 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
ActionsLike0