Actions
Feature #1667
closedIO#codepoints, IO#each_codepoint, and StringIO
Feature #1667:
IO#codepoints, IO#each_codepoint, and StringIO
Status:
Closed
Assignee:
-
Target version:
-
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.
Updated by matz (Yukihiro Matsumoto) over 16 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
Applied in changeset r23818.
Updated by nobu (Nobuyoshi Nakada) about 10 years ago
- Related to Bug #11444: STDIN.each_codepoint hangs indefinitely on certain codepoints added
Updated by nobu (Nobuyoshi Nakada) about 10 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