diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_integer.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_integer.rb b/test/ruby/test_integer.rb index 0b9aa4191d..51737d3d1f 100644 --- a/test/ruby/test_integer.rb +++ b/test/ruby/test_integer.rb @@ -159,6 +159,12 @@ class TestInteger < Test::Unit::TestCase assert_nothing_raised(TypeError) { assert_equal(nil, Integer(nil, exception: false)) } + + assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}") + begin; + def method_missing(*);"";end + assert_equal(0, Integer("0", 2)) + end; end def test_int_p |