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

Prepare for Ruby 3.3 #914

Merged
merged 4 commits into from
Dec 24, 2023
Merged

Prepare for Ruby 3.3 #914

merged 4 commits into from
Dec 24, 2023

Conversation

mvz
Copy link
Contributor

@mvz mvz commented Dec 17, 2023

Summary

Prepare for upcoming Ruby 3.3

Details

This pull request consists of the following changes:

  • Test with Ruby 3.3.0-preview3 in CI. This tests that Aruba is ready for Ruby 3.3
  • Use irb instead of pry in the interactive debugging scenario. This fixes an issue in the Cucumber scenario's. This issue occurs because our output streams are not reall TTYs. See cucumber scenarios fail with ruby 3.3 #910 for details.
  • Stop requiring 'irb/ext/save-history' extension in Aruba console. This extension has been renamed and did not do what its old name said.
  • Ensure irb uses a consistent prompt format in tests on all Ruby versions.

Motivation and Context

Mainly, #910.

How Has This Been Tested?

I ran the Cucumber scenario with the added gem in Ruby 3.3.0-preview3. I also tried just setting TERM=dumb as in rails/rails#48369 but that didn't work.

Types of changes

  • Internal change (refactoring, test improvements, developer experience or update of dependencies)

Checklist:

  • I've added tests for my code
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@mvz mvz marked this pull request as draft December 17, 2023 11:12
@mvz mvz force-pushed the prepare-for-ruby-3-3 branch from e83a922 to 801284c Compare December 23, 2023 21:34
In Ruby 3.3, requiring readline does not load the real readline library
but falls back to reline by default. This creates odd output when the
terminal is not a real TTY and a prompt is used when getting input.
Because pry uses a prompt, this makes the interactive debugging scenario
fail.

This change works around this issue by switching to irb. Irb will not
use a prompt, possibly because the output is not a TTY.

See #910. Also, see
ruby/reline#616 for the resulting reline
issue.
@mvz mvz force-pushed the prepare-for-ruby-3-3 branch from 801284c to bdf5ede Compare December 23, 2023 21:58
mvz added 2 commits December 24, 2023 08:15
See ruby/irb#623. The file was removed and the
corresponding feature should be activated by setting :EVAL_HISTORY.
The default prompt format for irb changed in Ruby 3.3. Using the classic
format instead ensures the same result is achieved in all Ruby versions.
@mvz mvz marked this pull request as ready for review December 24, 2023 08:29
@mvz mvz merged commit 5371abc into main Dec 24, 2023
17 checks passed
@mvz mvz deleted the prepare-for-ruby-3-3 branch December 24, 2023 15:02
@mvz mvz mentioned this pull request Nov 10, 2024
8 tasks
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.

1 participant