Permalink
Browse files

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

  • Loading branch information...
tenderlove committed Aug 24, 2011
1 parent a10606c commit 29004de1a2ded5e8705d421ffe60ff6f631110b1
Showing with 3 additions and 1 deletion.
  1. +3 −1 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

This comment has been minimized.

Show comment
Hide comment
@dmathieu

dmathieu Aug 24, 2011

Contributor

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

Contributor

dmathieu replied Aug 24, 2011

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

@josevalim

This comment has been minimized.

Show comment
Hide comment
@josevalim

josevalim Aug 24, 2011

Contributor
Contributor

josevalim replied Aug 24, 2011

@dmathieu

This comment has been minimized.

Show comment
Hide comment
@dmathieu

dmathieu Aug 24, 2011

Contributor

Ok, thanks.

Contributor

dmathieu replied Aug 24, 2011

Ok, thanks.

Please sign in to comment.