Skip to content

Commit

Permalink
Fixed warnings: lib/rspec/core/metadata.rb:172: warning: Object#=~ is…
Browse files Browse the repository at this point in the history
… deprecated; it always returns nil (rspec#2582)
  • Loading branch information
walf443 authored and JonRowe committed Dec 10, 2018
1 parent 85d60b9 commit 6a8169f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 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 6a8169f

Please sign in to comment.