Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Raise LoadErrors separately

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@510 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 11611c1b002243a766c86c374b812c61a5b672c7 1 parent be80d46
@dhh dhh authored
View
2  actionpack/lib/action_controller/helpers.rb
@@ -96,7 +96,7 @@ def inherited(child)
inherited_without_helper(child)
begin
child.helper(child.controller_name)
- rescue Object
+ rescue NameError, LoadError
# No default helper available for this controller
end
end
View
4 activesupport/lib/dependencies.rb
@@ -18,8 +18,10 @@ def depend_on(file_name, swallow_load_errors = false)
loaded << file_name
begin
require_or_load(file_name)
+ rescue LoadError
+ raise unless swallow_load_errors
rescue Object => e
- raise ScriptError, "#{e.message}" unless e.is_a?(LoadError) && swallow_load_errors
+ raise ScriptError, "#{e.message}"
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.