Project

General

Profile

Actions

Bug #11444

closed

STDIN.each_codepoint hangs indefinitely on certain codepoints

Added by cantino (Andrew Cantino) over 9 years ago. Updated about 9 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.0dev (2015-08-13 trunk 51569) [x86_64-linux]
[ruby-core:<unknown>]

Description

Piping certain Unicode data into Ruby and calling each_codepoint on STDIN results in a hang. Control-c does not exit, but control-z will. I've tested this in 2.2.0, 2.2.2, and trunk.

Please see https://gist.github.com/cantino/48f977bee6a39e33f80f for reproduction. There is an example file with various Unicode Emoji characters in it (borrowed from http://apps.timwhitlock.info/emoji/tables/unicode).

I'd like to help fix this if anyone can point me in the right direction. I fiddled with the file until I found a state where it works if one character is removed from the front of the file, so hopefully that's useful information.


Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #1667: IO#codepoints, IO#each_codepoint, and StringIOClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0