Skip to content
Browse files

`load` should also return the value from `super`

  • Loading branch information...
1 parent a10606c commit 29004de1a2ded5e8705d421ffe60ff6f631110b1 @tenderlove tenderlove committed Aug 23, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 activesupport/lib/active_support/dependencies.rb
View
4 activesupport/lib/active_support/dependencies.rb
@@ -229,7 +229,9 @@ def load_dependency(file)
end
def load(file, *)
- load_dependency(file) { super }
+ result = false
+ load_dependency(file) { result = super }
+ result
end
def require(file, *)

3 comments on commit 29004de

@dmathieu

load and require are the exact same methods. Why not having one of them as an alias ?

@josevalim
Ruby on Rails member
@dmathieu

Ok, thanks.

Please sign in to comment.
Something went wrong with that request. Please try again.