GRAYBYTE WORDPRESS FILE MANAGER7366

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.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
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/alt/ruby33/share/ruby/reline/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/alt/ruby33/share/ruby/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 < -@config.history_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

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
May 13 2025 08:35:34
root / linksafe
0755
io
--
May 13 2025 08:35:29
root / linksafe
0755
key_actor
--
May 13 2025 08:35:29
root / linksafe
0755
unicode
--
May 13 2025 08:35:29
root / linksafe
0755
config.rb
10.105 KB
April 24 2025 07:57:44
root / linksafe
0644
face.rb
4.785 KB
April 24 2025 07:57:44
root / linksafe
0644
history.rb
1.869 KB
April 24 2025 07:57:44
root / linksafe
0644
io.rb
0.678 KB
April 24 2025 07:57:44
root / linksafe
0644
key_actor.rb
0.201 KB
April 24 2025 07:57:44
root / linksafe
0644
key_stroke.rb
2.845 KB
April 24 2025 07:57:44
root / linksafe
0644
kill_ring.rb
2.372 KB
April 24 2025 07:57:44
root / linksafe
0644
line_editor.rb
81.424 KB
April 24 2025 07:57:44
root / linksafe
0644
terminfo.rb
4.556 KB
April 24 2025 07:57:44
root / linksafe
0644
unicode.rb
21.129 KB
April 24 2025 07:57:44
root / linksafe
0644
version.rb
0.038 KB
April 24 2025 07:57:44
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF