diff options
| author | Bouke van der Bijl <[email protected]> | 2016-12-06 14:25:56 -0500 |
|---|---|---|
| committer | Clayton Smith <[email protected]> | 2017-01-11 09:10:12 -0500 |
| commit | 6be5160eb634e7b045cba83a38675cf14fa16593 (patch) | |
| tree | 2ff7fc8f2265a4ed83e5058e4a31b6bcc549301b /test | |
| parent | db1bd078bedcc33bfd3ca4c45f46bc553786bfd8 (diff) | |
| download | mruby-6be5160eb634e7b045cba83a38675cf14fa16593.tar.gz mruby-6be5160eb634e7b045cba83a38675cf14fa16593.zip | |
Fix 36fc1f14 not checking in the right location
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/nomethoderror.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/t/nomethoderror.rb b/test/t/nomethoderror.rb index 1c09bc20e..41a3ba14f 100644 --- a/test/t/nomethoderror.rb +++ b/test/t/nomethoderror.rb @@ -51,3 +51,21 @@ assert('Can still call super when BasicObject#method_missing is removed') do end end end + +assert("NoMethodError#new does not return an exception") do + begin + class << NoMethodError + def new(*) + nil + end + end + + assert_raise(TypeError) do + Object.q + end + ensure + class << NoMethodError + remove_method :new + end + end +end |
