[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Bug in IRb?

James Gray

11/18/2007 4:54:00 PM

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

8 Answers

yermej

11/18/2007 5:13:00 PM

0

On Nov 18, 10:54 am, James Edward Gray II <ja...@grayproductions.net>
wrote:
> 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

Jeremy Hinegardner

11/18/2007 5:16:00 PM

0

On Mon, Nov 19, 2007 at 01:54:17AM +0900, James Edward Gray II wrote:
> 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

--
========================================================================
Jeremy Hinegardner jeremy@hinegardner.org


Ben Bleything

11/18/2007 6:52:00 PM

0

On Mon, Nov 19, 2007, James Edward Gray 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

James Gray

11/18/2007 6:55:00 PM

0

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

> On Mon, Nov 19, 2007, James Edward Gray 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.

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

Jay Levitt

11/18/2007 6:56:00 PM

0

On Sun, 18 Nov 2007 11:54:17 -0500, James Edward Gray 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.

--
Jay Levitt |
Boston, MA | My character doesn't like it when they
Faster: jay at jay dot fm | cry or shout or hit.
http://... | - Kristoffer

James Gray

11/18/2007 7:05:00 PM

0

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

> On Sun, 18 Nov 2007 11:54:17 -0500, James Edward Gray 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?

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

Jay Levitt

11/18/2007 7:50:00 PM

0

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

> On Nov 18, 2007, at 1:00 PM, Jay Levitt wrote:
>
>> On Sun, 18 Nov 2007 11:54:17 -0500, James Edward Gray 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?
>
> 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. :)

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.

--
Jay Levitt |
Boston, MA | My character doesn't like it when they
Faster: jay at jay dot fm | cry or shout or hit.
http://... | - Kristoffer

James Gray

11/18/2007 8:55:00 PM

0

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

> On Sun, 18 Nov 2007 14:05:27 -0500, James Edward Gray II wrote:
>
>> On Nov 18, 2007, at 1:00 PM, Jay Levitt wrote:
>>
>>> On Sun, 18 Nov 2007 11:54:17 -0500, James Edward Gray 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?
>>
>> 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. :)
>
> 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