From dbf7b10b708177b585abc1e91e0df153674308d3 Mon Sep 17 00:00:00 2001 From: Burdette Lamar Date: Fri, 26 Jun 2026 22:24:42 -0500 Subject: [PATCH 1/7] [DOC] Update Set#^ documentation Co-authored-by: Jeremy Evans --- set.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/set.c b/set.c index b6ca30331332ff..112529043c4170 100644 --- a/set.c +++ b/set.c @@ -1313,14 +1313,26 @@ set_xor_i(st_data_t key, st_data_t data) /* * call-seq: - * set ^ enum -> new_set + * self ^ enumerable -> new_set * - * Returns a new set containing elements exclusive between the set and the - * given enumerable object. (set ^ enum) is equivalent to - * ((set | enum) - (set & enum)). + * Returns a new \Set object containing + * the {exclusive OR}[https://en.wikipedia.org/wiki/Exclusive_or] + * of +self+ and the given +enumerable+; + * that is, containing each element that is in either +self+ or +enumerable+, + * but not in both: + * + * set = Set[0, 1, 2] + * set ^ Set[1, 2, 3] # => Set[0, 3] + * set ^ Set[2, 1] # => Set[0] + * set ^ Set[2, *('a'..'c')] # => Set[0, 1, "a", "b", "c"] + * set ^ Set[2, 1, 0] # => Set[] * - * Set[1, 2] ^ Set[2, 3] #=> Set[3, 1] - * Set[1, 'b', 'c'] ^ ['b', 'd'] #=> Set["d", 1, "c"] + * For \Set +set+ and \Enumerable +enumerable+, these expressions are equivalent: + * + * set ^ enumerable + * ((set | enumerable) - (set & enumerable)) + * + * Related: see {Methods for Set Operations}[rdoc-ref:Set@Methods+for+Set+Operations]. */ static VALUE set_i_xor(VALUE set, VALUE other) From 40b1104507fee1c5b5f7fbcaf156fe7f20a2847e Mon Sep 17 00:00:00 2001 From: Burdette Lamar Date: Fri, 26 Jun 2026 22:25:37 -0500 Subject: [PATCH 2/7] [DOC] Update Set#add? documentation Co-authored-by: Jeremy Evans --- set.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/set.c b/set.c index 112529043c4170..385a8ae5328204 100644 --- a/set.c +++ b/set.c @@ -750,14 +750,16 @@ set_i_add(VALUE set, VALUE item) /* * call-seq: - * add?(obj) -> self or nil + * add?(object) -> self or nil * - * Adds the given object to the set and returns self. If the object is - * already in the set, returns nil. + * Like #add, but returns +nil+ if +object+ is already in +self+: * - * Set[1, 2].add?(3) #=> Set[1, 2, 3] - * Set[1, 2].add?([3, 4]) #=> Set[1, 2, [3, 4]] - * Set[1, 2].add?(2) #=> nil + * set = Set[0, 1, 2] + * set.add?(:foo) # => Set[0, 1, 2, :foo] + * set.add?(0..9) # => Set[0, 1, 2, :foo, 0..9] + * set.add?(2) # => nil + * + * Related: see {Methods for Assigning}[rdoc-ref:Set@Methods+for+Assigning]. */ static VALUE set_i_add_p(VALUE set, VALUE item) From 391195987e4b80a6c328969c1a1b42dd6ca35b2e Mon Sep 17 00:00:00 2001 From: Burdette Lamar Date: Fri, 26 Jun 2026 22:27:04 -0500 Subject: [PATCH 3/7] [DOC] Update Set#classify documentation Co-authored-by: Jeremy Evans --- set.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/set.c b/set.c index 385a8ae5328204..84841ed4e30f47 100644 --- a/set.c +++ b/set.c @@ -877,21 +877,23 @@ set_classify_i(st_data_t key, st_data_t tmp) /* * call-seq: - * classify { |o| ... } -> hash + * classify {|element| ... } -> hash * classify -> enumerator * - * Classifies the set by the return value of the given block and - * returns a hash of {value => set of elements} pairs. The block is - * called once for each element of the set, passing the element as - * parameter. + * With a block given, calls the block with each element of +self+; + * returns a hash whose keys are the block's return values. + * The value for each key is a set containing the elements + * for which the block returned that key. * - * files = Set.new(Dir.glob("*.rb")) - * hash = files.classify { |f| File.mtime(f).year } - * hash #=> {2000 => Set["a.rb", "b.rb"], - * # 2001 => Set["c.rb", "d.rb", "e.rb"], - * # 2002 => Set["f.rb"]} + * This example classifies elements by their classes: * - * Returns an enumerator if no block is given. + * set = Set[*(5..7), *%w[foo bar]] # => Set[5, 6, 7, "foo", "bar"] + * set.classify {|element| element.class } + * # => {Integer => Set[5, 6, 7], String => Set["foo", "bar"]} + * + * With no block given, returns an Enumerator. + * + * Related: see {Methods for Converting}[rdoc-ref:Set@Methods+for+Converting]. */ static VALUE set_i_classify(VALUE set) From 0db07b1a5a6ad1c0d599c01a0d7777529e1a9693 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 26 Jun 2026 02:30:59 +0000 Subject: [PATCH 4/7] [ruby/json] Avoid Float out of range warning for clearly underflowing numbers When parsing JSON floats with extremely negative exponents (like 123.456e-789 or 123e-10000000), the parser would fall back to rb_cstr_to_dbl which internally calls strtod. When strtod returns ERANGE due to underflow to 0.0, Ruby emits a "Float out of range" warning, causing noise in the test output. Fix: when mantissa_digits + exponent < -324, the effective value is less than 10^(-324) < DBL_TRUE_MIN/2, so it must round to 0.0 in IEEE 754 round-to-nearest. Return 0.0 directly without going through rb_cstr_to_dbl, avoiding the spurious warning. This fixes warnings introduced by JSONMinefieldParserTest tests (test_i_number_double_huge_neg_exp and test_i_number_real_underflow) added in commit https://github.com/ruby/json/commit/6507a836c5. https://github.com/ruby/json/commit/724eddaeaa --- ext/json/parser/parser.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ext/json/parser/parser.c b/ext/json/parser/parser.c index 4d9fa25baa5f93..a6154c83ec52de 100644 --- a/ext/json/parser/parser.c +++ b/ext/json/parser/parser.c @@ -1133,6 +1133,13 @@ static inline VALUE json_decode_float(JSON_ParserConfig *config, uint64_t mantis } if (RB_UNLIKELY(mantissa_digits > 18 || mantissa_digits + exponent < -307)) { + // If the value is so small that it definitely underflows to 0.0, return early + // to avoid triggering a "Float out of range" warning from rb_cstr_to_dbl. + // When mantissa_digits + exponent < -324, value < 10^(-324) < DBL_TRUE_MIN/2, + // so it rounds to 0 in IEEE 754 round-to-nearest. + if (RB_UNLIKELY(mantissa_digits + exponent < -324)) { + return rb_float_new(negative ? -0.0 : 0.0); + } return json_decode_large_float(start, end - start); } From 689f370c7bcb36011068c4ccbb654810e9ec1b79 Mon Sep 17 00:00:00 2001 From: git Date: Sat, 27 Jun 2026 07:42:13 +0000 Subject: [PATCH 5/7] Update bundled gems list as of 2026-06-26 --- NEWS.md | 2 +- gems/bundled_gems | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 1ac45e2da77769..004e151df07bd9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -130,7 +130,7 @@ releases. * 0.1.12 to [v0.1.13][repl_type_completor-v0.1.13], [v0.1.14][repl_type_completor-v0.1.14], [v0.1.15][repl_type_completor-v0.1.15] * pstore 0.2.1 * 0.2.0 to [v0.2.1][pstore-v0.2.1] -* rdoc 7.2.0 +* rdoc 8.0.0 * 7.0.3 to [v7.0.4][rdoc-v7.0.4], [v7.1.0][rdoc-v7.1.0], [v7.2.0][rdoc-v7.2.0] * win32ole 1.9.3 * 1.9.2 to [v1.9.3][win32ole-v1.9.3] diff --git a/gems/bundled_gems b/gems/bundled_gems index d67684d6e5d672..d9a6273a043d9b 100644 --- a/gems/bundled_gems +++ b/gems/bundled_gems @@ -37,7 +37,7 @@ ostruct 0.6.3 https://github.com/ruby/ostruct pstore 0.2.1 https://github.com/ruby/pstore benchmark 0.5.0 https://github.com/ruby/benchmark logger 1.7.0 https://github.com/ruby/logger -rdoc 7.2.0 https://github.com/ruby/rdoc a8df5c5d03b63cf05425bf676644688ac673a329 +rdoc 8.0.0 https://github.com/ruby/rdoc win32ole 1.9.3 https://github.com/ruby/win32ole irb 1.18.0 https://github.com/ruby/irb reline 0.6.3 https://github.com/ruby/reline From ef4626e5b92805cf07c5bfb7816307376a8e06a9 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 27 Jun 2026 14:17:24 +0900 Subject: [PATCH 6/7] Move test-syntax-suggest recipe from template/Makefile.in to common.mk template/Makefile.in is used only by the GNU make build, so on mswin the common.mk stub was an empty rule and nmake check silently skipped the SyntaxSuggest spec. Move the recipe to common.mk so both builds share it, matching how test-bundled-gems-spec is already shared. Co-Authored-By: Claude Opus 4.8 --- common.mk | 25 ++++++++++++++++++++++++- template/Makefile.in | 25 ------------------------- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/common.mk b/common.mk index 3c32e9fb70b693..326302744ac1fc 100644 --- a/common.mk +++ b/common.mk @@ -1649,7 +1649,30 @@ yes-test-bundled-gems-spec: yes-test-all-precheck $(PREPARE_BUNDLED_GEMS) no-test-bundled-gems-spec: -test-syntax-suggest: +test-syntax-suggest-precheck: $(TEST_RUNNABLE)-test-syntax-suggest-precheck +no-test-syntax-suggest-precheck: +yes-test-syntax-suggest-precheck: main + +test-syntax-suggest-prepare: $(TEST_RUNNABLE)-test-syntax-suggest-prepare +no-test-syntax-suggest-prepare: no-test-syntax-suggest-precheck +yes-test-syntax-suggest-prepare: yes-test-syntax-suggest-precheck + $(ACTIONS_GROUP) + $(XRUBY) -C "$(srcdir)" bin/gem install --no-document \ + --install-dir .bundle --conservative "rspec:~> 3" + $(ACTIONS_ENDGROUP) + +RSPECOPTS = +SYNTAX_SUGGEST_SPECS = +PREPARE_SYNTAX_SUGGEST = $(TEST_RUNNABLE)-test-syntax-suggest-prepare +test-syntax-suggest: $(TEST_RUNNABLE)-test-syntax-suggest +yes-test-syntax-suggest: $(PREPARE_SYNTAX_SUGGEST) + $(ACTIONS_GROUP) + $(XRUBY) -C $(srcdir) -Ispec/syntax_suggest:spec/lib .bundle/bin/rspec \ + --require rspec/expectations \ + --require spec_helper --require formatter_overrides --require spec_coverage \ + $(RSPECOPTS) spec/syntax_suggest/$(SYNTAX_SUGGEST_SPECS) + $(ACTIONS_ENDGROUP) +no-test-syntax-suggest: check: $(DOT_WAIT) $(PREPARE_SYNTAX_SUGGEST) test-syntax-suggest diff --git a/template/Makefile.in b/template/Makefile.in index 7ce612e8e9c704..18f54c6f7d9c99 100644 --- a/template/Makefile.in +++ b/template/Makefile.in @@ -733,30 +733,5 @@ yes-test-leaked-globals: yes-test-leaked-globals-precheck $(COMMONOBJS) $(LIBRUBY_FOR_LEAKED_GLOBALS:yes=$(LIBRUBY_SO)) $(ACTIONS_ENDGROUP) -test-syntax-suggest-precheck: $(TEST_RUNNABLE)-test-syntax-suggest-precheck -no-test-syntax-suggest-precheck: -yes-test-syntax-suggest-precheck: main - -test-syntax-suggest-prepare: $(TEST_RUNNABLE)-test-syntax-suggest-prepare -no-test-syntax-suggest-prepare: no-test-syntax-suggest-precheck -yes-test-syntax-suggest-prepare: yes-test-syntax-suggest-precheck - $(ACTIONS_GROUP) - $(XRUBY) -C "$(srcdir)" bin/gem install --no-document \ - --install-dir .bundle --conservative "rspec:~> 3" - $(ACTIONS_ENDGROUP) - -RSPECOPTS = -SYNTAX_SUGGEST_SPECS = -PREPARE_SYNTAX_SUGGEST = $(TEST_RUNNABLE)-test-syntax-suggest-prepare -test-syntax-suggest: $(TEST_RUNNABLE)-test-syntax-suggest -yes-test-syntax-suggest: $(PREPARE_SYNTAX_SUGGEST) - $(ACTIONS_GROUP) - $(XRUBY) -C $(srcdir) -Ispec/syntax_suggest:spec/lib .bundle/bin/rspec \ - --require rspec/expectations \ - --require spec_helper --require formatter_overrides --require spec_coverage \ - $(RSPECOPTS) spec/syntax_suggest/$(SYNTAX_SUGGEST_SPECS) - $(ACTIONS_ENDGROUP) -no-test-syntax-suggest: - yesterday: $(GIT_IN_SRC) reset --hard `TZ=UTC-9 $(GIT_LOG_FORMAT)%H -1 --before=00:00` From 3c7a4c174f7dc16042f3ba2afc07ffd401e958a1 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 27 Jun 2026 15:17:59 +0900 Subject: [PATCH 7/7] Use $(PATH_SEPARATOR) for test-syntax-suggest -I on mswin The recipe moved into common.mk kept the literal `-Ispec/syntax_suggest:spec/lib` from template/Makefile.in. On Windows Ruby treats `:` as an invalid path separator (the drive-letter delimiter), so spec_helper fails to load and the mswin run errors out instead of running the SyntaxSuggest spec. Use $(PATH_SEPARATOR) (`;` on mswin, `:` on Unix), matching RAKER just below, so the single recipe works for both builds. Verified 170 examples, 0 failures on the VS 2022 mswin build and the msys2 UCRT64 GNU make build. Co-Authored-By: Claude Opus 4.8 --- common.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.mk b/common.mk index 326302744ac1fc..45666a5570506c 100644 --- a/common.mk +++ b/common.mk @@ -1667,7 +1667,7 @@ PREPARE_SYNTAX_SUGGEST = $(TEST_RUNNABLE)-test-syntax-suggest-prepare test-syntax-suggest: $(TEST_RUNNABLE)-test-syntax-suggest yes-test-syntax-suggest: $(PREPARE_SYNTAX_SUGGEST) $(ACTIONS_GROUP) - $(XRUBY) -C $(srcdir) -Ispec/syntax_suggest:spec/lib .bundle/bin/rspec \ + $(XRUBY) -C $(srcdir) -Ispec/syntax_suggest$(PATH_SEPARATOR)spec/lib .bundle/bin/rspec \ --require rspec/expectations \ --require spec_helper --require formatter_overrides --require spec_coverage \ $(RSPECOPTS) spec/syntax_suggest/$(SYNTAX_SUGGEST_SPECS)