ManageIQ / manageiq-cross_repo

ManageIQ cross-repository testing framework
MIT License
3 stars 18 forks source link

Unpack the hash for ruby 3 support #78

Closed jrafanie closed 2 years ago

jrafanie commented 2 years ago

In prior rubies, this hash was unpacked as the only value in an array. Ruby 3 no longer accepts kwargs or implicit hashes as the last argument sent to a method.

Since Runner#initialize accepts only kwargs, it's far easier to just change this to unpack the hash into kwargs using double splat. This was tested for ruby 2.6, 2.7, and 3.0.

Fryguy commented 2 years ago

@agrare Super-technically this is a breaking change as if anyone was actually passing an Array with a Hash in it, then that will not longer work, but that seems super-unlikely, and wasn't the prescribed way of using it, so I think this is just a patch release fix.