Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion test/lib/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ def assert_local_raise(expected, message = nil)
assert_raise(expected, &block)
end
stack = caller
assert_equal stack, error.backtrace&.last(stack.size)
pend_if_jruby("JRuby bug: jruby/jruby#9528, fixed by: jruby/jruby#9548") do
assert_equal stack, error.backtrace&.last(stack.size)
end
error
end

Expand All @@ -221,6 +223,7 @@ def assert_local_raise(expected, message = nil)
# it can capture the top of the stacktrace. After that, it'll continue to use
# the same stacktrace.
def assert_reraised(*args, imap: nil, &block)
return assert_local_raise(*args, &block) if RUBY_ENGINE == "jruby"
@rcvr_thread_trace ||= imap.instance_variable_get(:@receiver_thread)
&.backtrace&.last(2)
error = assert_local_raise(*args, &block)
Expand Down
Loading