Project

General

Profile

Actions

Bug #38176

open

Wrong number of arguments (given 0, expected 1) with Ruby 3.0 and safe mode

Added by Oleh Fedorenko 2 days ago. Updated 2 days ago.

Status:
Ready For Testing
Priority:
Normal
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

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.

Actions #1

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

Also available in: Atom PDF