From 45137795e8db0c47c0bc16712b0a24807459e252 Mon Sep 17 00:00:00 2001
From: David Heinemeier Hansson <david@loudthinking.com>
Date: Fri, 25 Mar 2005 09:07:01 +0000
Subject: Fixed that MissingSourceFile's wasn't properly detected in production
 mode #925 [Nicholas Seckar]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@990 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
---
 activesupport/lib/active_support/core_ext/load_error.rb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'activesupport/lib')

diff --git a/activesupport/lib/active_support/core_ext/load_error.rb b/activesupport/lib/active_support/core_ext/load_error.rb
index 42f2d42e78..a04c4215d4 100644
--- a/activesupport/lib/active_support/core_ext/load_error.rb
+++ b/activesupport/lib/active_support/core_ext/load_error.rb
@@ -4,6 +4,10 @@ class MissingSourceFile < LoadError
     super(message)
     @path = path
   end
+
+  def is_missing?(path)
+    path.gsub(/\.rb$/, '') == self.path.gsub(/\.rb$/, '')
+  end
   
   def self.from_message(message)
     REGEXPS.each do |regexp, capture|
@@ -31,4 +35,4 @@ module ActiveSupport
       ::LoadError.extend(LoadErrorClassMethods)
     end
   end
-end
\ No newline at end of file
+end
-- 
cgit v1.2.3