You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's an arity error in the drb tests when running on JRuby 10 (have not tested 9.4):
$ bundle exec ruby -Ilib:test/lib test/drb/test_drb.rb -n test_bug16634
Loaded suite test/drb/test_drb
Started
E
===========================================================================================================================================================================================================================================================================================================================================
Error: test_bug16634(DRbTests::TestBug16634): ArgumentError: wrong number of arguments (given 1, expected 0)
(druby://localhost:51803) /Users/headius/work/drb/test/drb/ut_drb.rb:151:in 'keyword_test1'
(druby://localhost:51803) /Users/headius/work/drb/lib/drb/drb.rb:1713:in 'perform_without_block'
(druby://localhost:51803) /Users/headius/work/drb/lib/drb/drb.rb:1669:in 'perform'
(druby://localhost:51803) /Users/headius/work/drb/lib/drb/drb.rb:1758:in 'block in main_loop'
(druby://localhost:51803) org/jruby/RubyKernel.java:1658:in 'loop'
(druby://localhost:51803) /Users/headius/work/drb/lib/drb/drb.rb:1754:in 'block in main_loop'
test/drb/test_drb.rb:364:in 'test_bug16634'
361: end
362:
363: def test_bug16634
=> 364: assert_equal(42, @there.keyword_test1(a: 42))
365: assert_equal("default", @there.keyword_test2)
366: assert_equal(42, @there.keyword_test2(b: 42))
367: assert_equal({:a=>42, :b=>42}, @there.keyword_test3(a: 42, b: 42))
I have not investigated this yet but it may be a method generated by drb as a remote binding, and that could be a clue about why it sees this as a mismatched arity.
It seems that Marshal.load(Marshal.dump(ruby2_keywords_hash)) loses ruby2_keywords information:
classDRbExdefkeyword_test1(a:)aendendclassWrapperdefinitialize(object)@object=objectendruby2_keywordsdefmethod_missing(method, *args, &block)args=args.collect{|arg| Marshal.load(Marshal.dump(arg))}pHash.ruby2_keywords_hash?(args[0])# This is true with CRuby but false with JRuby@object.__send__(method, *args, &block)endendWrapper.new(DRbEx.new).keyword_test1(a: 42)
Activity
kou commentedon Apr 27, 2025
It seems that
Marshal.load(Marshal.dump(ruby2_keywords_hash))losesruby2_keywordsinformation:headius commentedon Jul 8, 2025
@kou Thanks for that help. Hopefully we can fix for 10.0.1.0.
Implement dumping for ruby2_keywords_hash Hashes
headius commentedon Jul 10, 2025
Fixed with specs in #8905!