Skip to content

Interrupt ignores exception message #4286

@jeremyevans

Description

@jeremyevans

Environment

jruby 9.1.6.0 (2.3.1) 2016-11-09 0150a76 OpenJDK 64-Bit Server VM 25.72-b15 on 1.8.0_72-b15 +jit [OpenBSD-x86_64]

Expected Behavior

With code:

$ jruby -e 'begin; raise Interrupt, "foo"; rescue Exception; puts $!.message; end'

I expect output will be foo, as that is MRI's behavior and the behavior of earlier JRuby versions. Example with ruby 2.3:

$ ruby23 -e 'begin; raise Interrupt, "foo"; rescue Exception; puts $!.message; end'
foo

Actual Behavior

$ jruby -e 'begin; raise Interrupt, "foo"; rescue Exception; puts $!.message; end'
Interrupt

While I'm understandably not relying on this behavior in production, it did break Sequel's tests. I believe this behavior changed between 9.1.5.0 and 9.1.6.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions