Module: Debugger::DisplayFunctions

Defined in:
lib/ruby-debug/commands/display.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#display_expression(exp) ⇒ Object



3
4
5
# File 'lib/ruby-debug/commands/display.rb', line 3

def display_expression(exp)
  print pr("display.result", n: @state.display.size, exp: exp, result: debug_silent_eval(exp))
end


7
8
9
10
11
12
13
# File 'lib/ruby-debug/commands/display.rb', line 7

def print_display_expressions
  result = prc("display.result", @state.display) do |item, index|
    is_active, expression = item
    {n: index + 1, exp: expression, result: debug_silent_eval(expression)} if is_active
  end
  print result
end