-
Notifications
You must be signed in to change notification settings - Fork 188
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
require "strscan.so" uses the strscan gem and does not work #2420
Comments
It's surprising that the strscan.so is even used in that case, maybe it was a bug of 21.1.0. Anyway we should probably make a PR to the strscan gem so it just does nothing on TruffleRuby since the strscan stdlib is a lot faster (no need to move every String to native or emulate the Onigmo C API) and with much less indirections. |
Makes sense. It's a dependency of one of the (removed in 3.1) net-* gems, so you're likely to see this more frequently going forward. When 3.1 is released properly, there's going to be a lot more code that just installs those gems unconditionally, as our yjit-bench version of Railsbench had been doing. There are definitely a lot of weird issues with having duplicates of the default CRuby built-in gems that then depend on other external-but-duplicate-a-builtin gems. Bundler's not dealing well with them either. |
ruby/strscan#35 will fix this. |
* This is necessary since lib/strscan.rb was added (#25), as the TruffleRuby stdlib strscan.rb is no longer found first by `require "strscan"`. * Write conditions in a way that any other Ruby implementation would simply use its stdlib until it is added explicit support in this gem. Fixes oracle/truffleruby#2420 Co-authored-by: Sutou Kouhei <[email protected]>
Fixed by ruby/strscan#35 |
However
require "strscan"
picks the stdlib and works fine:Even
bundle exec
picks the stdlib:Found by @noahgibbs in Shopify/yjit-bench#32 (comment)
strscan gem
The text was updated successfully, but these errors were encountered: