Skip to content

Commit

Permalink
3.4 quoted locations start with single quotes (#719)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pat authored Mar 10, 2025
1 parent 1f5946a commit f4780bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/database_cleaner/deprecation.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module DatabaseCleaner
def deprecate message
method = caller.first[/\d+:in `(.*)'$/, 1].to_sym
method = caller.first[/\d+:in [`'](.*)'$/, 1].to_sym
@@deprecator ||= Deprecator.new
@@deprecator.deprecate method, message
end
Expand Down

0 comments on commit f4780bc

Please sign in to comment.