Skip to content

Commit 3d78334

Browse files
committed
Simplify
1 parent e6762e6 commit 3d78334

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/ruby/truffleruby/core/truffle/queue_operations.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
module Truffle
1212
module QueueOperations
1313
def self.validate_and_prepare_timeout_in_milliseconds(non_block, timeout_seconds_or_nil)
14-
return timeout_seconds_or_nil if Primitive.nil?(timeout_seconds_or_nil)
14+
return nil if Primitive.nil?(timeout_seconds_or_nil)
1515
raise ArgumentError, "can't set a timeout if non_block is enabled" if non_block
1616

1717
(Truffle::Type.rb_num2dbl(timeout_seconds_or_nil) * 1000).to_i

0 commit comments

Comments
 (0)