diff options
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_assignment.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_assignment.rb b/test/ruby/test_assignment.rb index c1f8c46890..c14568fde3 100644 --- a/test/ruby/test_assignment.rb +++ b/test/ruby/test_assignment.rb @@ -92,6 +92,11 @@ class TestAssignment < Test::Unit::TestCase a,b,*c = *[*[1,2]]; assert_equal([1,2,[]], [a,b,c]) end + def test_assign_rescue + a = raise rescue 2; assert_equal(2, a) + a, b = raise rescue [3,4]; assert_equal([3, 4], [a, b]) + end + def test_assign_abbreviated bug2050 = '[ruby-core:25629]' a = Hash.new {[]} |