summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS17
1 files changed, 17 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 2da55a3c2a..7b4c157c12 100644
--- a/NEWS
+++ b/NEWS
@@ -129,6 +129,11 @@ with all sufficient information, see the ChangeLog file.
* String
* added method:
* added String#b returning a copied string whose encoding is ASCII-8BIT.
+ * change return value:
+ * String#lines now returns an array instead of an enumerator.
+ * String#chars now returns an array instead of an enumerator.
+ * String#codepoints now returns an array instead of an enumerator.
+ * String#bytes now returns an array instead of an enumerator.
* Struct
* added method:
@@ -302,6 +307,18 @@ with all sufficient information, see the ChangeLog file.
See above.
+ * String#lines
+ * String#chars
+ * String#codepoints
+ * String#bytes
+
+ These methods no longer return an Enumerator, although passing a
+ block is still supported for backwards compatibility.
+
+ Code like str.lines.with_index(1) { |line, lineno| ... } no longer
+ works because str.lines returns an array. Replace lines with
+ each_line in such cases.
+
* Signal.trap
See above.