aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorDavid Rodríguez de Dios <deivid.rodriguez@gmail.com>2014-04-10 16:02:13 +0200
committerDavid Rodríguez de Dios <deivid.rodriguez@gmail.com>2014-04-10 16:02:13 +0200
commit6fae9ac58147948474c3fa472f0eb04525737d45 (patch)
tree677099bc2ca30b16f99c6d204022e36a4627ff2b /railties/lib
parenteb2d555f5c2e504f9de73dd083f148336f5ffa19 (diff)
downloadrails-6fae9ac58147948474c3fa472f0eb04525737d45.tar.gz
rails-6fae9ac58147948474c3fa472f0eb04525737d45.tar.bz2
rails-6fae9ac58147948474c3fa472f0eb04525737d45.zip
Isolate debugger related code
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/commands/console.rb24
1 files changed, 13 insertions, 11 deletions
diff --git a/railties/lib/rails/commands/console.rb b/railties/lib/rails/commands/console.rb
index fdc8662bcd..555d8f31e1 100644
--- a/railties/lib/rails/commands/console.rb
+++ b/railties/lib/rails/commands/console.rb
@@ -76,9 +76,19 @@ module Rails
Rails.env = environment
end
- def debugger?
- options[:debugger]
- end if RUBY_VERSION < '2.0.0'
+ if RUBY_VERSION < '2.0.0'
+ def debugger?
+ options[:debugger]
+ end
+
+ def require_debugger
+ require 'debugger'
+ puts "=> Debugger enabled"
+ rescue LoadError
+ puts "You're missing the 'debugger' gem. Add it to your Gemfile, bundle it and try again."
+ exit(1)
+ end
+ end
def start
if RUBY_VERSION < '2.0.0'
@@ -99,13 +109,5 @@ module Rails
end
console.start
end
-
- def require_debugger
- require 'debugger'
- puts "=> Debugger enabled"
- rescue LoadError
- puts "You're missing the 'debugger' gem. Add it to your Gemfile, bundle it and try again."
- exit(1)
- end if RUBY_VERSION < '2.0.0'
end
end