module Byebug::VarFunctions
def var_class_self
def var_class_self obj = bb_eval('self') var_list(obj.class.class_variables, get_binding) end
def var_global
def var_global var_list(global_variables.reject { |v| [:$=, :$KCODE, :$-K].include?(v) }) end
def var_list(ary, b = get_binding)
def var_list(ary, b = get_binding) ary.sort! for v in ary begin s = bb_eval(v.to_s, b).inspect rescue begin s = bb_eval(v.to_s, b).to_s rescue s = "*Error in evaluation*" end end pad_with_dots(s) print "#{v} = #{s}\n" end end