ruby-changes:11685
From: nobu <ko1@a...>
Date: Sat, 2 May 2009 09:19:56 +0900 (JST)
Subject: [ruby-changes:11685] Ruby:r23324 (trunk): * array.c (Init_Array): made #to_s an alias to #inspect to reduce
nobu 2009-05-02 09:19:41 +0900 (Sat, 02 May 2009) New Revision: 23324 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23324 Log: * array.c (Init_Array): made #to_s an alias to #inspect to reduce the result of recursive array. a patch from ujihisa at [ruby-dev:38362] Modified files: trunk/ChangeLog trunk/array.c Index: array.c =================================================================== --- array.c (revision 23323) +++ array.c (revision 23324) @@ -3941,8 +3941,8 @@ rb_define_method(rb_cArray, "initialize", rb_ary_initialize, -1); rb_define_method(rb_cArray, "initialize_copy", rb_ary_replace, 1); - rb_define_method(rb_cArray, "to_s", rb_ary_inspect, 0); rb_define_method(rb_cArray, "inspect", rb_ary_inspect, 0); + rb_define_alias(rb_cArray, "to_s", "inspect"); rb_define_method(rb_cArray, "to_a", rb_ary_to_a, 0); rb_define_method(rb_cArray, "to_ary", rb_ary_to_ary_m, 0); rb_define_method(rb_cArray, "frozen?", rb_ary_frozen_p, 0); Index: ChangeLog =================================================================== --- ChangeLog (revision 23323) +++ ChangeLog (revision 23324) @@ -1,3 +1,9 @@ +Sat May 2 09:19:40 2009 Nobuyoshi Nakada <nobu@r...> + + * array.c (Init_Array): made #to_s an alias to #inspect to reduce + the result of recursive array. a patch from ujihisa a + [ruby-dev:38362] + Fri May 1 16:50:05 2009 Akinori MUSHA <knu@i...> * lib/set.rb (Set#merge): Only directly use the passed objects -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/