diff options
author | aycabta <aycabta@gmail.com> | 2020-01-12 22:24:17 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2020-01-14 15:40:38 +0900 |
commit | f8ea2860b0cac1aec79978e6c44168802958e8af (patch) | |
tree | c34b0ee9cd9d6b2b7a4fc494d0f9563a7ce97968 /lib/reline/general_io.rb | |
parent | c94025b63091be5b5e83a2f5ab5dc8d6c6147b84 (diff) | |
download | ruby-f8ea2860b0cac1aec79978e6c44168802958e8af.tar.gz |
Introduce an abstracted structure about the encoding of Reline
The command prompt on Windows always uses Unicode to take input and print
output but most Reline implementation depends on Encoding.default_external.
This commit introduces an abstracted structure about the encoding of Reline.
Diffstat (limited to 'lib/reline/general_io.rb')
-rw-r--r-- | lib/reline/general_io.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/reline/general_io.rb b/lib/reline/general_io.rb index 291c14c7b3..6281d5fbf6 100644 --- a/lib/reline/general_io.rb +++ b/lib/reline/general_io.rb @@ -1,6 +1,10 @@ require 'timeout' class Reline::GeneralIO + def self.encoding + Encoding.default_external + end + RAW_KEYSTROKE_CONFIG = {} @@buf = [] |