Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit 5e6171e

Browse files
walf443JonRowe
authored andcommitted
Fixed warnings: lib/rspec/core/metadata.rb:172: warning: Object#=~ is deprecated; it always returns nil (#2582)
1 parent f506d69 commit 5e6171e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rspec/core/metadata.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def file_path_and_line_number_from(backtrace)
169169
end
170170

171171
def description_separator(parent_part, child_part)
172-
if parent_part.is_a?(Module) && child_part =~ /^(#|::|\.)/
172+
if parent_part.is_a?(Module) && /^(?:#|::|\.)/.match(child_part.to_s)
173173
''.freeze
174174
else
175175
' '.freeze

0 commit comments

Comments
 (0)