diff --git a/.github/workflows/comments.yml b/.github/workflows/comments.yml index 36a9235903..7cf4149413 100644 --- a/.github/workflows/comments.yml +++ b/.github/workflows/comments.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: "3.4.1" + ruby-version: "3.4.5" bundler: none - name: Install dependencies run: | diff --git a/Gemfile.lock b/Gemfile.lock index 5e4e056895..6bc74e689a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -31,19 +31,20 @@ GEM public_suffix (>= 2.0.2, < 7.0) ast (2.4.3) base64 (0.3.0) - benchmark (0.4.0) + benchmark (0.4.1) benchmark-ips (2.14.0) bigdecimal (3.2.2) concurrent-ruby (1.3.5) connection_pool (2.5.3) - csv (3.3.4) + csv (3.3.5) dbm (1.1.0) diff-lcs (1.6.2) digest (3.2.0) drb (2.2.3) - erb (5.0.1) + erb (5.0.2) extconf_compile_commands_json (0.0.7) ffi (1.17.2) + ffi (1.17.2-arm64-darwin) ffi (1.17.2-x86_64-linux-gnu) fileutils (1.7.3) goodcheck (3.1.0) @@ -54,7 +55,7 @@ GEM i18n (1.14.7) concurrent-ruby (~> 1.0) json (2.12.2) - json-schema (5.1.1) + json-schema (5.2.1) addressable (~> 2.8) bigdecimal (~> 3.1) language_server-protocol (3.17.0.5) @@ -72,9 +73,11 @@ GEM net-smtp (0.5.1) net-protocol nkf (0.2.0) + nokogiri (1.18.8-arm64-darwin) + racc (~> 1.4) nokogiri (1.18.8-x86_64-linux-gnu) racc (~> 1.4) - ostruct (0.6.1) + ostruct (0.6.2) parallel (1.27.0) parser (3.3.8.0) ast (~> 2.4.1) @@ -97,7 +100,7 @@ GEM rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) - rdoc (6.14.0) + rdoc (6.14.2) erb psych (>= 4.0.0) regexp_parser (2.10.0) @@ -105,7 +108,7 @@ GEM rspec-core (~> 3.13.0) rspec-expectations (~> 3.13.0) rspec-mocks (~> 3.13.0) - rspec-core (3.13.4) + rspec-core (3.13.5) rspec-support (~> 3.13.0) rspec-expectations (3.13.5) diff-lcs (>= 1.2.0, < 2.0) @@ -114,7 +117,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-support (3.13.4) - rubocop (1.75.8) + rubocop (1.78.0) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -122,10 +125,10 @@ GEM parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.44.0, < 2.0) + rubocop-ast (>= 1.45.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.44.1) + rubocop-ast (1.46.0) parser (>= 3.3.7.2) prism (~> 1.4) rubocop-on-rbs (1.8.0) @@ -164,7 +167,7 @@ GEM tempfile (0.3.1) terminal-table (4.0.0) unicode-display_width (>= 1.1.1, < 4) - test-unit (3.6.8) + test-unit (3.7.0) power_assert timeout (0.4.3) tsort (0.2.0) @@ -177,6 +180,7 @@ GEM zlib (3.2.1) PLATFORMS + arm64-darwin x86_64-linux DEPENDENCIES diff --git a/core/io/wait.rbs b/core/io/wait.rbs index cdeb653d17..9d09f201ea 100644 --- a/core/io/wait.rbs +++ b/core/io/wait.rbs @@ -24,7 +24,7 @@ class IO # # Waits until the IO becomes ready for the specified events and returns the # subset of events that become ready, or a falsy value when times out. @@ -32,9 +32,14 @@ class IO # The events can be a bit mask of `IO::READABLE`, `IO::WRITABLE` or # `IO::PRIORITY`. # - # Returns a truthy value immediately when buffered data is available. + # Returns an event mask (truthy value) immediately when buffered data is + # available. # - # Optional parameter `mode` is one of `:read`, `:write`, or `:read_write`. + # The second form: if one or more event symbols (`:read`, `:write`, or + # `:read_write`) are passed, the event mask is the bit OR of the bitmask + # corresponding to those symbols. In this form, `timeout` is optional, the + # order of the arguments is arbitrary, and returns `io` if any of the events is + # ready. # # You must require 'io/wait' to use this method. # diff --git a/core/kernel.rbs b/core/kernel.rbs index bfb54d89b6..b50e581115 100644 --- a/core/kernel.rbs +++ b/core/kernel.rbs @@ -1814,10 +1814,10 @@ module Kernel : BasicObject # and returns a `true` or `false`; # returns `false` if either entity does not exist: # Character |Test - # ------------|--------------------------------------------------------------- - # '<'|Whether the `mtime` at `path0` is less than that at `path1`. - # '='|Whether the `mtime` at `path0` is equal to that at `path1`. - # '>'|Whether the `mtime` at `path0` is greater than that at `path1`. + # ------------|------------------------------------------------------------------------------------------------ + # '<'|Whether the mtime at path0 is less than that at path1. + # '='|Whether the mtime at path0 is equal to that at path1. + # '>'|Whether the mtime at path0 is greater than that at path1. # * This test operates on the content of each of the entities at `path0` and # `path1`, # and returns a `true` or `false`; diff --git a/core/ruby_vm.rbs b/core/ruby_vm.rbs index 623790ebc3..31568b4e24 100644 --- a/core/ruby_vm.rbs +++ b/core/ruby_vm.rbs @@ -686,7 +686,7 @@ module RubyVM::YJIT # - enable(stats: false, log: false) # --> # Enable YJIT compilation. `stats` option decides whether to enable YJIT stats - # or not. `compilation_log` decides + # or not. `log` decides # whether to enable YJIT compilation logging or not. # * `stats`: # * `false`: Don't enable stats. diff --git a/core/rubygems/rubygems.rbs b/core/rubygems/rubygems.rbs index 8b87aa6cef..dccf6f2d6c 100644 --- a/core/rubygems/rubygems.rbs +++ b/core/rubygems/rubygems.rbs @@ -1009,8 +1009,7 @@ module Gem # - source_date_epoch_string() # --> # If the SOURCE_DATE_EPOCH environment variable is set, returns it's value. - # Otherwise, returns the time that `Gem.source_date_epoch_string` was first - # called in the same format as SOURCE_DATE_EPOCH. + # Otherwise, returns DEFAULT_SOURCE_DATE_EPOCH as a string. # # NOTE(@duckinator): The implementation is a tad weird because we want to: # 1. Make builds reproducible by default, by having this function always diff --git a/core/time.rbs b/core/time.rbs index 0d43e45ccc..606987871a 100644 --- a/core/time.rbs +++ b/core/time.rbs @@ -984,10 +984,20 @@ class Time < Object # now = Time.now # # => 2022-08-18 10:24:13.5398485 -0500 # now.utc? # => false + # now.getutc.utc? # => true # utc = Time.utc(2000, 1, 1, 20, 15, 1) # # => 2000-01-01 20:15:01 UTC # utc.utc? # => true # + # `Time` objects created with these methods are considered to be in UTC: + # + # * Time.utc + # * Time#utc + # * Time#getutc + # + # Objects created in other ways will not be treated as UTC even if the + # environment variable "TZ" is "UTC". + # # Related: Time.utc. # def gmt?: () -> bool @@ -1560,10 +1570,20 @@ class Time < Object # now = Time.now # # => 2022-08-18 10:24:13.5398485 -0500 # now.utc? # => false + # now.getutc.utc? # => true # utc = Time.utc(2000, 1, 1, 20, 15, 1) # # => 2000-01-01 20:15:01 UTC # utc.utc? # => true # + # `Time` objects created with these methods are considered to be in UTC: + # + # * Time.utc + # * Time#utc + # * Time#getutc + # + # Objects created in other ways will not be treated as UTC even if the + # environment variable "TZ" is "UTC". + # # Related: Time.utc. # def utc?: () -> bool diff --git a/stdlib/rdoc/0/code_object.rbs b/stdlib/rdoc/0/code_object.rbs index af7f631f72..4e2baf858f 100644 --- a/stdlib/rdoc/0/code_object.rbs +++ b/stdlib/rdoc/0/code_object.rbs @@ -22,9 +22,10 @@ module RDoc # * RDoc::MetaMethod # * RDoc::Alias # * RDoc::Constant + # * RDoc::Require # * RDoc::Mixin - # * RDoc::Require # * RDoc::Include + # * RDoc::Extend # class CodeObject # diff --git a/stdlib/rdoc/0/parser.rbs b/stdlib/rdoc/0/parser.rbs index 3b62f130a3..8ababe7b72 100644 --- a/stdlib/rdoc/0/parser.rbs +++ b/stdlib/rdoc/0/parser.rbs @@ -42,7 +42,7 @@ module RDoc # # Creates a new Parser storing `top_level`, `file_name`, `content`, `options` # and `stats` in instance variables. In +@preprocess+ an diff --git a/stdlib/rdoc/0/store.rbs b/stdlib/rdoc/0/store.rbs index a48c95bd56..2f464f4296 100644 --- a/stdlib/rdoc/0/store.rbs +++ b/stdlib/rdoc/0/store.rbs @@ -22,7 +22,7 @@ module RDoc class Store # # Creates a new Store of `type` that will load or save to `path` # diff --git a/stdlib/strscan/0/string_scanner.rbs b/stdlib/strscan/0/string_scanner.rbs index 9087428f63..6e82c20f4d 100644 --- a/stdlib/strscan/0/string_scanner.rbs +++ b/stdlib/strscan/0/string_scanner.rbs @@ -327,7 +327,7 @@ # Method | Return After Match |Return After No Match # ---------------|---------------------------------------|--------------------- # #size | Count of captured substrings. | +nil+. -# #[](n) | nth captured substring. | +nil+. +# #{}[n] | nth captured substring. | +nil+. # #captures | Array of all captured substrings. | +nil+. # #values_at(*n) |Array of specified captured substrings.| +nil+. # #named_captures| Hash of named captures. | {}. diff --git a/stdlib/uri/0/common.rbs b/stdlib/uri/0/common.rbs index 94b6d25c02..a7dd5fcaef 100644 --- a/stdlib/uri/0/common.rbs +++ b/stdlib/uri/0/common.rbs @@ -535,6 +535,9 @@ URI::ABS_URI: Regexp URI::ABS_URI_REF: Regexp +# +# The default parser instance. +# URI::DEFAULT_PARSER: URI::RFC2396_Parser URI::ESCAPED: Regexp @@ -557,6 +560,9 @@ URI::REL_URI: Regexp URI::REL_URI_REF: Regexp +# +# The default parser instance for RFC 3986. +# URI::RFC3986_PARSER: URI::RFC3986_Parser URI::SCHEME: Regexp diff --git a/stdlib/uri/0/generic.rbs b/stdlib/uri/0/generic.rbs index 8e35c3af07..5a8e38d9fc 100644 --- a/stdlib/uri/0/generic.rbs +++ b/stdlib/uri/0/generic.rbs @@ -1017,6 +1017,7 @@ module URI # rdoc-file=lib/uri/generic.rb # - hash() # --> + # Returns the hash value. # def hash: () -> Integer @@ -1024,6 +1025,7 @@ module URI # rdoc-file=lib/uri/generic.rb # - eql?(oth) # --> + # Compares with *oth* for Hash. # def eql?: (URI::Generic oth) -> bool