Bug ID | 933470 |
---|---|
Summary | yast tests: Comparable#== will no more rescue exceptions of #<=> in the next release. |
Classification | openSUSE |
Product | openSUSE Factory |
Version | 201505* |
Hardware | Other |
OS | Other |
Status | NEW |
Severity | Normal |
Priority | P5 - None |
Component | YaST2 |
Assignee | mvidner@suse.com |
Reporter | mvidner@suse.com |
QA Contact | jsrain@suse.com |
CC | jreidinger@suse.com |
Found By | Development |
Blocker | --- |
When running YaST RSpec tests under Ruby 2.2, many messages appear of the form /usr/lib64/ruby/gems/2.2.0/gems/rspec-mocks-3.2.1/lib/rspec/mocks/argument_list_matcher.rb:84: warning: Comparable#== will no more rescue exceptions of #<=> in the next release. /usr/lib64/ruby/gems/2.2.0/gems/rspec-mocks-3.2.1/lib/rspec/mocks/argument_list_matcher.rb:84: warning: Return nil in #<=> if the comparison is inappropriate or avoid such comparison. /usr/lib64/ruby/gems/2.2.0/gems/rspec-support-3.2.2/lib/rspec/support/fuzzy_matcher.rb:15: warning: Comparable#== will no more rescue exceptions of #<=> in the next release. /usr/lib64/ruby/gems/2.2.0/gems/rspec-support-3.2.2/lib/rspec/support/fuzzy_matcher.rb:15: warning: Return nil in #<=> if the comparison is inappropriate or avoid such comparison. This is a result of a fix in the Ruby core library: https://bugs.ruby-lang.org/issues/7688 It is trying to tell us that a "<=>" operation is raising an exception. I have identified Yast::Path#<=> as one of the culprits: it assumes that the `other` object is a Path too: https://github.com/yast/yast-ruby-bindings/blob/7f6545d5185aa3d3d49d907b5df08c3859d9c83b/src/ruby/yast/path.rb#L47