Permalink
Browse files

Pass __FILE__ when evaluating plugins' init.rb. Closes #2817.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2973 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
jeremy committed Nov 10, 2005
1 parent dfda57a commit 3488ff6fc6aa091821088df47ee0ca3ebdd594f0
Showing with 3 additions and 1 deletion.
  1. +2 −0 railties/CHANGELOG
  2. +1 −1 railties/lib/initializer.rb
View
@@ -1,5 +1,7 @@
*SVN*
+* Pass __FILE__ when evaluating plugins' init.rb. #2817 [james.adam@gmail.com]
+
* Better svn status matching for generators. #2814 [François Beausoleil <francois.beausoleil@gmail.com>, Blair Zajac <blair@orcaware.com>]
* Don't reload routes until plugins have been loaded so they have a chance to extend the routing capabilities [DHH]
@@ -306,7 +306,7 @@ def load_plugin(directory)
config = configuration
# Evaluate init.rb.
- silence_warnings { eval(IO.read(init_path), binding) } if has_init
+ silence_warnings { eval(IO.read(init_path), binding, init_path) } if has_init
# Add to set of loaded plugins.
loaded_plugins << name

0 comments on commit 3488ff6

Please sign in to comment.