Pure-Ruby Readline Implementation