forked from ruby/ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
[pull] master from ruby:master #623
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
Merged
Merged
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
(ruby/stringio#195) Previous doc unhelpfully pointed to `IO#pread`; this PR documents locally, with StringIO examples. ruby/stringio@806f3d9741
(ruby/stringio#196) Previous doc merely linked to `IO#putc`. The new doc stays local, provides examples using `StringIO` objects. ruby/stringio@8983f32c50
(ruby/stringio#197) Previous doc merely linked to `IO#read`; new doc stays local, shows examples using `StringIO`. ruby/stringio@e8b66f8cdd
…-Schneider algorithm Replace floating-point arithmetic and iterative loops with pure integer operations for ~40% faster Date operations. Date.ordinal and Date.commercial are ~2x faster due to O(1) first-day-of-year calculation. Reference: https://arxiv.org/abs/2102.06959 ruby/date@cc639549d6
This change updates `write_binary` to use a new class, `AtomicFileWriter.open` to write the gem's files. This implementation is borrowed from Active Support's [`atomic_write`](https://github.com/rails/rails/blob/main/activesupport/lib/active_support/core_ext/file/atomic.rb). Atomic write will write the files to a temporary file and then once created, sets permissions and renames the file. If the file is corrupted - ie on failed download, an error occurs, or for some other reason, the real file will not be created. The changes made here make `verify_gz` obsolete, we don't need to verify it if we have successfully created the file atomically. If it exists, it is not corrupt. If it is corrupt, the file won't exist on disk. While writing tests for this functionality I replaced the `RemoteFetcher` stub with `FakeFetcher` except for where we really do need to overwrite the `RemoteFetcher`. The new test implementation is much clearer on what it's trying to accomplish versus the prior test implementation. ruby/rubygems@0cd4b54291
This PR updates the fallback version for `Prism::Translation::ParserCurrent` from 3.4 to 4.0. Currently, the fallback resolves to `Parser34`, as shown below: ```console $ ruby -v -rprism -rprism/translation/parser_current -e 'p Prism::Translation::ParserCurrent' ruby 3.0.7p220 (2024-04-23 revision ruby/prism@724a071175) [x86_64-darwin23] warning: `Prism::Translation::Current` is loading Prism::Translation::Parser34, but you are running 3.0. Prism::Translation::Parser34 ``` Following the comment "Keep this in sync with released Ruby.", it seems like the right time to set this to Ruby 4.0, which is scheduled for release this week. ruby/prism@115f0a118c
* To find out efficiently if TCPSocket#initialize supports the open_timeout keyword argument. ruby/net-protocol@738c06f950
``` Errno::EACCES: Permission denied @ rb_file_s_rename ... D:/a/ruby/ruby/src/lib/rubygems/util/atomic_file_writer.rb:42:in 'File.rename' ``` It may caused with atomic_file_writer.rb
(ruby/pp#70) * Support private instance_variables_to_inspect in pp Ruby supports calling instance_variables_to_inspect even when it is defined as a private method (#13555). This change aligns pp with Ruby's behavior. ruby/pp@8450e76db6
The RSET_IS_MEMBER macro had a parameter named 'sobj' but the macro
body used 'set' instead, causing the first argument to be ignored.
This worked by accident because all current callers use a variable
named 'set', but would cause compilation failure if called with a
differently named variable:
error: use of undeclared identifier 'set'
Changed the parameter name from 'sobj' to 'set' to match the macro
body and be consistent with other RSET_* macros.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )