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

Autoload JSON::GenericObject to avoid require ostruct warning in Ruby 3.4 #577

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

tompng
Copy link
Member

@tompng tompng commented Apr 3, 2024

Fixes this warning

# ruby -v
ruby 3.4.0dev (2024-04-03T00:55:24Z master b664590c4d) [x86_64-linux]
# echo > Gemfile
# bundle exec ruby -e "require 'json'"
/opt/ruby/lib/ruby/3.4.0+0/json/generic_object.rb:3: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.5.0. Add ostruct to your Gemfile or gemspec.
# echo "gem 'rbs'" > Gemfile
# bundle exec irb
(press a[TAB])
irb(main):001> a/opt/ruby/lib/ruby/3.4.0+0/json/generic_object.rb:3: warning: ostruct was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.5.0. Add ostruct to your Gemfile or gemspec.       abort    
               alias    
               and      
               at_exit  
               autoload 
               autoload?

@hsbt hsbt merged commit cdbcbd0 into ruby:master Apr 4, 2024
73 checks passed
@tompng tompng deleted the autoload_generic_object branch April 4, 2024 04:28
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