diff --git a/lib/highline/terminal.rb b/lib/highline/terminal.rb index b98a7a6..7e0078f 100644 --- a/lib/highline/terminal.rb +++ b/lib/highline/terminal.rb @@ -112,7 +112,7 @@ def get_line_with_readline(question, highline) def readline_read(question, highline) # prep auto-completion unless question.selection.empty? - Readline.completion_proc = lambda do |str| + Reline.completion_proc = lambda do |str| question.selection.grep(/\A#{Regexp.escape(str)}/) end end @@ -124,7 +124,7 @@ def readline_read(question, highline) raw_answer = run_preserving_stty do prompt = highline.render_and_ident_statement(question) - Readline.readline(prompt, true) + Reline.readline(prompt, true) end $VERBOSE = old_verbose diff --git a/test/acceptance/at_readline.rb b/test/acceptance/at_readline.rb index 5167394..fd5a63a 100644 --- a/test/acceptance/at_readline.rb +++ b/test/acceptance/at_readline.rb @@ -17,7 +17,7 @@ "that begins with the 'l' letter in this particular case.\n\n" \ "If I don't type any character but press two times, I should\n" \ "be able to see ALL available options.\n\n" \ - "Please, play with Readline autocomplete for a while, pressing \n" \ + "Please, play with Reline autocomplete for a while, pressing \n" \ "to see that it really gets the selected answer.\n" \ "When ready, just type 'exit' and the loop will finish.\n\n" \ "Don't forget to answer 'y' (yes) or 'n' (no) to the question at the end." @@ -33,5 +33,5 @@ end end - t.question = "Did the Readline autocomplete work fine (y/n)? " + t.question = "Did the Reline autocomplete work fine (y/n)? " end