Bug 1369090 - Ruby 2.2.2 function argument bug fixed in 2.2.3 [rhscl-2.2.z]
Summary: Ruby 2.2.2 function argument bug fixed in 2.2.3 [rhscl-2.2.z]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Software Collections
Classification: Red Hat
Component: ruby
Version: rh-ruby22
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
: 2.4
Assignee: Vít Ondruch
QA Contact: Iveta Wiedermann
URL:
Whiteboard:
Depends On: 1390501
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-22 13:13 UTC by Trey Dockendorf
Modified: 2019-12-16 06:26 UTC (History)
8 users (show)

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.
Clone Of:
: 1390501 (view as bug list)
Environment:
Last Closed: 2016-11-15 07:18:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1280296 0 unspecified CLOSED Rebase to the latest Ruby 2.2 point release 2021-06-10 11:02:46 UTC
Red Hat Product Errata RHBA-2016:2719 0 normal SHIPPED_LIVE rh-ruby22 bug fix update 2016-11-15 12:17:24 UTC
Ruby 11027 0 None None None 2016-08-24 12:57:04 UTC

Internal Links: 1280296

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


Note You need to log in before you can comment on or make changes to this bug.