lib/buildr4osgi/osgi/version.rb in buildr4osgi-0.9.2 vs lib/buildr4osgi/osgi/version.rb in buildr4osgi-0.9.3
- old
+ new
@@ -89,10 +89,10 @@
# Parses a string into a VersionRange.
# Returns false if the string could not be parsed.
#
def self.parse(string, max_infinite = false)
return string if string.is_a?(VersionRange) || string.is_a?(Version)
- if !string.nil? && (match = string.match /\s*([\[|\(])([0-9|\.]*),([0-9|\.]*)([\]|\)])/)
+ if !string.nil? && (match = string.match /\s*([\[|\(])([0-9|A-z|\.]*)\s*,\s*([0-9|A-z|\.]*)([\]|\)])/)
range = VersionRange.new
range.min = Version.new(match[2])
range.max = Version.new(match[3])
range.min_inclusive = match[1] == '['
range.max_inclusive = match[4] == ']'
\ No newline at end of file