Skip to content

Backtrace set with set_backtrace is not dup'd properly in 9.2.7.0 #5738

@mvz

Description

@mvz

Environment

  • jruby -v: jruby 9.2.7.0 (2.5.3) 2019-04-09 8a269e3 OpenJDK 64-Bit Server VM 11.0.4+2-Debian-1 on 11.0.4+2-Debian-1 [linux-x86_64]
  • JRUBY_OPTS: --dev
  • Operating system and platform (e.g. uname -a): Linux bean 4.19.0-5-amd64 #1 SMP Debian 4.19.37-3 (2019-05-15) x86_64 GNU/Linux

Expected Behavior

Given the following ruby code:

begin
  raise
rescue => err
  err.set_backtrace ['hi']
  p err.backtrace
  p err.dup.backtrace
end

In MRI and JRuby 9.2.6.0, this prints:

["hi"]
["hi"]

Actual Behavior

In JRuby 9.2.7.0, this prints:

["hi"]
["foo.rb:2:in `<main>'"]

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