Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f4780bc

Browse files
authored
3.4 quoted locations start with single quotes (#719)
As best I can tell, there's been a change to the output of Ruby's stack traces in `caller` - they now start with a 'normal' single quote, instead of a backtick. This pattern now handles both, to ensure backwards compatibility.
1 parent 1f5946a commit f4780bc

File tree

1 file changed

+1
-1
lines changed
  • lib/database_cleaner
    • deprecation.rb

1 file changed

+1
-1
lines changed

lib/database_cleaner/deprecation.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module DatabaseCleaner
22
def deprecate message
3-
method = caller.first[/\d+:in `(.*)'$/, 1].to_sym
3+
method = caller.first[/\d+:in [`'](.*)'$/, 1].to_sym
44
@@deprecator ||= Deprecator.new
55
@@deprecator.deprecate method, message
66
end

0 commit comments

Comments
(0)