@@ -12,7 +12,7 @@ def new(*args)
1212 if low == high
1313 low
1414 else
15- super "#{ low || '[0' } ,#{ high || ')' } "
15+ super ( "#{ low || '[0' } ,#{ high || ')' } " )
1616 end
1717 end
1818 end
@@ -26,17 +26,17 @@ def convert(arg, low = nil, high = nil)
2626 [ "[#{ snapshot_version ( val ) } " , "#{ snapshot_version ( last ) } ]" ]
2727 elsif arg . include? ( '>=' )
2828 val = arg . sub ( />=\s */ , '' )
29- [ "[#{ snapshot_version ( val ) } " , ( nil || high ) ]
29+ [ "[#{ snapshot_version ( val ) } " , high ]
3030 elsif arg . include? ( '<=' )
3131 val = arg . sub ( /<=\s */ , '' )
32- [ ( nil || low ) , "#{ snapshot_version ( val ) } ]" ]
32+ [ low , "#{ snapshot_version ( val ) } ]" ]
3333 # treat '!' the same way as '>' since maven can not describe such range
3434 elsif /[!>]/ . match? ( arg )
3535 val = arg . sub ( /[!>]\s */ , '' )
36- [ "(#{ snapshot_version ( val ) } " , ( nil || high ) ]
36+ [ "(#{ snapshot_version ( val ) } " , high ]
3737 elsif arg . include? ( '<' )
3838 val = arg . sub ( /<\s */ , '' )
39- [ ( nil || low ) , "#{ snapshot_version ( val ) } )" ]
39+ [ low , "#{ snapshot_version ( val ) } )" ]
4040 elsif arg . include? ( '=' )
4141 val = arg . sub ( /=\s */ , '' )
4242 # for prereleased version pick the maven version (no version range)
@@ -133,12 +133,12 @@ def self.new(line)
133133
134134 if /[\[ ()\] ]/ . match? ( line )
135135 index = line . index ( /[\[ (].+$/ )
136- version = line [ index ..] . sub ( /:/ , ', ' )
137- line = line [ 0 ..index - 1 ] . strip . sub ( /:$/ , '' )
136+ version = line [ index ..] . sub ( ':' , ', ' )
137+ line = line [ 0 ..( index - 1 ) ] . strip . sub ( /:$/ , '' )
138138 else
139139 index = line . index ( /:[^:]+$/ )
140- version = line [ index + 1 ..]
141- line = line [ 0 ..index - 1 ] . strip
140+ version = line [ ( index + 1 ) ..]
141+ line = line [ 0 ..( index - 1 ) ] . strip
142142 end
143143
144144 case line . count ( ':' )
0 commit comments