Skip to content

Commit f188df6

Browse files
committed
chore: Pass a var to thread
1 parent 5b8b323 commit f188df6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ferrum/utils/thread.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ module Thread
66
module_function
77

88
def spawn(abort_on_exception: true)
9-
::Thread.new(abort_on_exception) do
10-
::Thread.current.abort_on_exception = abort_on_exception
9+
::Thread.new(abort_on_exception) do |whether_abort_on_exception|
10+
::Thread.current.abort_on_exception = whether_abort_on_exception
1111
::Thread.current.report_on_exception = true if ::Thread.current.respond_to?(:report_on_exception=)
1212

1313
yield

0 commit comments

Comments
 (0)