Skip to content

Commit

Permalink
[core] Fixed warnings: lib/rspec/core/metadata.rb:172: warning: Objec…
Browse files Browse the repository at this point in the history
…t#=~ is deprecated; it always returns nil (rspec/rspec-core#2582)

This commit was imported from rspec/rspec-core@5e6171e.
  • Loading branch information
walf443 authored and JonRowe committed Dec 10, 2018
1 parent 1469531 commit 8056725
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rspec-core/lib/rspec/core/metadata.rb
Expand Up @@ -169,7 +169,7 @@ def file_path_and_line_number_from(backtrace)
end

def description_separator(parent_part, child_part)
if parent_part.is_a?(Module) && child_part =~ /^(#|::|\.)/
if parent_part.is_a?(Module) && /^(?:#|::|\.)/.match(child_part.to_s)
''.freeze
else
' '.freeze
Expand Down

0 comments on commit 8056725

Please sign in to comment.