Skip to content

Commit 8de2745

Browse files
author
Maxim Chechel
committed
1 parent 08cb086 commit 8de2745

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/concurrent/executor/executor.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,13 @@ def kill_execution
208208

209209
module JavaExecutor
210210
include Executor
211+
java_import 'java.lang.Runnable'
211212

212213
# @!macro executor_method_post
213214
def post(*args)
214215
raise ArgumentError.new('no block given') unless block_given?
215216
if running?
216-
executor_submit = @executor.java_method(:submit, [JavaConcurrent::Runnable.java_class])
217+
executor_submit = @executor.java_method(:submit, [Runnable.java_class])
217218
executor_submit.call { yield(*args) }
218219
true
219220
else

0 commit comments

Comments
 (0)