module Readline

Constants

NATIVE_REFRESH_LINE_METHOD

Latest 'readline.so' has native 'refresh_line' method.

Public Class Methods

old_readline(*a)
Alias for: readline
readline(*a) click to toggle source
# File lib/termtter/system_extensions/windows.rb, line 9
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
Also aliased as: old_readline
refresh_line() click to toggle source
# File lib/termtter/system_extensions.rb, line 20
def self.refresh_line
end
rl_parse_and_bind(str) click to toggle source
# File lib/termtter/system_extensions.rb, line 17
def self.rl_parse_and_bind(str)
  str
end

Private Instance Methods

old_readline(*a)
Alias for: readline
readline(*a) click to toggle source
# File lib/termtter/system_extensions/windows.rb, line 9
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
Also aliased as: old_readline