Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Prompt always delayed with --noreadline --nomultiline #127

Closed
dgutov opened this issue Aug 26, 2020 · 6 comments
Closed

Prompt always delayed with --noreadline --nomultiline #127

dgutov opened this issue Aug 26, 2020 · 6 comments

Comments

@dgutov
Copy link
Contributor

dgutov commented Aug 26, 2020

Description

What are your expected behavior and actual behavior of your environment?

Launch irb --nomultiline --noreadline.

After sending some input, I can only see the prompt if I press RET again. Here's how the session looks:

$ irb --noreadline --nomultiline
irb(main):001:0> 3
=> 3
4
irb(main):002:0> => 4
5
irb(main):003:0> => 5
6
irb(main):004:0> => 6

irb(main):005:0> irb(main):006:0> 7
=> 7
8
irb(main):007:0> => 8
8 + 9
irb(main):008:0> => 17

irb(main):009:0> irb(main):010:0> 

See another example in the original report: nonsequitur/inf-ruby#137

Terminal Emulator

What's your terminal emulator?

gnome-terminator, gnome-terminal and Emacs' comint all exhibit the problem.

Setting Files

Are you using ~/.irbrc and ~/.inputrc?

No.

@nobu
Copy link
Member

nobu commented Aug 26, 2020

What is your IRB::VERSION?

@dgutov
Copy link
Contributor Author

dgutov commented Aug 26, 2020

1.2.3

@dgutov
Copy link
Contributor Author

dgutov commented Aug 26, 2020

1.2.4 also behaves the same.

@stoyanovskiy239
Copy link

stoyanovskiy239 commented Dec 4, 2020

The problem persists in 1.2.6 and 1.2.7.
Seems to be a regression given that StdioInputMethod works fine on Ruby 2.6.5 and irb 1.0.0 (bash, macOS Catalina)

UNIT-1622:~ sergey.stoyanovsky$ rvm use 2.6
Using /Users/sergey.stoyanovsky/.rvm/gems/ruby-2.6.5
UNIT-1622:~ sergey.stoyanovsky$ irb -v
irb 1.0.0 (2018-12-18)
UNIT-1622:~ sergey.stoyanovsky$ irb --noreadline
2.6.5 :001 > 1
 => 1 
2.6.5 :002 > 2
 => 2 
2.6.5 :003 > 3
 => 3 
2.6.5 :004 > irb_context.io.inspect
 => "#<IRB::StdioInputMethod:0x00007ff5fe101778 @file_name=\"(line)\", @line_no=4, @line=[nil, \"1\\n\", \"2\\n\", \"3\\n\", \"irb_context.io.inspect\\n\"], @stdin=#<IO:fd 0>, @stdout=#<IO:fd 1>, @prompt=\"2.6.5 :004 > \">" 

@aycabta
Copy link
Member

aycabta commented Dec 26, 2020

@dgutov @stoyanovskiy239 I think this is fixed by #152. Would you check the latest irb and reline gem by gem install irb reline?

@dgutov
Copy link
Contributor Author

dgutov commented Dec 26, 2020

Looks fixed indeed, with irb 1.3.0 and reline 0.2.0.

Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

No branches or pull requests

4 participants