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 | 56d973d728cc74590b93a74450af14a6279e6d29 (patch) | |
tree | 3567051068a395754ec35d8785e5d873ac4afc95 /array.c | |
parent | 545c0d6aa3ac35b3789e049fdde6ec3390021653 (diff) |
* array.c (flatten): returns an instance of same class.
[ruby-core:16554]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3082,7 +3082,7 @@ flatten(ary, level, 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; |