Project

General

Profile

Actions

Bug #592

closed

String#rstrip sometimes strips NULLs, sometimes doesn't - encoding dependent

Added by mike (Michael Selig) about 14 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
Backport:
[ruby-core:18844]

Description

=begin
ruby -ve 'p "abc \x00\x00".rstrip'
ruby 1.9.0 (2008-09-24 revision 19507) [i686-linux]
"abc"

but:
ruby -ve 'p "\u0635abc \x00\x00".rstrip'
ruby 1.9.0 (2008-09-24 revision 19507) [i686-linux]
"صabc \x00\x00"
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0