lib/ruby-debug/commands/variables.rb in ruby-debug-ide-0.4.11 vs lib/ruby-debug/commands/variables.rb in ruby-debug-ide-0.4.16
- old
+ new
@@ -32,12 +32,16 @@
def regexp
/^\s*v(?:ar)?\s+g(?:lobal)?\s*$/
end
def execute
- # Avoid accessing deprecated global $= and its alias $IGNORECASE,
- # as doing so triggers a spurious warning on JRuby.
- print_variables(global_variables - ['$=', '$IGNORECASE'], 'global') do |var|
+ globals = []
+ if RUBY_VERSION < "1.9"
+ globals = global_variables - ['$=', '$IGNORECASE']
+ else
+ globals = global_variables - [:$KCODE, :$-K, :$=, :$FILENAME]
+ end
+ print_variables(globals, 'global') do |var|
debug_eval(var)
end
end
class << self