Project

General

Profile

Actions

Bug #3996

closed

String#dump Adds Trailing NULL to Certain Unicode Characters

Added by runpaint (Run Paint Run Run) over 13 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3dev (2010-10-28 trunk 29616) [x86_64-linux]
Backport:
[ruby-core:32935]

Description

=begin
(0..127).map{|o| o.chr('utf-8').dump}.grep(/\0$/)
#=> [""\x00"\u0000", ""\x01"\u0000", ""\x02"\u0000", ""\x03"\u0000", ""\x04"\u0000", ""\x05"\u0000", ""\x06"\u0000", ""\x0E"\u0000",
""\x0F"\u0000", ""\x10"\u0000\u0000", ""\x11"\u0000\u0000", ""\x12"\u0000\u0000", ""\x13"\u0000\u0000", ""\x14"\u0000\u0000",
""\x15"\u0000\u0000", ""\x16"\u0000\u0000", ""\x17"\u0000\u0000", ""\x18"\u0000\u0000", ""\x19"\u0000\u0000", ""\x1A"\u0000\u0000",
""\x1C"\u0000\u0000", ""\x1D"\u0000\u0000", ""\x1E"\u0000\u0000", ""\x1F"\u0000\u0000", ""\x7F"\u0000\u0000"]
=end

Actions #1

Updated by nobu (Nobuyoshi Nakada) over 13 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r29622.
Run Paint, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions

Also available in: Atom PDF

Like0
Like0