Skip to content

Commit 3cf798d

Browse files
committed
::Kernel.binding doesn't work for ruby 1.8 should use binding instead
1 parent 0990c7a commit 3cf798d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/ruby-debug-ide/commands/variables.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ def help(cmd)
5959
end
6060

6161
class VarInstanceCommand < Command # :nodoc:
62-
# TODO: try to find out a way to use Kernel.binding
63-
BINDING_COMMAND = (defined? Rubinius) ? 'binding' : '::Kernel.binding'
62+
# TODO: try to find out a way to use Kernel.binding for Rubinius
63+
# ::Kernel.binding doesn't for for ruby 1.8 (see RUBY-14679)
64+
BINDING_COMMAND = (defined?(Rubinius) || RUBY_VERSION < '1.9') ? 'binding' : '::Kernel.binding'
6465

6566
def regexp
6667
# id will be read as first match, name as post match

0 commit comments

Comments
 (0)