aboutsummaryrefslogtreecommitdiffstats
path: root/lib/reline.rb
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2019-05-27 10:09:21 +0900
committeraycabta <aycabta@gmail.com>2019-05-27 10:09:21 +0900
commit1d301acbe8e9b0df7872d6719d6646ade25630d6 (patch)
tree35c730726b0bd7cd68b8037609a5a56d44138171 /lib/reline.rb
parent9c136f3dea0c6052fefb377bf2c445daec1ca0b6 (diff)
downloadruby-1d301acbe8e9b0df7872d6719d6646ade25630d6.tar.gz
Fix rendering bug of ^D
Diffstat (limited to 'lib/reline.rb')
-rw-r--r--lib/reline.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/reline.rb b/lib/reline.rb
index aef750813e..0b6eddf498 100644
--- a/lib/reline.rb
+++ b/lib/reline.rb
@@ -254,6 +254,10 @@ module Reline
[preposing, block, postposing]
end
+ def eof?
+ @@line_editor.eof?
+ end
+
def readmultiline(prompt = '', add_hist = false, &confirm_multiline_termination)
unless confirm_multiline_termination
raise ArgumentError.new('#readmultiline needs block to confirm multiline termination')