Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-6341

SemanticPuppet::Dependency::ModuleRelease should implement operator eql? and operator '=='

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • PUP 4.6.0
    • None
    • None
    • Hide

      That SemanticPuppet does not fail spec tests on Runyby >= 2.3.0.

      Show
      That SemanticPuppet does not fail spec tests on Runyby >= 2.3.0.
    • 1
    • Language 2016-06-01
    • Bug Fix
    • Semantic Puppet (support for semver) gem was updated with fixes for problems on Ruby >= 2.3.0.

    Description

      The SemanticPuppet::Dependency::ModuleRelease class does not implement eql? or '==' which, when using Ruby versions >= 2.3.0 means that when compared using '==', it ends up in '<=>'. That method simply assumes that its argument is a SemanticPuppet::Dependency::ModuleRelease which then fails when a release is compared to something else. Example:

      mod_rel == nil
      

      results in the following error:

      undefined method `priority' for nil:NilClass
           # "./lib/semantic_puppet/dependency/module_release.rb:36:in `<=>'
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              thomas.hallgren Thomas Hallgren
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support