diff --git a/lib/debug/limited_pp.rb b/lib/debug/limited_pp.rb new file mode 100644 index 000000000..b2359e40a --- /dev/null +++ b/lib/debug/limited_pp.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +require "pp" + +module DEBUGGER__ + class LimitedPP + SHORT_INSPECT_LENGTH = 40 + + def self.pp(obj, max = 80) + out = self.new(max) + catch out do + ::PP.singleline_pp(obj, out) + end + out.buf + end + + attr_reader :buf + + def initialize max + @max = max + @cnt = 0 + @buf = String.new + end + + def <<(other) + @buf << other + + if @buf.size >= @max + @buf = @buf[0..@max] + '...' + throw self + end + end + + def self.safe_inspect obj, max_length: SHORT_INSPECT_LENGTH, short: false + if short + LimitedPP.pp(obj, max_length) + else + obj.inspect + end + rescue NoMethodError => e + klass, oid = M_CLASS.bind_call(obj), M_OBJECT_ID.bind_call(obj) + if obj == (r = e.receiver) + "<\##{klass.name}#{oid} does not have \#inspect>" + else + rklass, roid = M_CLASS.bind_call(r), M_OBJECT_ID.bind_call(r) + "<\##{klass.name}:#{roid} contains <\##{rklass}:#{roid} and it does not have #inspect>" + end + rescue Exception => e + "<#inspect raises #{e.inspect}>" + end + end +end diff --git a/lib/debug/server_cdp.rb b/lib/debug/server_cdp.rb index d4e012fe2..9de276c7f 100644 --- a/lib/debug/server_cdp.rb +++ b/lib/debug/server_cdp.rb @@ -9,6 +9,7 @@ require 'tmpdir' require 'tempfile' require 'timeout' +require_relative 'variable_inspector' module DEBUGGER__ module UI_CDP @@ -1112,46 +1113,31 @@ def process_cdp args event! :protocol_result, :scope, req, vars when :properties oid = args.shift - result = [] - prop = [] - if obj = @obj_map[oid] - case obj - when Array - result = obj.map.with_index{|o, i| - variable i.to_s, o - } - when Hash - result = obj.map{|k, v| - variable(k, v) - } - when Struct - result = obj.members.map{|m| - variable(m, obj[m]) - } - when String - prop = [ - internalProperty('#length', obj.length), - internalProperty('#encoding', obj.encoding) - ] - when Class, Module - result = obj.instance_variables.map{|iv| - variable(iv, obj.instance_variable_get(iv)) - } - prop = [internalProperty('%ancestors', obj.ancestors[1..])] - when Range - prop = [ - internalProperty('#begin', obj.begin), - internalProperty('#end', obj.end), - ] + if @obj_map.key?(oid) + obj = @obj_map[oid] + + members = if Array === obj + VariableInspector.new.indexed_members_of(obj, start: 0, count: obj.size) + else + VariableInspector.new.named_members_of(obj) end - result += M_INSTANCE_VARIABLES.bind_call(obj).map{|iv| - variable(iv, M_INSTANCE_VARIABLE_GET.bind_call(obj, iv)) - } - prop += [internalProperty('#class', M_CLASS.bind_call(obj))] + result = members.filter_map do |member| + next if member.internal? + variable(member.name, member.value) + end + + internal_properties = members.filter_map do |member| + next unless member.internal? + internalProperty(member.name, member.value) + end + else + result = [] + internal_properties = [] end - event! :protocol_result, :properties, req, result: result, internalProperties: prop + + event! :protocol_result, :properties, req, result: result, internalProperties: internal_properties when :exception oid = args.shift exc = nil diff --git a/lib/debug/server_dap.rb b/lib/debug/server_dap.rb index 87c22ca45..a218e85a7 100644 --- a/lib/debug/server_dap.rb +++ b/lib/debug/server_dap.rb @@ -4,6 +4,7 @@ require 'irb/completion' require 'tmpdir' require 'fileutils' +require_relative 'variable_inspector' module DEBUGGER__ module UI_DAP @@ -765,18 +766,11 @@ def register_vars vars, tid end end - class NaiveString - attr_reader :str - def initialize str - @str = str - end - end - class ThreadClient MAX_LENGTH = 180 def value_inspect obj, short: true - # TODO: max length should be configuarable? + # TODO: max length should be configurable? str = DEBUGGER__.safe_inspect obj, short: short, max_length: MAX_LENGTH if str.encoding == Encoding::UTF_8 @@ -855,70 +849,40 @@ def process_dap args presentationHint: 'locals', # variablesReference: N, # filled by SESSION namedVariables: lnum, - indexedVariables: 0, expensive: false, }, { name: 'Global variables', presentationHint: 'globals', variablesReference: 1, # GLOBAL namedVariables: safe_global_variables.size, - indexedVariables: 0, expensive: false, }] when :scope fid = args.shift frame = get_frame(fid) vars = collect_locals(frame).map do |var, val| - variable(var, val) + render_variable Variable.new(name: var, value: val) end event! :protocol_result, :scope, req, variables: vars, tid: self.id when :variable vid = args.shift - obj = @var_map[vid] - if obj - case req.dig('arguments', 'filter') - when 'indexed' - start = req.dig('arguments', 'start') || 0 - count = req.dig('arguments', 'count') || obj.size - vars = (start ... (start + count)).map{|i| - variable(i.to_s, obj[i]) - } - else - vars = [] - case obj - when Hash - vars = obj.map{|k, v| - variable(value_inspect(k), v,) - } - when Struct - vars = obj.members.map{|m| - variable(m, obj[m]) - } - when String - vars = [ - variable('#length', obj.length), - variable('#encoding', obj.encoding), - ] - printed_str = value_inspect(obj) - vars << variable('#dump', NaiveString.new(obj)) if printed_str.end_with?('...') - when Class, Module - vars << variable('%ancestors', obj.ancestors[1..]) - when Range - vars = [ - variable('#begin', obj.begin), - variable('#end', obj.end), - ] - end + if @var_map.key?(vid) + obj = @var_map[vid] - unless NaiveString === obj - vars += M_INSTANCE_VARIABLES.bind_call(obj).sort.map{|iv| - variable(iv, M_INSTANCE_VARIABLE_GET.bind_call(obj, iv)) - } - vars.unshift variable('#class', M_CLASS.bind_call(obj)) - end + members = case req.dig('arguments', 'filter') + when 'indexed' + VariableInspector.new.indexed_members_of( + obj, + start: req.dig('arguments', 'start') || 0, + count: req.dig('arguments', 'count') || obj.size, + ) + else + VariableInspector.new.named_members_of(obj) end + + vars = members.map { |member| render_variable member } end event! :protocol_result, :variable, req, variables: (vars || []), tid: self.id @@ -975,7 +939,13 @@ def process_dap args result = 'Error: Can not evaluate on this frame' end - event! :protocol_result, :evaluate, req, message: message, tid: self.id, **evaluate_result(result) + result_variable = Variable.new(name: nil, value: result) + + event! :protocol_result, :evaluate, req, + message: message, + tid: self.id, + result: result_variable.inspect_value, + **render_variable(result_variable) when :completions fid, text = args @@ -1051,58 +1021,49 @@ def type_name obj end end - def variable_ name, obj, indexedVariables: 0, namedVariables: 0 - if indexedVariables > 0 || namedVariables > 0 - vid = @var_map.size + 1 - @var_map[vid] = obj + # Renders the given Member into a DAP Variable + # https://microsoft.github.io/debug-adapter-protocol/specification#variable + def render_variable member + indexedVariables, namedVariables = if Array === member.value + [member.value.size, 0] else - vid = 0 + [0, VariableInspector.new.named_members_of(member.value).count] end - namedVariables += M_INSTANCE_VARIABLES.bind_call(obj).size - - if NaiveString === obj - str = obj.str.dump - vid = indexedVariables = namedVariables = 0 + # > If `variablesReference` is > 0, the variable is structured and its children + # > can be retrieved by passing `variablesReference` to the `variables` request + # > as long as execution remains suspended. + if indexedVariables > 0 || namedVariables > 0 + # This object has children that we might need to query, so we need to remember it by its vid + vid = @var_map.size + 1 + @var_map[vid] = member.value else - str = value_inspect(obj) + # This object has no children, so we don't need to remember it in the `@var_map` + vid = 0 end - if name - { name: name, - value: str, - type: type_name(obj), + variable = if member.name + # These two hashes are repeated so the "name" can come always come first, when available, + # which improves the readability of protocol responses. + { + name: member.name, + value: member.inspect_value, + type: member.value_type_name, variablesReference: vid, indexedVariables: indexedVariables, namedVariables: namedVariables, } else - { result: str, - type: type_name(obj), + { + value: member.inspect_value, + type: member.value_type_name, variablesReference: vid, indexedVariables: indexedVariables, namedVariables: namedVariables, } end - end - def variable name, obj - case obj - when Array - variable_ name, obj, indexedVariables: obj.size - when Hash - variable_ name, obj, namedVariables: obj.size - when String - variable_ name, obj, namedVariables: 3 # #length, #encoding, #to_str - when Struct - variable_ name, obj, namedVariables: obj.size - when Class, Module - variable_ name, obj, namedVariables: 1 # %ancestors (#ancestors without self) - when Range - variable_ name, obj, namedVariables: 2 # #begin, #end - else - variable_ name, obj, namedVariables: 1 # #class - end + variable end end end diff --git a/lib/debug/session.rb b/lib/debug/session.rb index c5b410182..9d8a89711 100644 --- a/lib/debug/session.rb +++ b/lib/debug/session.rb @@ -34,6 +34,7 @@ require_relative 'source_repository' require_relative 'breakpoint' require_relative 'tracer' +require_relative 'limited_pp' # To prevent loading old lib/debug.rb in Ruby 2.6 to 3.0 $LOADED_FEATURES << 'debug.rb' @@ -2319,53 +2320,8 @@ def self.load_rc end end - # Inspector - - SHORT_INSPECT_LENGTH = 40 - - class LimitedPP - def self.pp(obj, max=80) - out = self.new(max) - catch out do - PP.singleline_pp(obj, out) - end - out.buf - end - - attr_reader :buf - - def initialize max - @max = max - @cnt = 0 - @buf = String.new - end - - def <<(other) - @buf << other - - if @buf.size >= @max - @buf = @buf[0..@max] + '...' - throw self - end - end - end - - def self.safe_inspect obj, max_length: SHORT_INSPECT_LENGTH, short: false - if short - LimitedPP.pp(obj, max_length) - else - obj.inspect - end - rescue NoMethodError => e - klass, oid = M_CLASS.bind_call(obj), M_OBJECT_ID.bind_call(obj) - if obj == (r = e.receiver) - "<\##{klass.name}#{oid} does not have \#inspect>" - else - rklass, roid = M_CLASS.bind_call(r), M_OBJECT_ID.bind_call(r) - "<\##{klass.name}:#{roid} contains <\##{rklass}:#{roid} and it does not have #inspect>" - end - rescue Exception => e - "<#inspect raises #{e.inspect}>" + def self.safe_inspect obj, max_length: LimitedPP::SHORT_INSPECT_LENGTH, short: false + LimitedPP.safe_inspect(obj, max_length: max_length, short: short) end def self.warn msg diff --git a/lib/debug/variable_inspector.rb b/lib/debug/variable_inspector.rb new file mode 100644 index 000000000..f74e170db --- /dev/null +++ b/lib/debug/variable_inspector.rb @@ -0,0 +1,138 @@ +# frozen_string_literal: true + +require_relative 'limited_pp' + +module DEBUGGER__ + class VariableInspector + def indexed_members_of(obj, start:, count:) + return [] if start > (obj.length - 1) + + capped_count = [count, obj.length - start].min + + (start...(start + capped_count)).map do |i| + Variable.new(name: i.to_s, value: obj[i]) + end + end + + def named_members_of(obj) + return [] if NaiveString === obj + + members = case obj + when Hash then obj.map { |k, v| Variable.new(name: value_inspect(k), value: v) } + when Struct then obj.members.map { |name| Variable.new(name: name, value: obj[name]) } + when String + members = [ + Variable.internal(name: '#length', value: obj.length), + Variable.internal(name: '#encoding', value: obj.encoding), + ] + + printed_str = value_inspect(obj) + members << Variable.internal(name: "#dump", value: NaiveString.new(obj)) if printed_str.end_with?('...') + + members + when Class, Module then [Variable.internal(name: "%ancestors", value: obj.ancestors[1..])] + when Range then [ + Variable.internal(name: "#begin", value: obj.begin), + Variable.internal(name: "#end", value: obj.end), + ] + else [] + end + + ivars_members = M_INSTANCE_VARIABLES.bind_call(obj).sort.map do |iv| + Variable.new(name: iv, value: M_INSTANCE_VARIABLE_GET.bind_call(obj, iv)) + end + + members.unshift Variable.internal(name: '#class', value: M_CLASS.bind_call(obj)) + members.concat(ivars_members) + + members + end + + private + + def value_inspect(obj, short: true) + self.class.value_inspect(obj, short: short) + end + + def self.value_inspect(obj, short: true) + # TODO: max length should be configurable? + str = LimitedPP.safe_inspect obj, short: short, max_length: MAX_LENGTH + + if str.encoding == Encoding::UTF_8 + str.scrub + else + str.encode(Encoding::UTF_8, invalid: :replace, undef: :replace) + end + end + + MAX_LENGTH = 180 + + # TODO: Replace with Reflection helpers once they are merged + # https://github.com/ruby/debug/pull/1002 + M_INSTANCE_VARIABLES = method(:instance_variables).unbind + M_INSTANCE_VARIABLE_GET = method(:instance_variable_get).unbind + M_CLASS = method(:class).unbind + + class NaiveString + attr_reader :str + def initialize str + @str = str + end + + def == other + other.instance_of?(self.class) && @str == other.str + end + end + end + + class Variable + attr_reader :name, :value + + def initialize(name:, value:, internal: false) + @name = name + @value = value + @is_internal = internal + end + + def internal? + @is_internal + end + + def self.internal name:, value: + new(name: name, value: value, internal: true) + end + + def inspect_value + @inspect_value ||= if VariableInspector::NaiveString === @value + @value.str.dump + else + VariableInspector.value_inspect(@value) + end + end + + def value_type_name + klass = M_CLASS.bind_call(@value) + + begin + M_NAME.bind_call(klass) || klass.to_s + rescue Exception => e + "" + end + end + + def ==(other) + other.instance_of?(self.class) && + @name == other.name && + @value == other.value && + @is_internal == other.internal? + end + + def inspect + "#" + end + + # TODO: Replace with Reflection helpers once they are merged + # https://github.com/ruby/debug/pull/1002 + M_CLASS = method(:class).unbind + end +end diff --git a/test/debug/variable_inspector_test.rb b/test/debug/variable_inspector_test.rb new file mode 100644 index 000000000..33c833685 --- /dev/null +++ b/test/debug/variable_inspector_test.rb @@ -0,0 +1,215 @@ +# frozen_string_literal: true + +require 'test/unit' +require_relative '../../lib/debug/variable_inspector' + +module DEBUGGER__ + class VariableInspectorTest < Test::Unit::TestCase + def setup + @inspector = VariableInspector.new + end + + def test_array_indexed_members + a = ['a', 'b', 'c'] + + # Test correct truncation + assert_equal [], @inspector.indexed_members_of(a, start: 0, count: 0).map(&:value) + assert_equal ['a'], @inspector.indexed_members_of(a, start: 0, count: 1).map(&:value) + assert_equal ['a', 'b'], @inspector.indexed_members_of(a, start: 0, count: 2).map(&:value) + assert_equal ['a', 'b', 'c'], @inspector.indexed_members_of(a, start: 0, count: 3).map(&:value) + assert_equal ['a', 'b', 'c'], @inspector.indexed_members_of(a, start: 0, count: 4).map(&:value) + assert_equal ['b'], @inspector.indexed_members_of(a, start: 1, count: 1).map(&:value) + assert_equal ['b', 'c'], @inspector.indexed_members_of(a, start: 1, count: 2).map(&:value) + assert_equal ['b', 'c'], @inspector.indexed_members_of(a, start: 1, count: 3).map(&:value) + assert_equal ['b', 'c'], @inspector.indexed_members_of(a, start: 1, count: 4).map(&:value) + + # Test starting off the end + assert_equal [], @inspector.indexed_members_of(a, start: 999, count: 1).map(&:value) + + assert_equal [], @inspector.indexed_members_of([], start: 0, count: 999) + assert_equal [Variable.new(name: '0', value: 'a')], @inspector.indexed_members_of(['a'], start: 0, count: 999) + + expected = [ + Variable.new(name: '5', value: 'f'), + Variable.new(name: '6', value: 'g'), + Variable.new(name: '7', value: 'h'), + ] + assert_equal expected, @inspector.indexed_members_of(Array('a'...'z'), start: 5, count: 3) + end + + def test_named_members_of_hash + actual = @inspector.named_members_of( + { + sym: 'has Symbol key', + "str" => 'has String key', + 1 => 'has Integer key', + } + ) + + expected = [ + Variable.internal(name: '#class', value: Hash), + Variable.new(name: ':sym', value: "has Symbol key"), + Variable.new(name: '"str"', value: "has String key"), + Variable.new(name: '1', value: "has Integer key"), + ] + + assert_equal expected, actual + end + + def test_named_members_of_struct + expected = [ + Variable.internal(name: '#class', value: PointStruct), + # Struct members are stored separately from ivars + Variable.new(name: :x, value: 1), + Variable.new(name: :y, value: 2), + # If there are any other other ivars, they should also be included + Variable.new(name: :@ivar, value: "some other ivar"), + ] + + point = PointStruct.new(x: 1, y: 2) + + assert_equal expected, @inspector.named_members_of(point) + end + + def test_named_members_of_string + expected = [ + Variable.internal(name: '#class', value: String), + Variable.internal(name: '#length', value: 5), + Variable.internal(name: '#encoding', value: Encoding::UTF_8), + # skip #dump member for short strings + ] + + assert_equal expected, @inspector.named_members_of("hello") + + + long_string = "A long string " + ('*' * 1000) + + expected = [ + Variable.internal(name: '#class', value: String), + Variable.internal(name: '#length', value: long_string.length), + Variable.internal(name: '#encoding', value: Encoding::UTF_8), + Variable.internal(name: '#dump', value: VariableInspector::NaiveString.new(long_string)), + ] + + assert_equal expected, @inspector.named_members_of(long_string) + end + + def test_named_members_of_class + expected = [ + Variable.internal(name: '#class', value: Class), + Variable.internal(name: '%ancestors', value: PointStruct.ancestors.drop(1)), + ] + + assert_equal expected, @inspector.named_members_of(PointStruct) + end + + def test_named_members_of_module + ancestors = [Module.new, Module.new, Module.new] + mod = Module.new do + include *ancestors + end + + expected = [ + Variable.internal(name: '#class', value: Module), + Variable.internal(name: '%ancestors', value: ancestors), + ] + + assert_equal expected, @inspector.named_members_of(mod) + end + + def test_named_members_of_range + # Ranges that include end + assert_equal( + [ + Variable.internal(name: "#class", value: Range), + Variable.internal(name: "#begin", value: 1), + Variable.internal(name: "#end", value: 2), + ], + @inspector.named_members_of(1..2) + ) + assert_equal( + [ + Variable.internal(name: "#class", value: Range), + Variable.internal(name: "#begin", value: 1), + Variable.internal(name: "#end", value: nil), + ], + @inspector.named_members_of(1..) + ) + assert_equal( + [ + Variable.internal(name: "#class", value: Range), + Variable.internal(name: "#begin", value: nil), + Variable.internal(name: "#end", value: 2), + ], + @inspector.named_members_of(..2) + ) + + # Ranges that exclude end + assert_equal( + [ + Variable.internal(name: "#class", value: Range), + Variable.internal(name: "#begin", value: 1), + Variable.internal(name: "#end", value: 2), + ], + @inspector.named_members_of(1...2) + ) + assert_equal( + [ + Variable.internal(name: "#class", value: Range), + Variable.internal(name: "#begin", value: 1), + Variable.internal(name: "#end", value: nil), + ], + @inspector.named_members_of(1...) + ) + assert_equal( + [ + Variable.internal(name: "#class", value: Range), + Variable.internal(name: "#begin", value: nil), + Variable.internal(name: "#end", value: 2) + ], + @inspector.named_members_of(...2) + ) + + # Range with nil bounds + assert_equal( + [ + Variable.internal(name: "#class", value: Range), + Variable.internal(name: "#begin", value: nil), + Variable.internal(name: "#end", value: nil), + ], + @inspector.named_members_of(Range.new(nil, nil)) + ) + end + + def test_named_members_of_other_objects + assert_equal [Variable.internal(name: '#class', value: Object)], @inspector.named_members_of(Object.new) + + expected = [ + Variable.internal(name: '#class', value: Point), + # Struct members are stored separately from ivars + Variable.new(name: :@x, value: 1), + Variable.new(name: :@y, value: 2), + ] + + point = Point.new(x: 1, y: 2) + + assert_equal expected, @inspector.named_members_of(point) + end + + private + + class PointStruct < Struct.new(:x, :y, keyword_init: true) + def initialize(x:, y:) + super + @ivar = "some other ivar" + end + end + + class Point # A "plain ol' Ruby object" + def initialize(x:, y:) + @x = x + @y = y + end + end + end +end diff --git a/test/protocol/boot_config_raw_dap_test.rb b/test/protocol/boot_config_raw_dap_test.rb index dd32e790a..71e0e15b8 100644 --- a/test/protocol/boot_config_raw_dap_test.rb +++ b/test/protocol/boot_config_raw_dap_test.rb @@ -200,7 +200,6 @@ def test_boot_configuration_works_correctly name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 2 }, @@ -209,7 +208,6 @@ def test_boot_configuration_works_correctly presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -237,7 +235,6 @@ def test_boot_configuration_works_correctly value: "main", type: "Object", variablesReference: 3, - indexedVariables: 0, namedVariables: /\d+/ } ] diff --git a/test/protocol/break_raw_dap_test.rb b/test/protocol/break_raw_dap_test.rb index 5427959d3..f551ad3e8 100644 --- a/test/protocol/break_raw_dap_test.rb +++ b/test/protocol/break_raw_dap_test.rb @@ -127,7 +127,6 @@ def test_break_works_correctly name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 2 }, @@ -136,7 +135,6 @@ def test_break_works_correctly presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -164,7 +162,6 @@ def test_break_works_correctly value: "main", type: "Object", variablesReference: 3, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -416,7 +413,6 @@ def test_break_works_correctly name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 4 }, @@ -425,7 +421,6 @@ def test_break_works_correctly presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -453,7 +448,6 @@ def test_break_works_correctly value: "Foo", type: "Module", variablesReference: 5, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -461,7 +455,6 @@ def test_break_works_correctly value: "nil", type: "NilClass", variablesReference: 6, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -595,7 +588,6 @@ def test_break_works_correctly name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 7 }, @@ -604,7 +596,6 @@ def test_break_works_correctly presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -632,7 +623,6 @@ def test_break_works_correctly value: "Foo::Bar", type: "Class", variablesReference: 8, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -755,7 +745,6 @@ def test_break_works_correctly name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 9 }, @@ -764,7 +753,6 @@ def test_break_works_correctly presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -792,7 +780,6 @@ def test_break_works_correctly value: "Foo", type: "Module", variablesReference: 10, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -800,7 +787,6 @@ def test_break_works_correctly value: "nil", type: "NilClass", variablesReference: 11, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -953,7 +939,6 @@ def test_check_run_to_line_works_correctly name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 2 }, @@ -962,7 +947,6 @@ def test_check_run_to_line_works_correctly presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -990,7 +974,6 @@ def test_check_run_to_line_works_correctly value: "main", type: "Object", variablesReference: 3, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -1149,7 +1132,6 @@ def test_check_run_to_line_works_correctly name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 4 }, @@ -1158,7 +1140,6 @@ def test_check_run_to_line_works_correctly presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -1186,7 +1167,6 @@ def test_check_run_to_line_works_correctly value: "Foo", type: "Module", variablesReference: 5, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -1194,7 +1174,6 @@ def test_check_run_to_line_works_correctly value: "nil", type: "NilClass", variablesReference: 6, - indexedVariables: 0, namedVariables: /\d+/ } ] diff --git a/test/protocol/call_stack_raw_dap_test.rb b/test/protocol/call_stack_raw_dap_test.rb index db47ecf62..272a4a0d5 100644 --- a/test/protocol/call_stack_raw_dap_test.rb +++ b/test/protocol/call_stack_raw_dap_test.rb @@ -127,7 +127,6 @@ def test_call_stack_works_correctly_1643805481 name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 2 }, @@ -136,7 +135,6 @@ def test_call_stack_works_correctly_1643805481 presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -164,7 +162,6 @@ def test_call_stack_works_correctly_1643805481 value: "main", type: "Object", variablesReference: 3, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -334,7 +331,6 @@ def test_call_stack_works_correctly_1643805481 name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 4 }, @@ -343,7 +339,6 @@ def test_call_stack_works_correctly_1643805481 presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -371,7 +366,6 @@ def test_call_stack_works_correctly_1643805481 value: "Foo::Bar", type: "Class", variablesReference: 5, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -398,7 +392,6 @@ def test_call_stack_works_correctly_1643805481 name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 6 }, @@ -407,7 +400,6 @@ def test_call_stack_works_correctly_1643805481 presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -435,7 +427,6 @@ def test_call_stack_works_correctly_1643805481 value: "Foo", type: "Module", variablesReference: 7, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -443,7 +434,6 @@ def test_call_stack_works_correctly_1643805481 value: "nil", type: "NilClass", variablesReference: 8, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -470,7 +460,6 @@ def test_call_stack_works_correctly_1643805481 name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 9 }, @@ -479,7 +468,6 @@ def test_call_stack_works_correctly_1643805481 presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -507,7 +495,6 @@ def test_call_stack_works_correctly_1643805481 value: "main", type: "Object", variablesReference: 10, - indexedVariables: 0, namedVariables: /\d+/ } ] diff --git a/test/protocol/catch_raw_dap_test.rb b/test/protocol/catch_raw_dap_test.rb index 273c3dd10..73bd020fb 100644 --- a/test/protocol/catch_raw_dap_test.rb +++ b/test/protocol/catch_raw_dap_test.rb @@ -126,7 +126,6 @@ def test_catching_runtime_error_works_correctly_1643891417 name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 2 }, @@ -135,7 +134,6 @@ def test_catching_runtime_error_works_correctly_1643891417 presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -163,7 +161,6 @@ def test_catching_runtime_error_works_correctly_1643891417 value: "main", type: "Object", variablesReference: 3, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -297,7 +294,6 @@ def test_catching_runtime_error_works_correctly_1643891417 name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 4 }, @@ -306,7 +302,6 @@ def test_catching_runtime_error_works_correctly_1643891417 presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -334,7 +329,6 @@ def test_catching_runtime_error_works_correctly_1643891417 value: "Foo::Bar", type: "Class", variablesReference: 5, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -342,7 +336,6 @@ def test_catching_runtime_error_works_correctly_1643891417 value: "#", type: "RuntimeError", variablesReference: 6, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -495,7 +488,6 @@ def test_catching_any_exception_works_correctly name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 2 }, @@ -504,7 +496,6 @@ def test_catching_any_exception_works_correctly presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -532,7 +523,6 @@ def test_catching_any_exception_works_correctly value: "main", type: "Object", variablesReference: 3, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -715,7 +705,6 @@ def test_catching_any_exception_works_correctly name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 4 }, @@ -724,7 +713,6 @@ def test_catching_any_exception_works_correctly presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -752,7 +740,6 @@ def test_catching_any_exception_works_correctly value: "1", type: "Integer", variablesReference: 5, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -760,7 +747,6 @@ def test_catching_any_exception_works_correctly value: "#", type: "ZeroDivisionError", variablesReference: 6, - indexedVariables: 0, namedVariables: /\d+/ } ] diff --git a/test/protocol/eval_raw_dap_test.rb b/test/protocol/eval_raw_dap_test.rb index 7f01a48e6..a8b2bf4d9 100644 --- a/test/protocol/eval_raw_dap_test.rb +++ b/test/protocol/eval_raw_dap_test.rb @@ -124,7 +124,6 @@ def test_eval_works_correctly_1643807667 name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 2 }, @@ -133,7 +132,6 @@ def test_eval_works_correctly_1643807667 presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -161,7 +159,6 @@ def test_eval_works_correctly_1643807667 value: "main", type: "Object", variablesReference: 3, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -169,7 +166,6 @@ def test_eval_works_correctly_1643807667 value: "nil", type: "NilClass", variablesReference: 4, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -177,7 +173,6 @@ def test_eval_works_correctly_1643807667 value: "nil", type: "NilClass", variablesReference: 5, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -185,7 +180,6 @@ def test_eval_works_correctly_1643807667 value: "nil", type: "NilClass", variablesReference: 6, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -193,7 +187,6 @@ def test_eval_works_correctly_1643807667 value: "nil", type: "NilClass", variablesReference: 7, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -201,7 +194,6 @@ def test_eval_works_correctly_1643807667 value: "nil", type: "NilClass", variablesReference: 8, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -209,7 +201,6 @@ def test_eval_works_correctly_1643807667 value: "nil", type: "NilClass", variablesReference: 9, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -357,7 +348,6 @@ def test_eval_works_correctly_1643807667 name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 10 }, @@ -366,7 +356,6 @@ def test_eval_works_correctly_1643807667 presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -394,7 +383,6 @@ def test_eval_works_correctly_1643807667 value: "main", type: "Object", variablesReference: 11, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -402,7 +390,6 @@ def test_eval_works_correctly_1643807667 value: "2", type: "Integer", variablesReference: 12, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -410,7 +397,6 @@ def test_eval_works_correctly_1643807667 value: "3", type: "Integer", variablesReference: 13, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -418,7 +404,6 @@ def test_eval_works_correctly_1643807667 value: "1", type: "Integer", variablesReference: 14, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -426,7 +411,6 @@ def test_eval_works_correctly_1643807667 value: "4", type: "Integer", variablesReference: 15, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -434,7 +418,6 @@ def test_eval_works_correctly_1643807667 value: "nil", type: "NilClass", variablesReference: 16, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -442,7 +425,6 @@ def test_eval_works_correctly_1643807667 value: "nil", type: "NilClass", variablesReference: 17, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -519,7 +501,6 @@ def test_eval_works_correctly_1643807667 body: { type: "Integer", variablesReference: 18, - indexedVariables: 0, namedVariables: /\d+/, result: "2" } @@ -545,7 +526,6 @@ def test_eval_works_correctly_1643807667 name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 19 }, @@ -554,7 +534,6 @@ def test_eval_works_correctly_1643807667 presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -582,7 +561,6 @@ def test_eval_works_correctly_1643807667 value: "main", type: "Object", variablesReference: 20, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -590,7 +568,6 @@ def test_eval_works_correctly_1643807667 value: "2", type: "Integer", variablesReference: 21, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -598,7 +575,6 @@ def test_eval_works_correctly_1643807667 value: "3", type: "Integer", variablesReference: 22, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -606,7 +582,6 @@ def test_eval_works_correctly_1643807667 value: "1", type: "Integer", variablesReference: 23, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -614,7 +589,6 @@ def test_eval_works_correctly_1643807667 value: "4", type: "Integer", variablesReference: 24, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -622,7 +596,6 @@ def test_eval_works_correctly_1643807667 value: "nil", type: "NilClass", variablesReference: 25, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -630,7 +603,6 @@ def test_eval_works_correctly_1643807667 value: "nil", type: "NilClass", variablesReference: 26, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -715,7 +687,6 @@ def test_eval_works_correctly_1643807667 body: { type: "Integer", variablesReference: 27, - indexedVariables: 0, namedVariables: /\d+/, result: "4" } @@ -741,7 +712,6 @@ def test_eval_works_correctly_1643807667 name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 28 }, @@ -750,7 +720,6 @@ def test_eval_works_correctly_1643807667 presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -778,7 +747,6 @@ def test_eval_works_correctly_1643807667 value: "main", type: "Object", variablesReference: 29, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -786,7 +754,6 @@ def test_eval_works_correctly_1643807667 value: "2", type: "Integer", variablesReference: 30, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -794,7 +761,6 @@ def test_eval_works_correctly_1643807667 value: "3", type: "Integer", variablesReference: 31, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -802,7 +768,6 @@ def test_eval_works_correctly_1643807667 value: "1", type: "Integer", variablesReference: 32, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -810,7 +775,6 @@ def test_eval_works_correctly_1643807667 value: "4", type: "Integer", variablesReference: 33, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -818,7 +782,6 @@ def test_eval_works_correctly_1643807667 value: "nil", type: "NilClass", variablesReference: 34, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -826,7 +789,6 @@ def test_eval_works_correctly_1643807667 value: "nil", type: "NilClass", variablesReference: 35, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -852,7 +814,6 @@ def test_eval_works_correctly_1643807667 body: { type: "Integer", variablesReference: 36, - indexedVariables: 0, namedVariables: /\d+/, result: "3" } @@ -878,7 +839,6 @@ def test_eval_works_correctly_1643807667 name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 37 }, @@ -887,7 +847,6 @@ def test_eval_works_correctly_1643807667 presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -915,7 +874,6 @@ def test_eval_works_correctly_1643807667 value: "main", type: "Object", variablesReference: 38, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -923,7 +881,6 @@ def test_eval_works_correctly_1643807667 value: "2", type: "Integer", variablesReference: 39, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -931,7 +888,6 @@ def test_eval_works_correctly_1643807667 value: "3", type: "Integer", variablesReference: 40, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -939,7 +895,6 @@ def test_eval_works_correctly_1643807667 value: "1", type: "Integer", variablesReference: 41, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -947,7 +902,6 @@ def test_eval_works_correctly_1643807667 value: "4", type: "Integer", variablesReference: 42, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -955,7 +909,6 @@ def test_eval_works_correctly_1643807667 value: "nil", type: "NilClass", variablesReference: 43, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -963,7 +916,6 @@ def test_eval_works_correctly_1643807667 value: "nil", type: "NilClass", variablesReference: 44, - indexedVariables: 0, namedVariables: /\d+/ } ] diff --git a/test/protocol/finish_raw_dap_test.rb b/test/protocol/finish_raw_dap_test.rb index 150cfb4b2..c64def7e1 100644 --- a/test/protocol/finish_raw_dap_test.rb +++ b/test/protocol/finish_raw_dap_test.rb @@ -127,7 +127,6 @@ def test_finish_works_correctly name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 2 }, @@ -136,7 +135,6 @@ def test_finish_works_correctly presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -164,7 +162,6 @@ def test_finish_works_correctly value: "main", type: "Object", variablesReference: 3, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -334,7 +331,6 @@ def test_finish_works_correctly name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 4 }, @@ -343,7 +339,6 @@ def test_finish_works_correctly presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -371,7 +366,6 @@ def test_finish_works_correctly value: "Foo::Bar", type: "Class", variablesReference: 5, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -500,7 +494,6 @@ def test_finish_works_correctly name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 6 }, @@ -509,7 +502,6 @@ def test_finish_works_correctly presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -537,7 +529,6 @@ def test_finish_works_correctly value: "Foo::Bar", type: "Class", variablesReference: 7, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -545,7 +536,6 @@ def test_finish_works_correctly value: "\"hello\"", type: "String", variablesReference: 8, - indexedVariables: 0, namedVariables: /\d+/ } ] diff --git a/test/protocol/hover_raw_dap_test.rb b/test/protocol/hover_raw_dap_test.rb index b4b617ed9..63441cec1 100644 --- a/test/protocol/hover_raw_dap_test.rb +++ b/test/protocol/hover_raw_dap_test.rb @@ -14,6 +14,7 @@ class HoverTest1638791703 < ProtocolTestCase RUBY def test_hover_works_correctly + omit "This test is designed for Ruby 3.1 and later versions because ancestor classes are changed" if RUBY_VERSION.to_f <= 3.0 run_dap_scenario PROGRAM do [ *INITIALIZE_DAP_MSGS, @@ -123,7 +124,6 @@ def test_hover_works_correctly name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 2 }, @@ -132,7 +132,6 @@ def test_hover_works_correctly presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -160,7 +159,6 @@ def test_hover_works_correctly value: "main", type: "Object", variablesReference: 3, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -168,7 +166,6 @@ def test_hover_works_correctly value: "nil", type: "NilClass", variablesReference: 4, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -176,7 +173,6 @@ def test_hover_works_correctly value: "nil", type: "NilClass", variablesReference: 5, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -184,7 +180,6 @@ def test_hover_works_correctly value: "nil", type: "NilClass", variablesReference: 6, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -192,7 +187,6 @@ def test_hover_works_correctly value: "nil", type: "NilClass", variablesReference: 7, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -200,7 +194,6 @@ def test_hover_works_correctly value: "nil", type: "NilClass", variablesReference: 8, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -348,7 +341,6 @@ def test_hover_works_correctly name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 9 }, @@ -357,7 +349,6 @@ def test_hover_works_correctly presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -385,7 +376,6 @@ def test_hover_works_correctly value: "main", type: "Object", variablesReference: 10, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -393,7 +383,6 @@ def test_hover_works_correctly value: "1", type: "Integer", variablesReference: 11, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -401,7 +390,6 @@ def test_hover_works_correctly value: "2", type: "Integer", variablesReference: 12, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -409,7 +397,6 @@ def test_hover_works_correctly value: "3", type: "Integer", variablesReference: 13, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -417,7 +404,6 @@ def test_hover_works_correctly value: "nil", type: "NilClass", variablesReference: 14, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -425,7 +411,6 @@ def test_hover_works_correctly value: "nil", type: "NilClass", variablesReference: 15, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -451,7 +436,6 @@ def test_hover_works_correctly body: { type: "Integer", variablesReference: 16, - indexedVariables: 0, namedVariables: /\d+/, result: "2" } @@ -478,7 +462,6 @@ def test_hover_works_correctly value: "Integer", type: "Class", variablesReference: 17, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -506,7 +489,6 @@ def test_hover_works_correctly value: "Class", type: "Class", variablesReference: 18, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -542,7 +524,6 @@ def test_hover_works_correctly value: "Class", type: "Class", variablesReference: 20, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -578,84 +559,67 @@ def test_hover_works_correctly variables: [ { name: "0", - value: /.*/, - type: /.*/, + value: "JSON::Ext::Generator::GeneratorMethods::Integer", + type: "Module", variablesReference: 22, - indexedVariables: 0, namedVariables: /\d+/ }, { name: "1", - value: /.*/, - type: /.*/, + value: "Numeric", + type: "Class", variablesReference: 23, - indexedVariables: 0, namedVariables: /\d+/ }, { name: "2", - value: /.*/, - type: /.*/, + value: "Comparable", + type: "Module", variablesReference: 24, - indexedVariables: 0, namedVariables: /\d+/ }, { name: "3", - value: /.*/, - type: /.*/, + value: "Object", + type: "Class", variablesReference: 25, - indexedVariables: 0, namedVariables: /\d+/ }, { name: "4", - value: /.*/, - type: /.*/, + value: "JSON::Ext::Generator::GeneratorMethods::Object", + type: "Module", variablesReference: 26, - indexedVariables: 0, namedVariables: /\d+/ }, { name: "5", - value: /.*/, - type: /.*/, + value: "PP::ObjectMixin", + type: "Module", variablesReference: 27, - indexedVariables: 0, namedVariables: /\d+/ }, { name: "6", - value: /.*/, - type: /.*/, + value: "DEBUGGER__::TrapInterceptor", + type: "Module", variablesReference: 28, - indexedVariables: 0, namedVariables: /\d+/ }, { name: "7", - value: /.*/, - type: /.*/, + value: "Kernel", + type: "Module", variablesReference: 29, - indexedVariables: 0, namedVariables: /\d+/ }, { name: "8", - value: /.*/, - type: /.*/, + value: "BasicObject", + type: "Class", variablesReference: 30, - indexedVariables: 0, namedVariables: /\d+/ }, - { - name: "9", - value: /.*/, - type: /.*/, - variablesReference: 31, - indexedVariables: 0, - namedVariables: /\d+/ - } ] } }, @@ -678,8 +642,7 @@ def test_hover_works_correctly message: "Success", body: { type: "Integer", - variablesReference: 32, - indexedVariables: 0, + variablesReference: 31, namedVariables: /\d+/, result: "3" } @@ -688,7 +651,7 @@ def test_hover_works_correctly seq: 23, command: "variables", arguments: { - variablesReference: 32 + variablesReference: 31 }, type: "request" }, @@ -705,8 +668,7 @@ def test_hover_works_correctly name: "#class", value: "Integer", type: "Class", - variablesReference: 33, - indexedVariables: 0, + variablesReference: 32, namedVariables: /\d+/ } ] @@ -731,8 +693,7 @@ def test_hover_works_correctly message: "Success", body: { type: "Integer", - variablesReference: 34, - indexedVariables: 0, + variablesReference: 33, namedVariables: /\d+/, result: "2" } @@ -741,7 +702,7 @@ def test_hover_works_correctly seq: 25, command: "variables", arguments: { - variablesReference: 34 + variablesReference: 33 }, type: "request" }, @@ -758,8 +719,7 @@ def test_hover_works_correctly name: "#class", value: "Integer", type: "Class", - variablesReference: 35, - indexedVariables: 0, + variablesReference: 34, namedVariables: /\d+/ } ] @@ -784,8 +744,7 @@ def test_hover_works_correctly message: "Success", body: { type: "Integer", - variablesReference: 36, - indexedVariables: 0, + variablesReference: 35, namedVariables: /\d+/, result: "1" } @@ -794,7 +753,7 @@ def test_hover_works_correctly seq: 27, command: "variables", arguments: { - variablesReference: 36 + variablesReference: 35 }, type: "request" }, @@ -811,8 +770,7 @@ def test_hover_works_correctly name: "#class", value: "Integer", type: "Class", - variablesReference: 37, - indexedVariables: 0, + variablesReference: 36, namedVariables: /\d+/ } ] @@ -987,7 +945,6 @@ def test_1641198331 name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 2 }, @@ -996,7 +953,6 @@ def test_1641198331 presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -1024,7 +980,6 @@ def test_1641198331 value: "main", type: "Object", variablesReference: 3, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -1032,7 +987,6 @@ def test_1641198331 value: "nil", type: "NilClass", variablesReference: 4, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -1180,7 +1134,6 @@ def test_1641198331 name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 5 }, @@ -1189,7 +1142,6 @@ def test_1641198331 presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -1217,7 +1169,6 @@ def test_1641198331 value: "main", type: "Object", variablesReference: 6, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -1225,7 +1176,6 @@ def test_1641198331 value: "nil", type: "NilClass", variablesReference: 7, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -1251,7 +1201,6 @@ def test_1641198331 body: { type: "Module", variablesReference: 8, - indexedVariables: 0, namedVariables: /\d+/, result: "Abc" } @@ -1278,7 +1227,6 @@ def test_1641198331 value: "Module", type: "Class", variablesReference: 9, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -1286,7 +1234,6 @@ def test_1641198331 value: "[]", type: "Array", variablesReference: 0, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -1312,7 +1259,6 @@ def test_1641198331 body: { type: "Class", variablesReference: 10, - indexedVariables: 0, namedVariables: /\d+/, result: "Abc::Def123" } @@ -1339,7 +1285,6 @@ def test_1641198331 value: "Class", type: "Class", variablesReference: 11, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -1373,7 +1318,6 @@ def test_1641198331 body: { type: "Module", variablesReference: 13, - indexedVariables: 0, namedVariables: /\d+/, result: "Abc" } @@ -1400,7 +1344,6 @@ def test_1641198331 value: "Module", type: "Class", variablesReference: 14, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -1408,7 +1351,6 @@ def test_1641198331 value: "[]", type: "Array", variablesReference: 0, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -1434,7 +1376,6 @@ def test_1641198331 body: { type: "Class", variablesReference: 15, - indexedVariables: 0, namedVariables: /\d+/, result: "Abc::Def123" } @@ -1461,7 +1402,6 @@ def test_1641198331 value: "Class", type: "Class", variablesReference: 16, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -1495,7 +1435,6 @@ def test_1641198331 body: { type: "Class", variablesReference: 18, - indexedVariables: 0, namedVariables: /\d+/, result: "Abc::Def123::Ghi" } @@ -1522,7 +1461,6 @@ def test_1641198331 value: "Class", type: "Class", variablesReference: 19, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -1556,7 +1494,6 @@ def test_1641198331 body: { type: "Class", variablesReference: 21, - indexedVariables: 0, namedVariables: /\d+/, result: "Abc::Def123::Ghi" } @@ -1583,7 +1520,6 @@ def test_1641198331 value: "Class", type: "Class", variablesReference: 22, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -1617,7 +1553,6 @@ def test_1641198331 body: { type: "Module", variablesReference: 24, - indexedVariables: 0, namedVariables: /\d+/, result: "Abc" } @@ -1644,7 +1579,6 @@ def test_1641198331 value: "Module", type: "Class", variablesReference: 25, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -1652,7 +1586,6 @@ def test_1641198331 value: "[]", type: "Array", variablesReference: 0, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -1678,7 +1611,6 @@ def test_1641198331 body: { type: "Class", variablesReference: 26, - indexedVariables: 0, namedVariables: /\d+/, result: "Abc::Def123" } @@ -1705,7 +1637,6 @@ def test_1641198331 value: "Class", type: "Class", variablesReference: 27, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -1739,7 +1670,6 @@ def test_1641198331 body: { type: "Class", variablesReference: 29, - indexedVariables: 0, namedVariables: /\d+/, result: "Abc::Def123" } @@ -1766,7 +1696,6 @@ def test_1641198331 value: "Class", type: "Class", variablesReference: 30, - indexedVariables: 0, namedVariables: /\d+/ }, { diff --git a/test/protocol/next_raw_dap_test.rb b/test/protocol/next_raw_dap_test.rb index 9eef94f21..b857d2411 100644 --- a/test/protocol/next_raw_dap_test.rb +++ b/test/protocol/next_raw_dap_test.rb @@ -127,7 +127,6 @@ def test_next_works_correctly name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 2 }, @@ -136,7 +135,6 @@ def test_next_works_correctly presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -164,7 +162,6 @@ def test_next_works_correctly value: "main", type: "Object", variablesReference: 3, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -566,7 +563,6 @@ def test_next_works_correctly name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 4 }, @@ -575,7 +571,6 @@ def test_next_works_correctly presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -603,7 +598,6 @@ def test_next_works_correctly value: "Foo", type: "Module", variablesReference: 5, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -611,7 +605,6 @@ def test_next_works_correctly value: "nil", type: "NilClass", variablesReference: 6, - indexedVariables: 0, namedVariables: /\d+/ } ] diff --git a/test/protocol/step_back_raw_dap_test.rb b/test/protocol/step_back_raw_dap_test.rb index eee84d8e2..7afc29883 100644 --- a/test/protocol/step_back_raw_dap_test.rb +++ b/test/protocol/step_back_raw_dap_test.rb @@ -129,7 +129,6 @@ def test_step_back_works_correctly name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 2 }, @@ -138,7 +137,6 @@ def test_step_back_works_correctly presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -166,7 +164,6 @@ def test_step_back_works_correctly value: "main", type: "Object", variablesReference: 3, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -420,7 +417,6 @@ def test_step_back_works_correctly name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 4 }, @@ -429,7 +425,6 @@ def test_step_back_works_correctly presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -457,7 +452,6 @@ def test_step_back_works_correctly value: "Foo", type: "Module", variablesReference: 5, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -465,7 +459,6 @@ def test_step_back_works_correctly value: "nil", type: "NilClass", variablesReference: 6, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -575,7 +568,6 @@ def test_step_back_works_correctly name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 7 }, @@ -584,7 +576,6 @@ def test_step_back_works_correctly presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -612,7 +603,6 @@ def test_step_back_works_correctly value: "Foo", type: "Module", variablesReference: 8, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -620,7 +610,6 @@ def test_step_back_works_correctly value: "nil", type: "NilClass", variablesReference: 9, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -741,7 +730,6 @@ def test_step_back_works_correctly name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 10 }, @@ -750,7 +738,6 @@ def test_step_back_works_correctly presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -881,16 +868,14 @@ def test_step_back_works_correctly name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, - variablesReference: 11 + variablesReference: 12 }, { name: "Global variables", presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -917,16 +902,14 @@ def test_step_back_works_correctly name: "%self", value: "Foo", type: "Module", - variablesReference: 12, - indexedVariables: 0, + variablesReference: 13, namedVariables: /\d+/ }, { name: "bar", value: "nil", type: "NilClass", - variablesReference: 13, - indexedVariables: 0, + variablesReference: 14, namedVariables: /\d+/ } ] diff --git a/test/protocol/step_raw_dap_test.rb b/test/protocol/step_raw_dap_test.rb index 77560e82c..caaadc190 100644 --- a/test/protocol/step_raw_dap_test.rb +++ b/test/protocol/step_raw_dap_test.rb @@ -127,7 +127,6 @@ def test_step_works_correctly name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 2 }, @@ -136,7 +135,6 @@ def test_step_works_correctly presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -164,7 +162,6 @@ def test_step_works_correctly value: "main", type: "Object", variablesReference: 3, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -705,7 +702,6 @@ def test_step_works_correctly name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 4 }, @@ -714,7 +710,6 @@ def test_step_works_correctly presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -763,7 +758,6 @@ def test_step_works_correctly value: "Foo", type: "Module", variablesReference: 5, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -771,7 +765,6 @@ def test_step_works_correctly value: "nil", type: "NilClass", variablesReference: 6, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -842,7 +835,6 @@ def test_step_works_correctly name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 7 }, @@ -851,7 +843,6 @@ def test_step_works_correctly presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -879,7 +870,6 @@ def test_step_works_correctly value: "Foo", type: "Module", variablesReference: 8, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -887,7 +877,6 @@ def test_step_works_correctly value: "nil", type: "NilClass", variablesReference: 9, - indexedVariables: 0, namedVariables: /\d+/ } ] diff --git a/test/protocol/variables_test.rb b/test/protocol/variables_test.rb index 9b82419e8..2bc880ed8 100644 --- a/test/protocol/variables_test.rb +++ b/test/protocol/variables_test.rb @@ -76,7 +76,7 @@ def test_ordering_instance_variables res = send_dap_request 'variables', variablesReference: variables_reference instance_vars = res.dig(:body, :variables) - assert_equal instance_vars.map { |var| var[:name] }, ["#class", "@a", "@b", "@c"] + assert_equal ["#class", "@a", "@b", "@c"], instance_vars.map { |var| var[:name] } req_terminate_debuggee end diff --git a/test/protocol/watch_raw_dap_test.rb b/test/protocol/watch_raw_dap_test.rb index 3e6e8b2db..bd7a29635 100644 --- a/test/protocol/watch_raw_dap_test.rb +++ b/test/protocol/watch_raw_dap_test.rb @@ -125,7 +125,6 @@ def test_watch_works_correctly_1643810224 name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 2 }, @@ -134,7 +133,6 @@ def test_watch_works_correctly_1643810224 presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -162,7 +160,6 @@ def test_watch_works_correctly_1643810224 value: "main", type: "Object", variablesReference: 3, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -170,7 +167,6 @@ def test_watch_works_correctly_1643810224 value: "nil", type: "NilClass", variablesReference: 4, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -178,7 +174,6 @@ def test_watch_works_correctly_1643810224 value: "nil", type: "NilClass", variablesReference: 5, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -186,7 +181,6 @@ def test_watch_works_correctly_1643810224 value: "nil", type: "NilClass", variablesReference: 6, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -194,7 +188,6 @@ def test_watch_works_correctly_1643810224 value: "nil", type: "NilClass", variablesReference: 7, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -228,7 +221,6 @@ def test_watch_works_correctly_1643810224 body: { type: "NilClass", variablesReference: 8, - indexedVariables: 0, namedVariables: /\d+/, result: "nil" } @@ -246,7 +238,6 @@ def test_watch_works_correctly_1643810224 name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 9 }, @@ -255,7 +246,6 @@ def test_watch_works_correctly_1643810224 presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -283,7 +273,6 @@ def test_watch_works_correctly_1643810224 value: "main", type: "Object", variablesReference: 10, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -291,7 +280,6 @@ def test_watch_works_correctly_1643810224 value: "nil", type: "NilClass", variablesReference: 11, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -299,7 +287,6 @@ def test_watch_works_correctly_1643810224 value: "nil", type: "NilClass", variablesReference: 12, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -307,7 +294,6 @@ def test_watch_works_correctly_1643810224 value: "nil", type: "NilClass", variablesReference: 13, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -315,7 +301,6 @@ def test_watch_works_correctly_1643810224 value: "nil", type: "NilClass", variablesReference: 14, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -421,7 +406,6 @@ def test_watch_works_correctly_1643810224 body: { type: "Integer", variablesReference: 15, - indexedVariables: 0, namedVariables: /\d+/, result: "2" } @@ -447,7 +431,6 @@ def test_watch_works_correctly_1643810224 name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 16 }, @@ -456,7 +439,6 @@ def test_watch_works_correctly_1643810224 presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -484,7 +466,6 @@ def test_watch_works_correctly_1643810224 value: "main", type: "Object", variablesReference: 17, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -492,7 +473,6 @@ def test_watch_works_correctly_1643810224 value: "2", type: "Integer", variablesReference: 18, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -500,7 +480,6 @@ def test_watch_works_correctly_1643810224 value: "nil", type: "NilClass", variablesReference: 19, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -508,7 +487,6 @@ def test_watch_works_correctly_1643810224 value: "nil", type: "NilClass", variablesReference: 20, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -516,7 +494,6 @@ def test_watch_works_correctly_1643810224 value: "nil", type: "NilClass", variablesReference: 21, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -622,7 +599,6 @@ def test_watch_works_correctly_1643810224 body: { type: "Integer", variablesReference: 22, - indexedVariables: 0, namedVariables: /\d+/, result: "3" } @@ -648,7 +624,6 @@ def test_watch_works_correctly_1643810224 name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 23 }, @@ -657,7 +632,6 @@ def test_watch_works_correctly_1643810224 presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -685,7 +659,6 @@ def test_watch_works_correctly_1643810224 value: "main", type: "Object", variablesReference: 24, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -693,7 +666,6 @@ def test_watch_works_correctly_1643810224 value: "3", type: "Integer", variablesReference: 25, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -701,7 +673,6 @@ def test_watch_works_correctly_1643810224 value: "nil", type: "NilClass", variablesReference: 26, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -709,7 +680,6 @@ def test_watch_works_correctly_1643810224 value: "nil", type: "NilClass", variablesReference: 27, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -717,7 +687,6 @@ def test_watch_works_correctly_1643810224 value: "nil", type: "NilClass", variablesReference: 28, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -823,7 +792,6 @@ def test_watch_works_correctly_1643810224 body: { type: "Integer", variablesReference: 29, - indexedVariables: 0, namedVariables: /\d+/, result: "4" } @@ -849,7 +817,6 @@ def test_watch_works_correctly_1643810224 name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 30 }, @@ -858,7 +825,6 @@ def test_watch_works_correctly_1643810224 presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -886,7 +852,6 @@ def test_watch_works_correctly_1643810224 value: "main", type: "Object", variablesReference: 31, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -894,7 +859,6 @@ def test_watch_works_correctly_1643810224 value: "4", type: "Integer", variablesReference: 32, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -902,7 +866,6 @@ def test_watch_works_correctly_1643810224 value: "nil", type: "NilClass", variablesReference: 33, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -910,7 +873,6 @@ def test_watch_works_correctly_1643810224 value: "nil", type: "NilClass", variablesReference: 34, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -918,7 +880,6 @@ def test_watch_works_correctly_1643810224 value: "nil", type: "NilClass", variablesReference: 35, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -1024,7 +985,6 @@ def test_watch_works_correctly_1643810224 body: { type: "Integer", variablesReference: 36, - indexedVariables: 0, namedVariables: /\d+/, result: "4" } @@ -1050,7 +1010,6 @@ def test_watch_works_correctly_1643810224 name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 37 }, @@ -1059,7 +1018,6 @@ def test_watch_works_correctly_1643810224 presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -1087,7 +1045,6 @@ def test_watch_works_correctly_1643810224 value: "main", type: "Object", variablesReference: 38, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -1095,7 +1052,6 @@ def test_watch_works_correctly_1643810224 value: "4", type: "Integer", variablesReference: 39, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -1103,7 +1059,6 @@ def test_watch_works_correctly_1643810224 value: "4", type: "Integer", variablesReference: 40, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -1111,7 +1066,6 @@ def test_watch_works_correctly_1643810224 value: "nil", type: "NilClass", variablesReference: 41, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -1119,7 +1073,6 @@ def test_watch_works_correctly_1643810224 value: "nil", type: "NilClass", variablesReference: 42, - indexedVariables: 0, namedVariables: /\d+/ } ] @@ -1225,7 +1178,6 @@ def test_watch_works_correctly_1643810224 body: { type: "Integer", variablesReference: 43, - indexedVariables: 0, namedVariables: /\d+/, result: "5" } @@ -1251,7 +1203,6 @@ def test_watch_works_correctly_1643810224 name: "Local variables", presentationHint: "locals", namedVariables: /\d+/, - indexedVariables: 0, expensive: false, variablesReference: 44 }, @@ -1260,7 +1211,6 @@ def test_watch_works_correctly_1643810224 presentationHint: "globals", variablesReference: 1, namedVariables: /\d+/, - indexedVariables: 0, expensive: false } ] @@ -1288,7 +1238,6 @@ def test_watch_works_correctly_1643810224 value: "main", type: "Object", variablesReference: 45, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -1296,7 +1245,6 @@ def test_watch_works_correctly_1643810224 value: "5", type: "Integer", variablesReference: 46, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -1304,7 +1252,6 @@ def test_watch_works_correctly_1643810224 value: "4", type: "Integer", variablesReference: 47, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -1312,7 +1259,6 @@ def test_watch_works_correctly_1643810224 value: "nil", type: "NilClass", variablesReference: 48, - indexedVariables: 0, namedVariables: /\d+/ }, { @@ -1320,7 +1266,6 @@ def test_watch_works_correctly_1643810224 value: "nil", type: "NilClass", variablesReference: 49, - indexedVariables: 0, namedVariables: /\d+/ } ]