class String # @param req [String] Gem version requirement # @return [true] if the given requirement is satisfied by the current String # @return [false] otherwise # @see http://rubydoc.info/github/rubygems/rubygems/Gem/Requirement Gem::Requirement # @see http://rubydoc.info/github/rubygems/rubygems/Gem/Version Gem::Version def version_match?(req) Gem::Requirement.new(req) =~ Gem::Version.new(self) end end