Skip to content

Conversation

@dentarg
Copy link
Member

@dentarg dentarg commented Feb 7, 2025

No description provided.

> warning: ostruct was loaded from the standard library, but will no
> longer be part of the default gems starting from Ruby 3.5.0.
Running the tests before this change included this warning in the output
(and causing them to fail):

    /usr/local/lib/ruby/3.4.0/readline.rb:4: warning: reline was loaded from
    the standard library, but w...from Ruby 3.5.0.\nYou can add reline to
    your Gemfile or gemspec to silence this warning.

This is because Thor requires "readline", and in Ruby 3.4, that will try
to load "reline":

    $ cat /Users/dentarg/.arm64_rubies/3.4.1/lib/ruby/3.4.0/readline.rb
    begin
      require "readline.#{RbConfig::CONFIG["DLEXT"]}"
    rescue LoadError
      require 'reline' unless defined? Reline
      Object.send(:remove_const, :Readline) if Object.const_defined?(:Readline)
      Readline = Reline
    end

This change is the same as rails/thor@7061b06

That change is part of Thor v1.0.0 and up, but vendoring that version
will be a future task (breaking changes in the CLI?).
Other projects having to address the same thing:

- haml/haml#1173
- rails/rails#53202
@dentarg dentarg merged commit c2be544 into main Feb 7, 2025
22 checks passed
@dentarg dentarg deleted the ruby-3.4/fix-specs branch February 7, 2025 16:39
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.

2 participants