diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-02 00:19:41 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-02 00:19:41 +0000 |
commit | 3acc21e28ae61c0c63e62d7f4d869e03dd886a21 (patch) | |
tree | fdffa8dcc4897b28159e8eb72c3e042c8cfc1ba5 /array.c | |
parent | 02bc0d5e63be884e7c8924eb5bbc18056774dadc (diff) | |
download | ruby-3acc21e28ae61c0c63e62d7f4d869e03dd886a21.tar.gz ruby-3acc21e28ae61c0c63e62d7f4d869e03dd886a21.tar.xz ruby-3acc21e28ae61c0c63e62d7f4d869e03dd886a21.zip |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@23324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |