提交 35c50bf9 编写于 作者: M Michael Koziarski

Fix problems with the plugin loader where plugins could override 'name' and...

Fix problems with the plugin loader where plugins could override 'name' and prevent loading.  Closes #3297



git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3414 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 30c6bd9b
*SVN*
* Corrected problems with plugin loader where plugins set 'name' incorrectly #3297 [anna@wota.jp]
* Make migration generator only report on exact duplicate names, not partial dupliate names. #3442 [jeremy@planetargon.com Marcel Molina Jr.]
* Fix typo in mailer generator USAGE. #3458 [chriztian.steinmeier@gmail.com]
......
......@@ -310,12 +310,13 @@ def load_plugin(directory)
# Allow plugins to reference the current configuration object
config = configuration
# Add to set of loaded plugins before 'name' collapsed in eval.
loaded_plugins << name
# Evaluate init.rb.
silence_warnings { eval(IO.read(init_path), binding, init_path) } if has_init
# Add to set of loaded plugins.
loaded_plugins << name
true
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册