From f8cbc1dd6e186f9e077d101653f5b56deb740503 Mon Sep 17 00:00:00 2001 From: bogdanvlviv Date: Fri, 20 Apr 2018 01:17:14 +0300 Subject: Return back "/" to the end of RAILS_GEM_ROOT - The "/" was removed in 40bdbce191ad90dfea43dad51fac5c4726b89392 during refactoring. It may cause regression since looks like was added intentionaly because it is possible that a name of any another gem can start with /rails/, so slash was added to ensure that it is "rails" gem. I would like to backport this to `5-2-stable` too. - Use `__dir__` instead of `__FILE__`. Follow up #29176. --- activesupport/lib/active_support/deprecation/reporting.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/deprecation/reporting.rb b/activesupport/lib/active_support/deprecation/reporting.rb index 2c004f4c9e..7075b5b869 100644 --- a/activesupport/lib/active_support/deprecation/reporting.rb +++ b/activesupport/lib/active_support/deprecation/reporting.rb @@ -104,7 +104,7 @@ module ActiveSupport end end - RAILS_GEM_ROOT = File.expand_path("../../../..", __dir__) + RAILS_GEM_ROOT = File.expand_path("../../../..", __dir__) + "/" def ignored_callstack(path) path.start_with?(RAILS_GEM_ROOT) || path.start_with?(RbConfig::CONFIG["rubylibdir"]) -- cgit v1.2.3