Skip to content

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

1 file changed

+1
-1
lines changed

lib/database_cleaner/deprecation.rb

+1-1
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)