nonsequitur / inf-ruby

218 stars 69 forks source link

Some display errors #137

Closed Spdwal closed 4 years ago

Spdwal commented 4 years ago

Hello Sir, I use inf-ruby in Mr. Purcell’s Emacs configuration, my Emacs version is 26.1, the system version is Macos 10.15.6, and the ruby version is 2.7.0. When using inf-ruby, I encountered that the interpreter could not correctly display the input symbol of irb after outputting the result. The following is an example of use:

2.7.0 :001 > 1 + 1
 => 2 
3.times{print "Hello world\n"}
2.7.0 :002 > Hello world
Hello world
Hello world
 => 3 
dgutov commented 4 years ago

It's a somewhat known problem with 2.7.

Apparently it's how it behaves when launched with --noreadline.

It hasn't been too urgent because most people use something like inf-ruby-console-auto, which don't add --noreadline.

The quick fix would be to remove that argument from the default invocation. But that might be problematic with rubies build without Readline support (I guess?), example: https://github.com/nonsequitur/inf-ruby/issues/51

dgutov commented 4 years ago

OK, filed an issue on Irb's tracker.

I'll push the workaround now.

dgutov commented 4 years ago

@Spdwal Please let me know if it helped.

Spdwal commented 4 years ago

Thank you very much. It works correctly.

dgutov commented 1 year ago

FWIW, this issue regressed with the fix for #159.

And it doesn't seem like we have a solution which would satisfy both problems (though someone could verify whether IRB 1.2.x with works okay with Reline). Installing IRB >= 1.3.0 seems to be the best recommendation either way.