Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation / Background
Rails has been testing Rails console with
readline
for a while. And recently due to the removal ofreadline
from default gems, it even needs to installreadline-ext
separately (#48183).However, given
reline
has become IRB's default for a while and now receives frequent updates from a group of maintainers (myself included), I think it's worth running those tests withoutreadline
instead.Detail
In addition to removing the
readline-ext
gem, this PR also has 2 changes:--singleline
flag, IRB will use Reline by default.TERM=dumb
, which is a convention in terminal programs to indicate reduced/minimum feature set, Reline will skip east-asian width detection, which was what caused the test to hang.I need to stress that the east-asian width detection is not a bug but an
improvement in Reline to help rendering east-asian characters correctly.
Readline actually can't do this well. Please see @tompng's great explanation
in ruby/irb#582 (comment)
However, this detection should not happen when the terminal is running in
PTY (usually used in test environment). The problem is that in Ruby we
don't have a way to detect if the terminal is running in TTY or PTY.
But by passing
TERM=dumb
, Reline will assume that the terminal is notcapable of several advanced features, including this east-asian width
detection.
Additional information
Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]