lib/rubocop/cop/gemspec/required_ruby_version.rb in rubocop-0.85.1 vs lib/rubocop/cop/gemspec/required_ruby_version.rb in rubocop-0.86.0
- old
+ new
@@ -62,10 +62,10 @@
private
def extract_ruby_version(required_ruby_version)
if required_ruby_version.array_type?
required_ruby_version = required_ruby_version.children.detect do |v|
- v.str_content =~ /[>=]/
+ /[>=]/.match?(v.str_content)
end
end
required_ruby_version.str_content.match(/(\d\.\d)/)[1]
end