lib/maven/tools/coordinate.rb in maven-tools-1.0.3 vs lib/maven/tools/coordinate.rb in maven-tools-1.0.4
- old
+ new
@@ -140,10 +140,10 @@
end
def convert(arg, low = nil, high = nil)
if arg =~ /~>/
val = arg.sub(/~>\s*/, '')
- last = val.sub(/\.[0-9]*[a-z]+.*$/, '').sub(/\.[^.]+$/, '.99999')
+ last = val=~/\./ ? val.sub(/\.[0-9]*[a-z]+.*$/, '').sub(/\.[^.]+$/, '.99999') : '99999'
["[#{snapshot_version(val)}", "#{snapshot_version(last)}]"]
elsif arg =~ />=/
val = arg.sub(/>=\s*/, '')
["[#{snapshot_version(val)}", (nil || high)]
elsif arg =~ /<=/