diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2019-05-29 09:02:39 +0900 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2019-05-29 09:05:26 +0900 |
commit | 98ba116d402e7c255dae78ce43b76723a56c4cb7 (patch) | |
tree | 97540786348f4a7397036b0e533faf902f3d5003 /lib/reline.rb | |
parent | 797d7efde18c5f7acf5264047842fd974f383ca9 (diff) | |
download | ruby-98ba116d402e7c255dae78ce43b76723a56c4cb7.tar.gz |
Revert 3b7862c8e88cd7838a53ec083ac5733386400956 causing various CI hangs
and dependent commits c67934b1c3b40dda5f170b032423e520511c68dd and
f0d1dc5cee87dfb023cb43a2db9bcdef5a8dee8f.
RubyCI and ci.rvm.jp are almost dead by timeout since this commit.
---
Revert "Skip a reline test hanging on Wercker since 3b7862c8e8"
This reverts commit f0d1dc5cee87dfb023cb43a2db9bcdef5a8dee8f.
Revert "Remove extra items because Reline::HISTORY is a sized queue"
This reverts commit c67934b1c3b40dda5f170b032423e520511c68dd.
Revert "Use existing instances for LineEditor and Config"
This reverts commit 3b7862c8e88cd7838a53ec083ac5733386400956.
Diffstat (limited to 'lib/reline.rb')
-rw-r--r-- | lib/reline.rb | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/lib/reline.rb b/lib/reline.rb index 8e7d4ff016..656fab2fea 100644 --- a/lib/reline.rb +++ b/lib/reline.rb @@ -45,28 +45,11 @@ module Reline super(index, String.new(val, encoding: Encoding::default_external)) end - def concat(*val) - val.each do |v| - push(*v) - end - end - def push(*val) - diff = size + val.size - @@config.history_size - if diff > 0 - if diff <= size - shift(diff) - else - diff -= size - clear - val.shift(diff) - end - end super(*(val.map{ |v| String.new(v, encoding: Encoding::default_external) })) end def <<(val) - shift if size + 1 > @@config.history_size super(String.new(val, encoding: Encoding::default_external)) end |