Actions
Bug #5830
closed"".byteslice(0) != "".byteslice(0, 0)
Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin10.8.0]
Backport:
Description
Is this a bug?
See https://github.com/ruby/ruby/blob/069f7ec90a6ef/string.c#L4091 vs https://github.com/ruby/ruby/blob/069f7ec90a6ef/string.c#L4035-4036
Thanks,
Brian
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
Like0
Like0Like0