Project

General

Profile

Actions

Bug #5830

closed

"".byteslice(0) != "".byteslice(0, 0)

Added by brixen (Brian Shirai) about 12 years ago. Updated about 12 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin10.8.0]
Backport:
[ruby-core:41860]

Updated by naruse (Yui NARUSE) about 12 years ago

  • Status changed from Open to Rejected

It's spec.

It follows String#slice's behavior; it returns "" for str.slice(str.length, 0).
irb(main):005:0> ["a".slice(1), "a".slice(1, 0)]
=> [nil, ""]

Updated by Anonymous about 12 years ago

On Dec 31, 2011, at 3:32 AM, Brian Ford wrote:


Bug #5830: "".byteslice(0) !

Actions

Also available in: Atom PDF

Like0
Like0Like0