diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-25 03:37:57 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-25 03:37:57 +0000 |
commit | a4c08752f8f556dbf3bc391a36e4692b7740f10c (patch) | |
tree | eec5c3147ee551b5802f06ea56dde2ce9d11c935 /array.c | |
parent | 62da750abea80bad64465791e897bcb4c24d5f9a (diff) | |
download | ruby-a4c08752f8f556dbf3bc391a36e4692b7740f10c.tar.gz |
* array.c (flatten): returns an instance of same class.
[ruby-core:16554]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2765,7 +2765,7 @@ flatten(VALUE ary, int level, int *modified) st_data_t id; stack = rb_ary_new(); - result = rb_ary_new(); + result = ary_new(rb_class_of(ary), RARRAY_LEN(ary)); memo = st_init_numtable(); st_insert(memo, (st_data_t)ary, (st_data_t)Qtrue); *modified = 0; |