Jira (PUP-11866) Puppet-resource_api bug with ruby 3.2 and integer munging

2 views
Skip to first unread message

Christopher Thorn (Jira)

unread,
May 24, 2023, 4:06:02 PM5/24/23
to puppe...@googlegroups.com
Christopher Thorn created an issue
 
Puppet / Bug PUP-11866
Puppet-resource_api bug with ruby 3.2 and integer munging
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2023/05/24 1:05 PM
Priority: Normal Normal
Reporter: Christopher Thorn

Github user Hajee has submitted the following issue:

In Ruby 3.2, the Integer and float data type no longer supports the =~ operator. Causing correct values passed to te munger to fail.

Running the unit tests on Ruby 3.2 shows all these errors. The log is attached to this issue.

In the linked issue there is an attached log of specs running with a number of failures, here is an example of one:

  11) Puppet::ResourceApi::DataTypeHandling#try_mungify(type, value) with a Optional[Float] type with 1 as value returns no value
      Failure/Error: if value =~ %r{^-?\d+$} || value =~ Puppet::Pops::Patterns::NUMERIC
 
      NoMethodError:
        undefined method `=~' for 1:Integer

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.21#820021-sha1:38274c8)
Atlassian logo

Tony Vu (Jira)

unread,
May 30, 2023, 4:09:03 PM5/30/23
to puppe...@googlegroups.com
Tony Vu updated an issue
Change By: Tony Vu
Epic Link: PUP-11660

Josh Cooper (Jira)

unread,
May 30, 2023, 4:10:01 PM5/30/23
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages