summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-05-07 17:29:24 -0600
committermo khan <mo.khan@gmail.com>2020-05-07 17:29:24 -0600
commit74f4dfd70afdbf2d73905a00dda32bd3abef299a (patch)
treed13925d8c1be6f63b160af77a95191d126e00e86 /lib
parentcc9eda11425e6f6ec3243fbcd768c4e2a37adf2a (diff)
Remove parens and fix bug with squeeze
Diffstat (limited to 'lib')
-rw-r--r--lib/spandx/spdx/composite_license.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/spandx/spdx/composite_license.rb b/lib/spandx/spdx/composite_license.rb
index e429778..9f44128 100644
--- a/lib/spandx/spdx/composite_license.rb
+++ b/lib/spandx/spdx/composite_license.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module Spandx
module Spdx
@@ -12,14 +13,14 @@ module Spandx
def initialize(tree, catalogue)
@catalogue = catalogue
@tree = tree
- super({ })
+ super({})
end
def id
if right
- ["(#{left.id}", operator, "#{right.id})"].compact.join(' ').squeeze(' ').strip
+ [left.id, operator, right.id].compact.join(' ').squeeze(' ').strip
else
- "#{left.id}"
+ left.id.to_s
end
end