Browse files

Fixes #64: fix crash when pressing Ctrl-r Ctrl-r

Under Ruby 1.9, pressing Ctrl-r or any of the other special search keys
while already performing an interactive search would raise an exeption.

Tested-by: Mark Somerville <> [F17, MRI 1.9.3/1.8.7]
Signed-off-by: Mark Somerville <>
  • Loading branch information...
Spakman committed Jul 11, 2012
1 parent f3d615f commit 0f2cc1390ce11dd88f85b34aaebf9b1b12dbf5f9
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/rbreadline.rb
@@ -3973,7 +3973,7 @@ def _rl_isearch_dispatch(cxt, c)
# variable isearch-terminators) are used to terminate the search but
# not subsequently execute the character as a command. The default
# value is "\033\012" (ESC and C-J).
- if (cxt.search_terminators.include?(cxt.lastc))
+ if (cxt.search_terminators.include?(cxt.lastc.to_s))
# ESC still terminates the search, but if there is pending
#input or if input arrives within 0.1 seconds (on systems
#with select(2)) it is used as a prefix character

0 comments on commit 0f2cc13

Please sign in to comment.