Project

General

Profile

Bug #7440

IO#lines etc. should return Array

Added by yhara (Yutaka HARA) over 7 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
Normal
Target version:
ruby -v:
ruby 2.0.0dev (2012-11-26 trunk 36708) [x86_64-darwin12.2.1]
Backport:
[ruby-core:<unknown>]

Description

String#bytes, #chars, #codepints and #lines are changed to return Array in #6670.

For consistent behavior, following methods should return Array too:

  • ARGF.lines, chars, bytes, codepoints
  • IO#lines, chars, bytes, codepoints
  • StringIO#lines, chars, bytes, codepoints
  • Zlib::GzipReader#lines, bytes

Please let me know if there are more.


Related issues

Related to Ruby master - Feature #6670: str.chars.last should be possibleClosedmame (Yusuke Endoh)Actions

Also available in: Atom PDF