Skip to content

Commit e86e643

Browse files
committed
Ignore any argument in kernel exit proc
Otherwise a DOM Event object could be passed to Kernel#exit.
1 parent 52f1acd commit e86e643

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib-opal/opal/rspec/browser.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
end
66

77
# Trigger #at_exit callbacks once the DOM is ready
8-
kernel_exit = Kernel.method(:exit).to_proc
8+
kernel_exit = -> _ { Kernel.exit }
99
if JS[:document].JS[:readyState] == :complete
1010
JS[:setTimeOut].call(kernel_exit, 1)
1111
else

0 commit comments

Comments
 (0)