diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-21 05:57:20 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-21 05:57:20 +0000 |
commit | 84eda08639514ed60c35d6d286f0d730f50f30cb (patch) | |
tree | fee80f1ed12a3de9cc34e1181ed7a5496fdaa667 | |
parent | 1b687aa60c438efea341bb65210bce3e24309cd8 (diff) | |
download | ruby-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-- | ChangeLog | 5 | ||||
-rw-r--r-- | string.c | 2 |
2 files changed, 5 insertions, 2 deletions
@@ -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. @@ -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); |