Project

General

Profile

Actions

Bug #17305

closed

rb_rescue2() seems to loop forever if given a non-module for rescued exceptions on <= 2.6.6

Added by Eregon (Benoit Daloze) over 3 years ago. Updated about 3 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:100702]

Description

Specifically,

      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

in
spec/ruby/optional/capi/kernel_spec.rb
reproduces the issue.

Ruby 2.7.0+ seems fine and raises the expected TypeError.


Files


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #17338: ruby-spec stuck in "C-API Kernel function rb_rescue2"ClosedEregon (Benoit Daloze)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0