Bug in IRb?

I’m trying to track down a long standing issue with my IRb setup that
is very annoying. To test, I’ve commented out everything in
my .irbrc file and then loaded IRb with:

$ irb --readline

Now, these steps show the problem:

  1. Type: “1 < 405”
  2. Push the left arrow until your cursor is on the space before the 4
    (5 times)
  3. Use a backward delete key to remove the <
  4. Push the right arrow to move to the end of the line (5 times)
  5. Try to type: "

IRb ignores my typing at this point. Can anyone else confirm that
they see this behavior?

James Edward G. II

Hello,

I can’t confirm this behavior here on my Ubuntu 7.10 machine. But I had
some time ago similar problems with vi/vim on a server machine. I was
unable to use the backward delete key - I had all the time a beep. Don’t
know if it has something to do with your problem but maybe you have to
search on a different place to solve it.

Janek

James Edward G. II schrieb:

On Nov 18, 10:54 am, James Edward G. II [email protected]
wrote:

(5 times)
3. Use a backward delete key to remove the <
4. Push the right arrow to move to the end of the line (5 times)
5. Try to type: "

IRb ignores my typing at this point. Can anyone else confirm that
they see this behavior?

James Edward G. II

Not happening for me. I’m using irb 0.9.5(05/04/13)/ruby 1.8.4
(2006-02-24) [x86_64-linux]. I did exactly what you described except
used irb -f --readline rather than commenting out my .irbrc.

Jeremy

On Mon, Nov 19, 2007 at 01:54:17AM +0900, James Edward G. II wrote:

times)
3. Use a backward delete key to remove the <
4. Push the right arrow to move to the end of the line (5 times)
5. Try to type: "

IRb ignores my typing at this point. Can anyone else confirm that they see
this behavior?

I do not see your behavoir. I tried both with commenting out the
contents of my .irbrc fila and using ‘irb -f --readline’.

enjoy,

-jeremy

On Nov 18, 2007, at 12:51 PM, Ben B. wrote:

where certain keys (notably meta-b) would cause the command line to
just
lock up until I hit ctrl-c.

Thanks for all the tips. It seems to be something specific with my
environment and I’ll try to track it down.

James Edward G. II

On Mon, Nov 19, 2007, James Edward G. II wrote:

IRb ignores my typing at this point. Can anyone else confirm that
they see this behavior?

It’s probably something to do with the way your terminal is set up and
what it’s sending on your backward delete. Are you using a funky
terminal or keyboard or anything like that?

I’ve seen similar problems when SSHing from my mac to older *BSD boxes,
where certain keys (notably meta-b) would cause the command line to just
lock up until I hit ctrl-c.

Ben

On Nov 18, 2007, at 1:00 PM, Jay L. wrote:

they see this behavior?

Nope! Doesn’t happen for me, either on Cygwin 1.5.24 with Ruby 1.8.6
(2007-03-13) or Ubuntu Dapper with Ruby 1.8.4 (2005-12-24).

I imagine it’s something weird in your .inputrc, but I’ve never
been good
at the terminal stuff - too many legacy layers.

What platform are you on?

Mac OS X (Tiger)

Also, I should point out that it’s not possible to move the arrow
right 5
times (at least on my systems) - you’ve deleted one character, so
there’s
only 4 characters to go back over.

I said backward delete. There should still be the same number of
characters in front of your cursor after that operation.

James Edward G. II

On Sun, 18 Nov 2007 14:05:27 -0500, James Edward G. II wrote:

What platform are you on?

Mac OS X (Tiger)

OK, my MacBook’s got an uncharged battery at the moment, but I can try
there later if you haven’t figured it out yet.

Also, I should point out that it’s not possible to move the arrow

I said backward delete. There should still be the same number of
characters in front of your cursor after that operation.

D’oh! I am so used to people saying “backslash” when they mean “forward
slash” that I mentally unescaped your backwards-delete. :slight_smile:

So that means, assuming I can still count, that you’re actually typing
those quotation marks (e.g. double-quote one space less-than space four
zero five double-quote). I didn’t realize that either. Oops again.

Still can’t replicate on Cygwin or Ubunutu, FWIW.

On Sun, 18 Nov 2007 11:54:17 -0500, James Edward G. II wrote:

  1. Type: “1 < 405”
  2. Push the left arrow until your cursor is on the space before the 4
    (5 times)
  3. Use a backward delete key to remove the <
  4. Push the right arrow to move to the end of the line (5 times)
  5. Try to type: "

IRb ignores my typing at this point. Can anyone else confirm that
they see this behavior?

Nope! Doesn’t happen for me, either on Cygwin 1.5.24 with Ruby 1.8.6
(2007-03-13) or Ubuntu Dapper with Ruby 1.8.4 (2005-12-24).

I imagine it’s something weird in your .inputrc, but I’ve never been
good
at the terminal stuff - too many legacy layers.

What platform are you on?

Also, I should point out that it’s not possible to move the arrow right
5
times (at least on my systems) - you’ve deleted one character, so
there’s
only 4 characters to go back over. If you’re really able to move it
five
times, that could be a clue right there. A clue about what, I have no
idea.

On Nov 18, 2007, at 1:55 PM, Jay L. wrote:

  1. Use a backward delete key to remove the <
    I imagine it’s something weird in your .inputrc, but I’ve never
    Also, I should point out that it’s not possible to move the arrow
    four
    zero five double-quote).

Yes, I am typing the quotes.

James Edward G. II