diff options
author | Jean Boussier <jean.boussier@gmail.com> | 2016-06-10 11:34:18 -0400 |
---|---|---|
committer | Jean Boussier <jean.boussier@gmail.com> | 2016-06-10 11:34:18 -0400 |
commit | e8148a5cf401b677227397680c3d8a99ef747770 (patch) | |
tree | b7e970a2c4311798a1953c67c9e5fa7110934252 /activesupport/lib/active_support/core_ext | |
parent | 527200a456f50428984671f6ca41cb9e82077cb7 (diff) | |
download | rails-e8148a5cf401b677227397680c3d8a99ef747770.tar.gz rails-e8148a5cf401b677227397680c3d8a99ef747770.tar.bz2 rails-e8148a5cf401b677227397680c3d8a99ef747770.zip |
Replace Kernel#caller by the faster Kernel#caller_locations
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r-- | activesupport/lib/active_support/core_ext/module/delegation.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/delegation.rb b/activesupport/lib/active_support/core_ext/module/delegation.rb index 7f968d10b5..3f6e8bd26c 100644 --- a/activesupport/lib/active_support/core_ext/module/delegation.rb +++ b/activesupport/lib/active_support/core_ext/module/delegation.rb @@ -164,8 +164,8 @@ class Module '' end - file, line = caller(1, 1).first.split(':'.freeze, 2) - line = line.to_i + location = caller_locations(1, 1).first + file, line = location.path, location.lineno to = to.to_s to = "self.#{to}" if DELEGATION_RESERVED_METHOD_NAMES.include?(to) |