* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@10981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2006-09-21 05:57:20 +00:00
Родитель c35290824a
Коммит 4e37427ee5
2 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -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);