Keyword arguments previously did not work correctly if hash keys contained a dynamically created symbol. Consequently, when a method with keyword arguments was used with such a hash, the values could have been incorrectly assigned to the method arguments. A patch has been applied, which protects value stack from calling other methods during the complex parameter setting process. As a result, assigning named arguments from a hash works as expected in the described scenario.
Hi Trey,
Thanks for the report. Unfortunately, I am not sure how I could help ATM. The scl.org versions of collections were typically just mere rebuilds of official Red Hat RHSCL collections and so far, the update to more recent version of Ruby 2.2 was not approved (see bug 1280296). But if you are by a chance Red Hat customer, the best would be to contact Red Hat support to help prioritize the update (or apply just the particular fix, since that seems to be the core issue for you).
In the mean time, I'll try to figure out what can I do to update scl.org independently of RHSCL.
Hello,
Attaching case #01693422 to this bug request to add some priority on this.
Ideally we would need ruby 2.2.5 or at least 2.2.3 on the next RHSCL version.
Alternatively we would need to present the customer(s) with an explanation why we cannot move to the next or more recent release.
Thank you,
George - GSS.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2016-2719.html
Description of problem: Named arguments seem broken in Ruby 2.2.2 Version-Release number of selected component (if applicable): 2.2.2 How reproducible: Always Steps to Reproduce: def test(arg1:, arg2:, **args); puts arg1.inspect; puts arg2.inspect; puts args.inspect; end; test arg1: "hi", arg2: "world", "arg3".to_sym => "again" # # Ruby 2.2.2 outputs: # "hi" # nil # {:arg3=>"again"} # # Ruby 2.2.3 outputs: # "hi" # "world" # {:arg3=>"again"} Additional info: Bug report https://bugs.ruby-lang.org/issues/11027. It would be useful if rh-ruby22 was upgraded to Ruby 2.2.3.