diff options
| author | mo khan <mo@mokhan.ca> | 2021-05-10 21:38:20 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2021-05-10 21:38:20 -0600 |
| commit | 9261f2e5f700aedcb2228f5c88190cc6f7d666f3 (patch) | |
| tree | 4b208c407801f0506a461b0d033d6dca5e01b927 | |
| parent | 22aaf836c25c47f5f8b6bfa3120c9336406dd57f (diff) | |
find the needle
| -rw-r--r-- | lib/spandx/core/dependency.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/spandx/core/dependency.rb b/lib/spandx/core/dependency.rb index 3283f0a..3ae1f10 100644 --- a/lib/spandx/core/dependency.rb +++ b/lib/spandx/core/dependency.rb @@ -33,8 +33,9 @@ module Spandx return 1 if other.nil? score = (name <=> other.name) - score = score&.zero? ? (version <=> other&.version) : score - score&.zero? ? (path.to_s <=> other&.path.to_s) : score + puts [score, name, other.name].inspect if score.nil? + score = score.zero? ? (version <=> other&.version) : score + score.zero? ? (path.to_s <=> other&.path.to_s) : score end def hash |
