Actions
Bug #38176
openWrong number of arguments (given 0, expected 1) with Ruby 3.0 and safe mode
Difficulty:
Triaged:
Yes
Description
payload method in a webhook template throws wrong number of arguments (given 0, expected 1) error if only hash is used as an argument.
The error comes on Ruby 3.0 with safemode on. Actual reason for the error is in safemode library, which treats keyword arguments and hashes as the same value whilst passing into a method. After some digging, I've opened an issue in Ruby parser library: https://github.com/seattlerb/ruby_parser/issues/347 as it seems to be a bug either in ruby_parser or ruby2ruby library.
Fortunately, we can workaround this by changing payload signature.
Updated by The Foreman Bot 2 days ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman_webhooks/pull/81 added
Actions