Bug 1421056
Summary: | IPAddr eql? bug still present | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Neil Wilson <neil> |
Component: | ruby | Assignee: | ruby maint <ruby-maint> |
Status: | CLOSED WONTFIX | QA Contact: | BaseOS QE - Apps <qe-baseos-apps> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.8 | CC: | vondruch |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-02-10 09:48:34 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: |
Description
Neil Wilson
2017-02-10 09:11:12 UTC
Neil, thank you for your ticket. You are right, in this case, the example you provided compares if it is actually the same object, e.g.: ~~~ $ ruby -ripaddr -e 'ip = IPAddr.new("192.168.1.0/30"); p ip == ip' ~~~ which is not very useful in most cases. And this [1] seems to be the commit which "fixed" the behavior. However, I am not sure it is worth of the change at this point, since: 1) The behavior was changed during Ruby 1.8.7 maintenance period, but it was never backported for Ruby 1.8.7 by upstream. 2) Also, considering RHEL6 release cycle, I don't see too much options to push this fix. I am going to CLOSE WONTFIX the issue for now, but please don't hesitate to contact Red Hat support, so we might reconsider in case this turns to be important. Thank you. [1] https://github.com/ruby/ruby/commit/61c11677c8ee20e07dea84a5a3bf8b68ff449188 Forgot to mention, that on RHEL6, you might consider to try Red Hat Software Collections, which provides more recent versions of Ruby. The workaround on array diff is fairly straightforward. Rather than: source - dest do: source.clone.delete_if {|e| dest.include? e} This uses '==' equality rather than 'eql?' equality and it works as expected. |