1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/ruby/test_array.rb: Ensure flatten! is used for test_flatten

Patch by @ksss [Fixes GH-530] https://github.com/ruby/ruby/pull/530


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
zzak 2014-02-13 07:55:34 +00:00
parent 966d04da60
commit dc853e330b
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Thu Feb 13 16:54:32 2014 Zachary Scott <e@zzak.io>
* test/ruby/test_array.rb: Ensure flatten! is used for test_flatten
Patch by @ksss [Fixes GH-530] https://github.com/ruby/ruby/pull/530
Thu Feb 13 15:43:16 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (IDSET_ATTRSET_FOR_INTERN): fix off-by-one bug.

View file

@ -798,9 +798,9 @@ class TestArray < Test::Unit::TestCase
assert_nil(a5.flatten!(0), '[ruby-core:23382]')
assert_equal(@cls[1, 2, 3, 4, 5, 6], a5)
assert_equal(@cls[], @cls[].flatten)
assert_nil(@cls[].flatten!)
assert_equal(@cls[],
@cls[@cls[@cls[@cls[],@cls[]],@cls[@cls[]],@cls[]],@cls[@cls[@cls[]]]].flatten)
@cls[@cls[@cls[@cls[],@cls[]],@cls[@cls[]],@cls[]],@cls[@cls[@cls[]]]].flatten!)
assert_nil(@cls[].flatten!(0), '[ruby-core:23382]')
end