зеркало из https://github.com/github/ruby.git
* 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:
Родитель
c35290824a
Коммит
4e37427ee5
|
@ -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.
|
||||
|
|
2
string.c
2
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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче