info_variables (Debugger)

    # File cli/ruby-debug/commands/info.rb, line 393
        def info_variables(*args)
          if not @state.context
            errmsg "info variables not available here.\n"
            return
          end
          obj = debug_eval('self')
          locals = @state.context.frame_locals(@state.frame_pos)
          locals['self'] = @state.context.frame_self(@state.frame_pos)
          locals.keys.sort.each do |name|
            next if name =~ /^__dbg_/ # skip debugger pollution
            ### FIXME: make a common routine
            begin
              s = "#{name} = #{locals[name].inspect}"
            rescue
              begin
                s = "#{name} = #{locals[name].to_s}"
              rescue
                s = "#{name} = *Error in evaluation*"
              end
            end
            if s.size > self.class.settings[:width]
              s[self.class.settings[:width]-3 .. -1] = "..."
            end
            s.gsub!('%', '%%')  # protect against printf format strings
            print "#{s}\n"
          end
          var_list(obj.instance_variables, obj.instance_eval{binding()})
          var_class_self
        end