lib/semantic_range.rb in semantic_range-2.2.0 vs lib/semantic_range.rb in semantic_range-2.2.1

- old
+ new

@@ -228,17 +228,17 @@ def self.parse(version, loose = false) return version if version.is_a?(Version) return nil unless version.is_a?(String) - version.strip! + stripped_version = version.strip - return nil if version.length > MAX_LENGTH + return nil if stripped_version.length > MAX_LENGTH rxp = loose ? LOOSE : FULL - return nil if !rxp.match(version) + return nil if !rxp.match(stripped_version) - Version.new(version, loose) + Version.new(stripped_version, loose) end def self.increment!(version, release, loose, identifier) if loose.is_a? String identifier = loose