Closed wildmaples closed 10 months ago
Here's a reproducible snippet:
Given this file (test.rb
):
require "bundler/inline"
gemfile(true, quiet: true) do
source "https://rubygems.org"
gem "ruby_parser"
end
require "racc/parser"
puts Racc::Parser
With Ruby 3.2.2
:
$ ruby test.rb
Racc::Parser
With Ruby 3.3.0-rc1
:
$ ruby test.rb
/Users/foo/.rbenv/versions/3.3.0-rc1/lib/ruby/3.3.0+0/bundled_gems.rb:68:in `require': cannot load such file -- racc/parser (LoadError)
...
@zenspider 🙏 mind taking a look to see if this makes sense? Thank you
Done! Will be released shortly. Thanks!
👋 Hello! I am not sure if this is the right change but figured I'd put up a PR anyway.
In Ruby 3.3, racc goes from a default gem to a bundled gem (release page), making it behave like a normal gem. I believe we should explicitly require racc as a runtime dependency.
We were seeing errors like these in libraries that uses ruby_parser on 3.3 that tries to load
racc/parser
but fails.