lib/ruby-debug/commands/variables.rb in ruby-debug-ide19-0.4.11 vs lib/ruby-debug/commands/variables.rb in ruby-debug-ide19-0.4.12
- old
+ new
@@ -32,10 +32,16 @@
def regexp
/^\s*v(?:ar)?\s+g(?:lobal)?\s*$/
end
def execute
- print_variables(global_variables, 'global') do |var|
+ globals = []
+ if RUBY_VERSION < "1.9"
+ globals = global_variables
+ else
+ Debugger::without_stderr { globals = global_variables - [:$KCODE, :$=] }
+ end
+ print_variables(globals, 'global') do |var|
debug_eval(var)
end
end
class << self