Skip to content
This repository
Browse code

Add the gem load paths before the framework is loaded, so certain gem…

…s like RedCloth and BlueCloth can be frozen. [#320 state:resolved]
  • Loading branch information...
commit 51e4106dcc58e5218e8b297ad870a063b7bb1ab8 1 parent faad1e3
risk danger olson technoweenie authored

Showing 2 changed files with 6 additions and 4 deletions. Show diff stats Hide diff stats

  1. +2 0  railties/CHANGELOG
  2. +4 4 railties/lib/initializer.rb
2  railties/CHANGELOG
... ... @@ -1,5 +1,7 @@
1 1 *Edge*
2 2
  3 +* Add the gem load paths before the framework is loaded, so certain gems like RedCloth and BlueCloth can be frozen.
  4 +
3 5 * Fix discrepancies with loading rails/init.rb from gems.
4 6
5 7 * Plugins check for the gem init path (rails/init.rb) before the standard plugin init path (init.rb) [Jacek Becela]
8 railties/lib/initializer.rb
@@ -113,10 +113,10 @@ def process
113 113 check_ruby_version
114 114 install_gem_spec_stubs
115 115 set_load_path
116   -
  116 + add_gem_load_paths
  117 +
117 118 require_frameworks
118 119 set_autoload_paths
119   - add_gem_load_paths
120 120 add_plugin_load_paths
121 121 load_environment
122 122
@@ -242,12 +242,12 @@ def add_plugin_load_paths
242 242 def add_gem_load_paths
243 243 unless @configuration.gems.empty?
244 244 require "rubygems"
245   - @configuration.gems.each &:add_load_paths
  245 + @configuration.gems.each { |gem| gem.add_load_paths }
246 246 end
247 247 end
248 248
249 249 def load_gems
250   - @configuration.gems.each(&:load)
  250 + @configuration.gems.each { |gem| gem.load }
251 251 end
252 252
253 253 def check_gem_dependencies

0 comments on commit 51e4106

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