From e8148a5cf401b677227397680c3d8a99ef747770 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Fri, 10 Jun 2016 11:34:18 -0400 Subject: Replace Kernel#caller by the faster Kernel#caller_locations --- activesupport/lib/active_support/core_ext/module/delegation.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport/lib/active_support/core_ext/module/delegation.rb') 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) -- cgit v1.2.3