Skip to content
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

Fix crash on TAB under ruby 2.7 #657

Merged

Conversation

terceiro
Copy link
Contributor

When IRB from ruby 2.7 is loaded, it installs a Readline completion proc
that assumes IRB is running (and crashes otherwise). Workaround this by
clearing the Readline completion when using it directly.

Fixes #654

@deivid-rodriguez
Copy link
Owner

Thanks for this @terceiro. Hope to merge and release soon.

@deivid-rodriguez
Copy link
Owner

@terceiro Could you rebase this PR and add a changelog entry? Hopefully the CI is fixed now.

@deivid-rodriguez
Copy link
Owner

Also, I'd like to get this tested but it doesn't sound too easy. I'll give it a quick look and if I can't find an easy way I'll just ship it without tests. Of course, feel free to also try to figure out yourself too if you'd like to :)

@terceiro
Copy link
Contributor Author

@deivid-rodriguez updated; sorry I can't think of a way of testing this cleanly

@terceiro
Copy link
Contributor Author

I don't know what's the issue with the CI

@deivid-rodriguez
Copy link
Owner

Weird, I'll have a look!

@deivid-rodriguez deivid-rodriguez force-pushed the fix-crash-on-ruby-2.7 branch 2 times, most recently from c6fdcfc to 092a4b1 Compare April 14, 2020 19:20
@deivid-rodriguez
Copy link
Owner

@terceiro I rebased this PR to trigger the CI and there's some issues on Windows that I believe are related to this changeset :(. I'll try to figure it out.

@deivid-rodriguez deivid-rodriguez force-pushed the fix-crash-on-ruby-2.7 branch 2 times, most recently from 4b99423 to f4e0f4b Compare April 16, 2020 22:18
When IRB from ruby 2.7 is loaded, it installs a Readline completion proc
that assumes IRB is running (and crashes otherwise). Workaround this by
clearing the Readline completion when using it directly.
@deivid-rodriguez
Copy link
Owner

I added a test and a few tweaks.

I also added a workaround for the Windows CI. I don't think it really fixes the problem there, but it will will only affect a very limited subset of Windows users (only those using a version of ruby on Windows older than the latest patch levels, and using a custom readline completion proc). I'll wait for reports of those and leave it as it is now.

Thanks for fixing this @terceiro, I'll release this ASAP.

@deivid-rodriguez deivid-rodriguez merged commit 7c4aad4 into deivid-rodriguez:master Apr 17, 2020
@deivid-rodriguez
Copy link
Owner

11.1.2 is out!

@terceiro
Copy link
Contributor Author

terceiro commented Apr 17, 2020 via email

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Apr 27, 2020
Update ruby-byebug to 11.1.3.


## [11.1.3] - 2020-04-23

### Fixed

* [#674](deivid-rodriguez/byebug#674): crash when using byebug on ruby 2.7.0 on Windows.

## [11.1.2] - 2020-04-17

### Fixed

* [#657](deivid-rodriguez/byebug#657): crash when hitting \<TAB\> due to IRB completion mechanism included in the default ruby 2.7 version of the `irb` gem ([@terceiro]).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hitting TAB causes a crash on ruby 2.7 (but not on ruby 2.5)
2 participants