From 4ad1a52f5ac0f2ee143aa5db05def6596ee6ffb0 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Tue, 17 Jan 2017 18:16:21 +0900 Subject: All currently supported rubies already have LoadError#path --- activesupport/lib/active_support/core_ext/load_error.rb | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/activesupport/lib/active_support/core_ext/load_error.rb b/activesupport/lib/active_support/core_ext/load_error.rb index 029d6dd449..d273487010 100644 --- a/activesupport/lib/active_support/core_ext/load_error.rb +++ b/activesupport/lib/active_support/core_ext/load_error.rb @@ -6,18 +6,6 @@ class LoadError /^cannot load such file -- (.+)$/i, ] - unless method_defined?(:path) - # Returns the path which was unable to be loaded. - def path - @path ||= begin - REGEXPS.find do |regex| - message =~ regex - end - $1 - end - end - end - # Returns true if the given path name (except perhaps for the ".rb" # extension) is the missing file which caused the exception to be raised. def is_missing?(location) -- cgit v1.2.3