Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@andrehjr
Copy link
Member

@andrehjr andrehjr commented Apr 21, 2025

This PR intends to fix Readline compatibility with 3.5+. However, other issues that may have changed in Ruby 3.5 still need to be addressed.

In order to work out of the box in any project, the following changes are necessary:

  • As Reline/Readline is no longer available as default/bundled gems on Ruby 4.0+. Adding reline/readline as a dependency is necessary. I'll go with Reline, since it's the standard now.
  • The trade-off here is that Reline only supports Ruby >=2.6. I'll take this opportunity to drop support for older Ruby versions. Pry will still try to use whatever Readline-like library is available.

Fixes #2348

@enescakir
Copy link

Loading pry-0.15.2 in Ruby 3.4.3 gives a warning:

./ruby/3.4.3/lib/ruby/3.4.0/readline.rb:4: warning: reline was loaded from the standard library, but will no longer be part of the default gems starting from Ruby 3.5.0.
You can add reline to your Gemfile or gemspec to silence this warning.

Since this PR adds require 'reline', it will continue to show this warning, right?

Should I create a PR to add reline to gemspec file as dependency?

@andrehjr andrehjr force-pushed the no-readline-installed branch 4 times, most recently from 71b1b88 to 894c8c7 Compare December 13, 2025 12:12
@andrehjr andrehjr force-pushed the no-readline-installed branch from 94e4be8 to 090822b Compare December 13, 2025 14:23
@andrehjr andrehjr marked this pull request as ready for review December 14, 2025 14:19
@andrehjr andrehjr changed the title Do not rely on Readline being available for Ruby 3.5+ Do not rely on Readline/Reline being available for Ruby 3.5+ Dec 14, 2025
@andrehjr andrehjr merged commit e9ac449 into pry:master Dec 14, 2025
13 checks passed
@andrehjr andrehjr mentioned this pull request Dec 25, 2025
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.

Tests won't run on Ruby 3.5 not built with --with-readline flag

2 participants