403Webshell
Server IP : 217.160.0.244  /  Your IP : 216.73.217.61
Web Server : Apache
System : Linux infong-eu155 4.4.400-icpu-108 #2 SMP Wed Feb 11 11:51:01 UTC 2026 x86_64
User : u100174116 ( 6746176)
PHP Version : 8.5.10
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/lib/ruby/gems/3.3.0/gems/power_assert-2.0.3/lib/power_assert/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/lib/ruby/gems/3.3.0/gems/power_assert-2.0.3/lib/power_assert/inspector.rb
require 'power_assert/configuration'
begin
  require 'io/console/size'
rescue LoadError
end

module PowerAssert
  class InspectedValue
    def initialize(value)
      @value = value
    end

    def inspect
      @value
    end
  end
  private_constant :InspectedValue

  class SafeInspectable
    def initialize(value)
      @value = value
    end

    def inspect
      inspected = @value.inspect
      if Encoding.compatible?(Encoding.default_external, inspected)
        inspected
      else
        begin
          "#{inspected.encode(Encoding.default_external)}(#{inspected.encoding})"
        rescue Encoding::UndefinedConversionError, Encoding::InvalidByteSequenceError
          inspected.force_encoding(Encoding.default_external)
        end
      end
    rescue => e
      "InspectionFailure: #{e.class}: #{e.message.each_line.first}"
    end
  end
  private_constant :SafeInspectable

  class Inspector
    def initialize(value, indent)
      @value = value
      @indent = indent
    end

    def inspect
      if PowerAssert.configuration.colorize_message
        if PowerAssert.configuration.inspector == :pp
          console_width = IO.respond_to?(:console_size) ? IO.console_size[1] : 80
          width = [console_width - 1 - @indent, 10].max
          IRB::ColorPrinter.pp(@value, '', width)
        else
          IRB::Color.colorize_code(@value.to_s, ignore_error: true)
        end
      else
        if PowerAssert.configuration.inspector == :pp
          PP.pp(@value, '')
        else
          @value.inspect
        end
      end
    end
  end
  private_constant :Inspector
end

Youez - 2016 - github.com/yon3zu
LinuXploit