aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2009-11-23 15:36:48 -0600
committerDavid Heinemeier Hansson <david@loudthinking.com>2009-11-23 15:36:48 -0600
commit35eda7d6d2ea13b4e42eeea9f11245e22c245fc2 (patch)
treece4189f1d07c659d8ef3ec220cba511c52c98e93 /railties
parent78790e47b8603917e2f2352f973a2de7769cb74b (diff)
downloadrails-35eda7d6d2ea13b4e42eeea9f11245e22c245fc2.tar.gz
rails-35eda7d6d2ea13b4e42eeea9f11245e22c245fc2.tar.bz2
rails-35eda7d6d2ea13b4e42eeea9f11245e22c245fc2.zip
Fixed that the debugger wouldn't go into IRB mode because of left-over ARGVs [DHH]
Diffstat (limited to 'railties')
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/lib/rails/rack/debugger.rb2
2 files changed, 4 insertions, 0 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index d6311f77a0..66e0d5e9c5 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,5 +1,7 @@
*Edge*
+* Fixed that the debugger wouldn't go into IRB mode because of left-over ARGVs [DHH]
+
* I18n support for plugins. #2325 [Antonio Tapiador, Sven Fuchs]
* Ruby 1.9: use UTF-8 for default internal and external encodings. [Jeremy Kemper]
diff --git a/railties/lib/rails/rack/debugger.rb b/railties/lib/rails/rack/debugger.rb
index aa2711c616..0a7b405553 100644
--- a/railties/lib/rails/rack/debugger.rb
+++ b/railties/lib/rails/rack/debugger.rb
@@ -4,6 +4,8 @@ module Rails
def initialize(app)
@app = app
+ ARGV.clear # clear ARGV so that script/server options aren't passed to IRB
+
require_library_or_gem 'ruby-debug'
::Debugger.start
::Debugger.settings[:autoeval] = true if ::Debugger.respond_to?(:settings)