Skip to content

Commit 146e48b

Browse files
committed
test(active_job): use def instead of define_method to avoid JRuby DynamicScope NPE
1 parent 7ebf399 commit 146e48b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sentry-rails/spec/active_job/shared_examples/argument_serialization.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def event_arguments
6161
post = Post.create!
6262

6363
problematic_job = job_fixture do
64-
define_method(:perform) do |passed_post|
64+
def perform(passed_post)
6565
def passed_post.to_global_id
6666
raise "intentional"
6767
end
@@ -82,7 +82,7 @@ def passed_post.to_global_id
8282
mod = Module.new
8383

8484
module_job = job_fixture do
85-
define_method(:perform) do |_mod|
85+
def perform(_mod)
8686
raise "boom from argument_serialization spec"
8787
end
8888
end

0 commit comments

Comments
 (0)