If I do a reverse interactive search in irb, then enter a control character (the arrow keys are the only ones I've seen with this). Therefore, I start with this session:
$ irb >> print "hello" hello
then enter ^r,h
^r
h
$ irb >> print "hello" hello (reverse-i-search)`he': print "hello"
So far so good. Then I press the left arrow, and in the end I get the following:
$ irb >> print "hello" hello >> print "[Dhello"
Subsequent use of the arrows usually moves the cursor.
This will not solve your problem, but at least I can answer your question (why):
, ESC, [ D. ( , read , ^[[D, ^[ escape.)
read
^[[D
^[
- irb ESC, ; ESC , [D . readline, Bash Python , ledit (, - ^^) .
irb
[D
ledit
- , , , ESC . , , .
vi?
~ $ irb 1.9.3p392 :001 > Readline.vi_editing_mode? => true
$HOME/.inputrc set editing-mode vi. "" .
$HOME/.inputrc
set editing-mode vi
@JoLiss, readline (bash ..) ; AFAICT, Ruby. .: http://bugs.ruby-lang.org/issues/7859#change-36333