aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-02 00:19:41 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-02 00:19:41 +0000
commite4d687f3721477ec6804ca3483c4fb078af61e94 (patch)
treefdffa8dcc4897b28159e8eb72c3e042c8cfc1ba5
parent1f6f4e6b591a1f79ab90d45991f609423494d1f1 (diff)
downloadruby-e4d687f3721477ec6804ca3483c4fb078af61e94.tar.gz
* 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--array.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1bb9d1f085..c4e9ab5e9c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sat May 2 09:19:40 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * 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@iDaemons.org>
* lib/set.rb (Set#merge): Only directly use the passed objects
diff --git a/array.c b/array.c
index f4732d9acb..198f0570f1 100644
--- a/array.c
+++ b/array.c
@@ -3941,8 +3941,8 @@ Init_Array(void)
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);