Bug in IRb?

  • Thread starter James Edward Gray II
  • Start date
J

James Edward Gray II

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 Gray II
 
Y

yermej

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 Gray 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
 
J

Jeremy Hinegardner

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?

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
 
B

Ben Bleything

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
 
J

James Edward Gray II

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.

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

James Edward Gray II
 
J

James Edward Gray II

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 Gray II
 
J

James Edward Gray II

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.



D'oh! I am so used to people saying "backslash" when they mean
"forward
slash" that I mentally unescaped your backwards-delete. :)

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).

Yes, I am typing the quotes.

James Edward Gray II
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top