Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Fix DepProxy == method #6669

Merged
merged 2 commits into from Aug 27, 2018
Merged

Fix DepProxy == method #6669

merged 2 commits into from Aug 27, 2018

Commits on Aug 23, 2018

  1. Fix DepProxy#== undefind method error

    DepProxy#== crashed with an undefind method error
    for anything other than a DepProxy class or nil
    as parameter. This was caused that it was assumed
    only DepProxy instances or nil can get passed as
    parameter. This commit implements checking the class
    as well and returns false if the classes are not
    the same.
    
    Fixes jruby/jruby#5280 travis-ci/travis-ci#9994
    ChrisBr committed Aug 23, 2018
    Copy the full SHA
    fd43f11 View commit details
    Browse the repository at this point in the history
  2. Fix DepProxy#hash calculation

    According to the official Ruby documentation, "the eql? method returns true if obj and other
    refer to the same hash key." This was not the case as the hash key of a DepProxy instance was
    only calculated based on the dep object but in the eql? method dep and platform attributes were
    computed. This caused that equal objects returned different hash keys.
    
    https://ruby-doc.org/core-2.5.1/Object.html#method-i-eql-3F
    ChrisBr committed Aug 23, 2018
    Copy the full SHA
    ce92868 View commit details
    Browse the repository at this point in the history