From: "jeremyevans0 (Jeremy Evans) via ruby-core" Date: 2023-01-11T17:13:55+00:00 Subject: [ruby-core:111784] [Ruby master Bug#19332] Thread::Queue#pop raises ArgumentError with Issue #19332 has been updated by jeremyevans0 (Jeremy Evans). Status changed from Open to Closed The documentation shows that `non_block` is a positional argument, not a keyword argument. You want `q.pop(true)`. ---------------------------------------- Bug #19332: Thread::Queue#pop raises ArgumentError with https://bugs.ruby-lang.org/issues/19332#change-101196 * Author: schnittchen (Thomas Stratmann) * Status: Closed * Priority: Normal * ruby -v: ruby 3.2.0 (2022-12-25 revision a528908271) [x86_64-linux] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- ��� ruby --version ruby 3.2.0 (2022-12-25 revision a528908271) [x86_64-linux] ��� irb Ignoring debug-1.7.1 because its extensions are not built. Try: gem pristine debug --version 1.7.1 Ignoring rbs-2.8.2 because its extensions are not built. Try: gem pristine rbs --version 2.8.2 irb(main):001:0> require "thread" => false irb(main):002:0> q = Thread::Queue.new => # irb(main):003:0> q.pop(non_block: true) :14:in `pop': unknown keyword: :non_block (ArgumentError) from (irb):3:in `
' from /home/thomas/.rubies/ruby-3.2.0/lib/ruby/gems/3.2.0/gems/irb-1.6.2/exe/irb:11:in `' from /home/thomas/.rubies/ruby-3.2.0/bin/irb:25:in `load'���� from /home/thomas/.rubies/ruby-3.2.0/bin/irb:25:in `
' irb(main):004:0> According to the documentation, I expected a ThreadError to be raised. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/