New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pasting certain things into Pry console doesn't work in Ruby 3.3.0 #2297
Comments
I can confirm the first one. But for the second one, i get same output as ruby 3.2.1 (i guess both of them formatted by AwesomePrint), but, 3.3.0 is really slow, as describe by you. |
To add more info. Adding readline-ext back fixes some things. I believe this is due Readline being replaced with Reline on Ruby 3.3. |
It works! |
Thank you both! Adding the |
The behavior difference between Readline and Reline that cause this issue is lack of bracketed paste mode support in Reline. With latest reline:
|
Awesome @tompng thanks! 🙌 |
Pry version: 0.14.2
Ruby version: 3.3.0
OS: Mac OS Sonoma 14.1
Hello, I recently upgraded a Rails project to Ruby 3.3.0 from Ruby 3.2.1 and found that my Pry console wasn't behaving like it used to when pasting certain code snippets into it. The first snippet that doesn't behave as expected when pasted in is:
With Ruby 3.3.0, Pry is interpreting
upcase
andgsub
as shell commands due to the leading.
. The output looks like this:I confirmed that this is not the case in Ruby 3.2.1. In Ruby 3.2.1 I get:
The second snippet that doesn't behave as expected when pasted is:
With Ruby 3.3.0, I get the following output:
As best I can tell, Pry is echoing back the string periodically as it attempts to read it in, rather than waiting for the string to finish being pasted in. In the example above I pressed the return key once Pry stopped producing new output; before I pressed return, the final line indicating that Pry is expecting more input was not displayed. I've also confirmed that this behaves as expected in Ruby 3.2.1:
Let me know if I can provide any other useful information, and thanks in advance!
The text was updated successfully, but these errors were encountered: