class String # @param (String) req Gem version requirement # @return (Boolean) true if the given requirement is satisfied by the current # String def version_match?(req) Gem::Requirement.new(req) =~ Gem::Version.new(self) end end