-
-
Notifications
You must be signed in to change notification settings - Fork 937
Implement Ruby 4.0 support #9069
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
Draft
headius
wants to merge
43
commits into
master
Choose a base branch
from
ruby-4.0
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+911
−1,972
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
Author
|
Currently still marked as 3.5, since that's what specs and other updates expect currently. Will bump to 4.0 whenever it looks like that's officially propagated through the other libraries and tests. |
Several updated gems do not have releases yet: * RubyGems 4.0.0.dev * bundler 4.0.0.dev * stringio 3.1.8.dev * strscan 3.1.6.dev And the usual CRuby-specific extension gems remain excluded.
This problem does not seem to be going away, so ignore all missing extensions on JRuby for now. See ruby/rubygems#3520
We removed the ability to automatically load extensions from jars
many years ago, but this test remained. It only continued to pass
because some other library loaded the 'json' library which meant
that the tested classes were available. When this same example is
run outside of the test suite, it fails:
```
$ cx jruby-10.0.2.0 ruby -e "require 'uri:file:./lib/ruby/stdlib/json/ext/parser'; p JSON::Ext::Parser"
NameError: uninitialized constant JSON::Ext::Parser
const_missing at org/jruby/RubyModule.java:4866
<main> at -e:1
```
Because this functionality no longer exists, I am removing the
test.
A few additional stdlib were added in 4.0 so this archive is now a bit larger.
Testing all of these features together does not show useful information when one of them is not pre-required, and basing the spec name off the list of expected features means it cannot be reliably tagged for exclusion. The change here makes this a separate subprocess run for each provided library, which improves the spec in a few different ways: * Descriptions are meaningful and can be individually tagged. Previously, any change to the list of features would cause the spec description to change and error output did not clearly indicate which feature failed. * Failed requires are represented with the string "error" so that failure output is useful. Previous logic would just report that the subprocess failed. * Implementation-specific features do not have to be filtered out. Both CRuby and JRuby have features at boot that do not exist in other implementations, and may add others in the future. The spec should not need updating when that happens. The require check and the loaded feature check are combined into a single run for efficiency.
This spec was split into a separate spec for each feature to avoid the description changing and to make the failures more useful.
* Removed SortedSet and related files (gem TBD). * Removed stdlib .rb stub. * Fixed inspect output, intersect? with Array, and infinite enumerables for new tests. * Moved @hash variable to a bound Java field.
* Fix inspect output expectations. * Guard SortedSet tests behind a require, since that collection is now in a separate library (knu/sorted_set). These tests probably should move to the external library once we work out the details (see knu/sorted_set#7)
Member
Author
|
Ruby 3.5 was officially promoted to 4.0 last week, so that's what it will be. |
Based on code from CRuby by Tomoya Ishida: ruby/ruby#13680
When the incoming block's signature is important to the iteration method being called, the previous logic would hide that signature. The change here propagates it through the CallBlock.
This does not exactly match the new native Set impl, but it passes specs and tests related to initialize.
This updates some logic related to the new native Set.
Only fails are now related to us not tracking iteration-in-progress for either Set or Hash.
Paths that will immmediately initialize the wrapped Hash do not need to pre-allocate. This fixes issues with Set.allocate returning an object that has a null Hash and can't be used for anything.
Move Set to a core class [Ruby 4.0]
For Ruby 4.0 compatibility. See https://bugs.ruby-lang.org/issues/21047 See #9061
Avoid array allocation for *nil, by not calling nil.to_a
For Ruby 4.0 compatibility. See ruby/ruby#12746 See #9061
For Ruby 4.0 compatibility. See ruby/ruby#13555 See #9061
Selective inspect of instance variables
No numbered parameters in Binding#local_variables
For Ruby 4.0 compatibility. See https://bugs.ruby-lang.org/issues/15408
For Ruby 4.0 compatibility. See https://bugs.ruby-lang.org/issues/21527 See #9061
Add Math.{expm1,log1p}
For Ruby 4.0 compatibility. See https://bugs.ruby-lang.org/issues/19630 See #9061
Includes https://bugs.ruby-lang.org/issues/20610 for Ruby 4.0 compatibility. See #9061
Align IO.select timeout logic with CRuby
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR will include changes on the ruby-4.0 branch for Ruby 4.0 support.
See #9061 for the feature checklist from CRuby's NEWS and other items.