Project

General

Profile

Backport #4112

StringIO#gets(limit) returns incomplete string

Added by nobu (Nobuyoshi Nakada) over 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
[ruby-dev:42674]

Description

=begin
StringIO#getsに長さを指定したとき、マルチバイト文字が途中で切れることがあります。

StringIO.new("\u3042").gets(1) #=> "\xE3"
StringIO.new("a".encode("utf-16be")).gets(1) #=> "\x00"
=end


Files

stringio_gets.diff (1.05 KB) stringio_gets.diff nobu (Nobuyoshi Nakada), 12/03/2010 06:58 AM

History

#1

Updated by nobu (Nobuyoshi Nakada) over 8 years ago

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

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

=end

#2

Updated by nobu (Nobuyoshi Nakada) over 8 years ago

  • Category set to ext
  • Status changed from Closed to Assigned
  • Assignee changed from nobu (Nobuyoshi Nakada) to yugui (Yuki Sonoda)

=begin

=end

#3

Updated by yugui (Yuki Sonoda) over 8 years ago

  • Status changed from Assigned to Closed

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

=end

Also available in: Atom PDF