diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-24 18:46:15 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-24 18:46:15 +0000 |
commit | 3f9b0936aa846bdf6984019ca40bc629fe05d929 (patch) | |
tree | 59852ade00f43a1b6325bce662512c18ca596bcf /lib/set.rb | |
parent | 7f0dd3a5a23d0009862e0f1213e536fff1a94727 (diff) | |
download | ruby-3f9b0936aa846bdf6984019ca40bc629fe05d929.tar.gz |
String#{lines,chars,codepoints,bytes} now return an array.
* string.c (rb_str_each_line, rb_str_lines): String#lines now
returns an array instead of an enumerator. Passing a block is
deprecated but still supported for backwards compatibility.
Based on the patch by yhara. [Feature #6670]
* string.c (rb_str_each_char, rb_str_chars): Ditto for
String#chars.
* string.c (rb_str_each_codepoint, rb_str_codepoints): Ditto for
String#codepoints.
* string.c (rb_str_each_byte, rb_str_bytes): Ditto for
String#bytes.
* NEWS: Add notes for the above changes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/set.rb')
0 files changed, 0 insertions, 0 deletions