Module: Readline
- Defined in:
- lib/termtter/system_extensions.rb
Class Method Summary collapse
Class Method Details
.old_readline ⇒ Object
12 |
# File 'lib/termtter/system_extensions.rb', line 12 alias :old_readline :readline |
.readline(*a) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/termtter/system_extensions.rb', line 13 def readline(*a) str = old_readline(*a) out = '' loop do begin out << $iconv_sj_to_u8.iconv(str) break rescue Iconv::Failure out << "#{$!.success}?" str = $!.failed[1..-1] end end return out end |