Bug 1369090

Summary: Ruby 2.2.2 function argument bug fixed in 2.2.3 [rhscl-2.2.z]
Product: Red Hat Software Collections Reporter: Trey Dockendorf <treydock>
Component: rubyAssignee: Vít Ondruch <vondruch>
Status: CLOSED ERRATA QA Contact: Iveta Wiedermann <isenfeld>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rh-ruby22CC: aglotov, gagriogi, hhorak, isenfeld, kanderso, lkuprova, pvalena, vondruch
Target Milestone: ---   
Target Release: 2.4   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: rh-ruby22-ruby-2.2.2-16.el6, rh-ruby22-ruby-2.2.2-16.el7 Doc Type: Bug Fix
Doc Text:
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.
Story Points: ---
Clone Of:
: 1390501 (view as bug list) Environment:
Last Closed: 2016-11-15 07:18:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1390501    
Bug Blocks:    

Description Trey Dockendorf 2016-08-22 13:13:46 UTC
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.

Comment 1 Vít Ondruch 2016-08-24 13:05:18 UTC
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.

Comment 2 Vít Ondruch 2016-08-29 12:12:17 UTC
I am reassigning this to RHSCL product, since this seems to be the only viable way how to resolve this.

Comment 3 gagriogi 2016-08-30 10:38:43 UTC
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.

Comment 15 errata-xmlrpc 2016-11-15 07:18:18 UTC
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