Logidze with Ruby 3.0 is throwing argument errors.
dchapman1988 opened this issue · comments
Tell us about your environment
Ruby Version: 3.0.3
Rails Version: 6.1.4.1
PostgreSQL Version: 11.13
Logidze Version: 1.2.0
What did you do?
Upgraded application to Ruby 3.0 and attempting to use the with_meta
method.
What did you expect to happen?
I expected a requirement error when bundling complaining about my Ruby version or Logidze to support the positional arguments and keyword arguments separation in Ruby 3.0.
What actually happened?
Things broke with ArgumentError: https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
I would like to support Ruby 3.0, and would love to contribute, I've forked the gem and started making changes to support Ruby 3.0, but I would love opinions on how to handle the default option for wrapping the block into a DB transaction
Thanks for reporting!
I've just added Ruby 3.0 to the CI build matrix, and all the tests passed.
How do you call #with_meta
?
The first argument should be a Hash (the metadata itself). Keyword arguments are used to tweak the method behavior itself.
OK, I found that the docs still provide .with_meta(**meta)
example, which is not valid in 3.0+. I guess, that's what you should do, too.