Project

General

Profile

Bug #17305

Updated by Eregon (Benoit Daloze) over 3 years ago

Specifically, 
 ```ruby 
     ruby_version_is "2.7" do # seems to hang on CRuby <= 2.6.6 
       it "raises TypeError if one of the passed exceptions is not a Module" do 
         -> { 
           @s.rb_rescue2(-> *_ { raise RuntimeError, "foo" }, :no_exc, -> x { x }, :exc, Object.new, 42) 
         }.should raise_error(TypeError, /class or module required/) 
       end 
     end 
 ``` 
 in 
 `spec/ruby/optional/capi/kernel_spec.rb` 
 reproduces the issue. 

 Ruby 2.7.0+ seems fine and raises the expected TypeError.

Back