$96 GRAYBYTE WORDPRESS FILE MANAGER $94

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.157
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/cpanel/ea-ruby27/root/usr/share/ruby/ruby-2.7.8/reline/

HOME
Current File : /opt/cpanel/ea-ruby27/root/usr/share/ruby/ruby-2.7.8/reline//history.rb
class Reline::History < Array
  def initialize(config)
    @config = config
  end

  def to_s
    'HISTORY'
  end

  def delete_at(index)
    index = check_index(index)
    super(index)
  end

  def [](index)
    index = check_index(index) unless index.is_a?(Range)
    super(index)
  end

  def []=(index, val)
    index = check_index(index)
    super(index, String.new(val, encoding: Reline.encoding_system_needs))
  end

  def concat(*val)
    val.each do |v|
      push(*v)
    end
  end

  def push(*val)
    # If history_size is zero, all histories are dropped.
    return self if @config.history_size.zero?
    # If history_size is negative, history size is unlimited.
    if @config.history_size.positive?
      diff = size + val.size - @config.history_size
      if diff > 0
        if diff <= size
          shift(diff)
        else
          diff -= size
          clear
          val.shift(diff)
        end
      end
    end
    super(*(val.map{ |v|
      String.new(v, encoding: Reline.encoding_system_needs)
    }))
  end

  def <<(val)
    # If history_size is zero, all histories are dropped.
    return self if @config.history_size.zero?
    # If history_size is negative, history size is unlimited.
    if @config.history_size.positive?
      shift if size + 1 > @config.history_size
    end
    super(String.new(val, encoding: Reline.encoding_system_needs))
  end

  private def check_index(index)
    index += size if index < 0
    if index < -2147483648 or 2147483647 < index
      raise RangeError.new("integer #{index} too big to convert to `int'")
    end
    # If history_size is negative, history size is unlimited.
    if @config.history_size.positive?
      if index < [email protected]_size or @config.history_size < index
        raise RangeError.new("index=<#{index}>")
      end
    end
    raise IndexError.new("index=<#{index}>") if index < 0 or size <= index
    index
  end
end


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
21 Mar 2024 10.21 AM
root / root
0755
key_actor
--
21 Mar 2024 10.21 AM
root / root
0755
unicode
--
21 Mar 2024 10.21 AM
root / root
0755
ansi.rb
4.734 KB
30 Mar 2023 12.34 PM
root / root
0644
config.rb
8.596 KB
30 Mar 2023 12.34 PM
root / root
0644
general_io.rb
1.015 KB
30 Mar 2023 12.34 PM
root / root
0644
history.rb
1.869 KB
30 Mar 2023 12.34 PM
root / root
0644
key_actor.rb
0.165 KB
30 Mar 2023 12.34 PM
root / root
0644
key_stroke.rb
1.223 KB
30 Mar 2023 12.34 PM
root / root
0644
kill_ring.rb
2.198 KB
30 Mar 2023 12.34 PM
root / root
0644
line_editor.rb
72.721 KB
30 Mar 2023 12.34 PM
root / root
0644
unicode.rb
18.542 KB
30 Mar 2023 12.34 PM
root / root
0644
version.rb
0.037 KB
30 Mar 2023 12.34 PM
root / root
0644
windows.rb
9.036 KB
30 Mar 2023 12.34 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF