Uploaded image for project: 'R10K'
  1. R10K
  2. RK-55

Ruby 2.2 emits warnings when using the :latest forge version

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: r10k 1.4.1
    • Fix Version/s: r10k 1.5.0
    • Component/s: None
    • Labels:
    • Environment:

      Ruby 2.2.0

    • Template:
    • Story Points:
      1

      Description

      (From https://github.com/puppetlabs/r10k/pull/355)

      In some cases, this code was comparing a SemVer object with :latest.
      The code in SemVer#<=> throws an exception in this case (tries to create
      a SemVer object with :latest) and Ruby used to silently treat this as
      <=> returning nil. This behavior has been deprecated in Ruby 2.2.

      On ruby 2.2, this is the deprecation warning that gets generated

      /opt/puppet/vendor/bundle/ruby/2.2.0/gems/r10k-1.4.1/lib/r10k/module/forge.rb:58: warning: Comparable#== will no more rescue exceptions of #<=> in the next release.
      /opt/puppet/vendor/bundle/ruby/2.2.0/gems/r10k-1.4.1/lib/r10k/module/forge.rb:58: warning: Return nil in #<=> if the comparison is inappropriate or avoid such comparison.
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            adrien Adrien Thebo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support