diff options
author | bogdanvlviv <bogdanvlviv@gmail.com> | 2018-04-20 01:17:14 +0300 |
---|---|---|
committer | bogdanvlviv <bogdanvlviv@gmail.com> | 2018-04-20 01:24:46 +0300 |
commit | f8cbc1dd6e186f9e077d101653f5b56deb740503 (patch) | |
tree | d687c47067927bc4d5a6c929e7eca50a8f9092e2 /activerecord | |
parent | d26f48a57453844ad81503fe71ba24a1d2a1a1b7 (diff) | |
download | rails-f8cbc1dd6e186f9e077d101653f5b56deb740503.tar.gz rails-f8cbc1dd6e186f9e077d101653f5b56deb740503.tar.bz2 rails-f8cbc1dd6e186f9e077d101653f5b56deb740503.zip |
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.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/log_subscriber.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/log_subscriber.rb b/activerecord/lib/active_record/log_subscriber.rb index 9234029c22..013c3765b2 100644 --- a/activerecord/lib/active_record/log_subscriber.rb +++ b/activerecord/lib/active_record/log_subscriber.rb @@ -125,7 +125,7 @@ module ActiveRecord ] end - RAILS_GEM_ROOT = File.expand_path("../../../..", __FILE__) + "/" + RAILS_GEM_ROOT = File.expand_path("../../..", __dir__) + "/" def ignored_callstack(path) path.start_with?(RAILS_GEM_ROOT) || |