SILENT KILLERPanel

Current Path: > > opt > > alt > ruby32 > share > ruby > error_highlight


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt//alt/ruby32/share/ruby/error_highlight

NameTypeSizeLast ModifiedActions
base.rb File 14217 bytes April 24 2025 07:53:44.
core_ext.rb File 1416 bytes April 24 2025 07:53:44.
formatter.rb File 638 bytes April 24 2025 07:53:44.
version.rb File 46 bytes April 24 2025 07:53:44.

Reading File: //opt//alt/ruby32/share/ruby/error_highlight/formatter.rb

module ErrorHighlight
  class DefaultFormatter
    def self.message_for(spot)
      # currently only a one-line code snippet is supported
      if spot[:first_lineno] == spot[:last_lineno]
        indent = spot[:snippet][0...spot[:first_column]].gsub(/[^\t]/, " ")
        marker = indent + "^" * (spot[:last_column] - spot[:first_column])

        "\n\n#{ spot[:snippet] }#{ marker }"
      else
        ""
      end
    end
  end

  def self.formatter
    Ractor.current[:__error_highlight_formatter__] || DefaultFormatter
  end

  def self.formatter=(formatter)
    Ractor.current[:__error_highlight_formatter__] = formatter
  end
end

SILENT KILLER Tool