summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-21 05:57:20 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-21 05:57:20 +0000
commit84eda08639514ed60c35d6d286f0d730f50f30cb (patch)
treefee80f1ed12a3de9cc34e1181ed7a5496fdaa667
parent1b687aa60c438efea341bb65210bce3e24309cd8 (diff)
downloadruby-84eda08639514ed60c35d6d286f0d730f50f30cb.tar.gz
ruby-84eda08639514ed60c35d6d286f0d730f50f30cb.tar.xz
ruby-84eda08639514ed60c35d6d286f0d730f50f30cb.zip
* string.c (Init_String): Strings are no longer Enumerable. use
each_lines or lines method explicitly. * string.c (Init_String): remove each method. use each_lines. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--string.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index b1d38bf52..306a5535b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,11 @@ Thu Sep 21 09:38:12 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* string.c (rb_str_lines): new method to split a string into lines.
+ * string.c (Init_String): Strings are no longer Enumerable. use
+ each_lines or lines method explicitly.
+
+ * string.c (Init_String): remove each method. use each_lines.
+
Wed Sep 20 23:17:41 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
* common.mk (pre-install-doc): create data directory before install.
diff --git a/string.c b/string.c
index 8390a969e..c13f3a15e 100644
--- a/string.c
+++ b/string.c
@@ -4781,7 +4781,6 @@ Init_String(void)
{
rb_cString = rb_define_class("String", rb_cObject);
rb_include_module(rb_cString, rb_mComparable);
- rb_include_module(rb_cString, rb_mEnumerable);
rb_define_alloc_func(rb_cString, str_alloc);
rb_define_method(rb_cString, "initialize", rb_str_init, -1);
rb_define_method(rb_cString, "initialize_copy", rb_str_replace, 1);
@@ -4878,7 +4877,6 @@ Init_String(void)
rb_define_method(rb_cString, "squeeze!", rb_str_squeeze_bang, -1);
rb_define_method(rb_cString, "each_line", rb_str_each_line, -1);
- rb_define_method(rb_cString, "each", rb_str_each_line, -1);
rb_define_method(rb_cString, "each_byte", rb_str_each_byte, 0);
rb_define_method(rb_cString, "sum", rb_str_sum, -1);