ROM 5.3.0 support for Ruby 3?

When using ruby 3.1.2 these warnings cause crashes.

/gems/rom-core-5.3.0/lib/rom/relation/combined.rb:145: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/gems/rom-core-5.3.0/lib/rom/relation/commands.rb:40: warning: The called method `command’ is defined here
.

Please report an issue

Hello, With ruby 3.0.6 I’m getting the following error:

ArgumentError: wrong number of arguments (given 2, expected 1)
    /.../gems/rom-core-5.3.0/lib/rom/relation/commands.rb:40:in `command'
    /.../gems/rom-core-5.3.0/lib/rom/relation/combined.rb:145:in `command'

I think it is due to this change:

Any suggestion?

[EDIT] looks like changing rom-core-5.3.0/lib/rom/relation/combined.rb:143
FROM

def command(type, *args)

TO

def command(type, **args)

Fixes the problem.

1 Like