aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2014-04-04 04:29:50 +1030
committerMatthew Draper <matthew@trebex.net>2014-04-04 04:29:50 +1030
commit272f7c29e2105f33a6f4131cfaf423bfd05b6040 (patch)
treeab567f70f69257a9b380a0c6f5e31690f433a7cd
parent7e6630329ec071d921b831f379364329ff6916e0 (diff)
downloadrails-272f7c29e2105f33a6f4131cfaf423bfd05b6040.tar.gz
rails-272f7c29e2105f33a6f4131cfaf423bfd05b6040.tar.bz2
rails-272f7c29e2105f33a6f4131cfaf423bfd05b6040.zip
Explicitly load Kernel#y when starting a console
Previously, we relied on the IRB-detection in Psych itself. But that doesn't work when we're running under spring: the application boots (and thus psych is required) before we switch to console mode and load IRB. Fixes #14587.
-rw-r--r--railties/lib/rails/engine.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb
index 5661094d95..c38cc3b5e5 100644
--- a/railties/lib/rails/engine.rb
+++ b/railties/lib/rails/engine.rb
@@ -430,6 +430,7 @@ module Rails
# Check <tt>Rails::Railtie.console</tt> for more info.
def load_console(app=self)
require "pp"
+ require "psych/y"
require "rails/console/app"
require "rails/console/helpers"
run_console_blocks(app)