From 35c50bf93822d8af19b9bc1959a38a1bb8af67b7 Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Fri, 13 Jan 2006 09:40:05 +0000 Subject: 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 --- railties/CHANGELOG | 2 ++ railties/lib/initializer.rb | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/railties/CHANGELOG b/railties/CHANGELOG index eae7083fdd..3dff1ce5ba 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *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] diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index d8b951b284..a7230f5cf7 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -310,12 +310,13 @@ module Rails # 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 -- cgit v1.2.3