diff options
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_exception.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb index 43115de3bd..8dafa45120 100644 --- a/test/ruby/test_exception.rb +++ b/test/ruby/test_exception.rb @@ -1320,4 +1320,20 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status| end; assert_in_out_err([], code, [], /Bug14566/, success: false, timeout: 1) end + + def test_super_in_method_missing + assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}") + begin; + class Object + def method_missing(name, *args, &block) + super + end + end + + bug14670 = '[ruby-dev:50522] [Bug #14670]' + assert_raise_with_message(NoMethodError, /`foo'/, bug14670) do + Object.new.foo + end + end; + end end |