diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2013-11-14 15:31:27 -0800 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2013-11-14 15:31:27 -0800 |
commit | 07996ebc50f5906dbecc481ac83ed2adefc9ec6e (patch) | |
tree | a6275a518624722710cae2aa29ae18d5b4204cc9 /railties/lib | |
parent | 421c81bd1875eb4e163bea8ce18b1ae9c2224e7d (diff) | |
download | rails-07996ebc50f5906dbecc481ac83ed2adefc9ec6e.tar.gz rails-07996ebc50f5906dbecc481ac83ed2adefc9ec6e.tar.bz2 rails-07996ebc50f5906dbecc481ac83ed2adefc9ec6e.zip |
Revert "Used Yield instead of block.call" -- this causes all of atom_feed_helper_test.rb to fail with "SystemStackError: stack level too deep".
This reverts commit d3a1ce1cdc60d593de1682c5f4e3230c8db9a0fd.
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/actions.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/actions.rb b/railties/lib/rails/generators/actions.rb index 4757c79ac6..366c72ebaa 100644 --- a/railties/lib/rails/generators/actions.rb +++ b/railties/lib/rails/generators/actions.rb @@ -84,10 +84,10 @@ module Rails # environment(nil, env: "development") do # "config.autoload_paths += %W(#{config.root}/extras)" # end - def environment(data = nil, options = {}) + def environment(data=nil, options={}, &block) sentinel = /class [a-z_:]+ < Rails::Application/i env_file_sentinel = /Rails\.application\.configure do/ - data = yield if !data && block_given? + data = block.call if !data && block_given? in_root do if options[:env].nil? |