Project

General

Profile

Actions

Feature #1667

closed

IO#codepoints, IO#each_codepoint, and StringIO

Added by marcandre (Marc-Andre Lafortune) over 15 years ago. Updated over 9 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:23949]

Description

Almost all "iterators" of String are present in IO and StringIO: #each_char, #each_byte, #each_line and their corresponding #chars, #bytes, #lines. Only #each_codepoint and #codepoints are not defined in IO and StringIO.

Unless there is a compelling reason not to, it would be useful if these were defined. This would mirror the coherence with all other each_* methods that exist in both String, IO and StringIO.


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #11444: STDIN.each_codepoint hangs indefinitely on certain codepointsClosedActions
Actions #1

Updated by matz (Yukihiro Matsumoto) over 15 years ago

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

Applied in changeset r23818.

Actions #2

Updated by nobu (Nobuyoshi Nakada) over 9 years ago

  • Related to Bug #11444: STDIN.each_codepoint hangs indefinitely on certain codepoints added
Actions #3

Updated by nobu (Nobuyoshi Nakada) over 9 years ago

  • Description updated (diff)

Why is "an incomplete character before EOF" ignored?

		if (more_char(fptr) == MORE_CHAR_FINISHED) {
		    clear_readconv(fptr);
		    /* ignore an incomplete character before EOF */
		    return io;
		}
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0