12579 Commits
Author SHA1 Message Date
Hiroshi SHIBATAandClaude Opus 5 619ea0f602 Bump up resolv-0.3.2 for Ruby 3.3
Backport of the August 2026 resolv security release.

CVE-2026-80212
CVE-2026-80213

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-28 11:25:26 +09:00
Takashi Kokubun 2f223e90ed [ruby/erb] Version 4.0.3.1 2026-04-22 09:36:32 +09:00
Takashi KokubunandTristan Madani a53f3d57d1 [ruby/erb] Prohibit def_method on marshal-loaded ERB instances
Extends the @_init guard to def_method so that an ERB object created
via Marshal.load (which bypasses initialize) raises ArgumentError
instead of evaluating arbitrary source. def_module and def_class both
delegate to def_method and are covered by the same check.

Co-authored-by: Tristan Madani <TristanInSec@gmail.com>
2026-04-22 09:36:32 +09:00
Nobuyoshi Nakada 8da08ddbe7 [ruby/pstore] Bump up
https://github.com/ruby/pstore/commit/d93352e365
2026-03-26 08:42:04 +09:00
Nobuyoshi Nakada 2fd366a144 [ruby/pstore] [DOC] Complete RDoc coverage
https://github.com/ruby/pstore/commit/bbb1e239f0
2026-03-26 08:42:03 +09:00
Nobuyoshi Nakada b802103f64 [ruby/pstore] Make the internal constants private
https://github.com/ruby/pstore/commit/74fe0e516b
2026-03-26 08:42:03 +09:00
Nobuyoshi Nakada 59a72538b6 [ruby/pstore] Define the platform constant
Rather than overwriting the predicate method dynamically.

Fix [Bug #21880](https://bugs.ruby-lang.org/issues/21880).

https://github.com/ruby/pstore/commit/b2e474e619
2026-03-26 08:42:02 +09:00
Hiroshi SHIBATA c26c0e3824 [ruby/pstore] Bump up v0.2.0
https://github.com/ruby/pstore/commit/aab62bf4cf
2026-03-26 08:41:57 +09:00
Hiroshi SHIBATA 79fe6fcb5c [ruby/pstore] Bump up v0.1.4
https://github.com/ruby/pstore/commit/a63a70a830
2026-03-26 08:41:53 +09:00
Yusuke Endoh f589793531 [ruby/pstore] Do not include a backtick in error messages and backtraces
[Feature #16495]

https://github.com/ruby/pstore/commit/6be4e72a66
2026-03-26 08:41:51 +09:00
rm155 6a7e3cb5fa [ruby/pstore] Improve Ractor-compliance
https://github.com/ruby/pstore/commit/fa564a6965
2026-03-26 08:41:51 +09:00
Schneems 14dbb22bad [ruby/syntax_suggest] v2.0.3
https://github.com/ruby/syntax_suggest/commit/a81b92fcf2

[Bug #21847]
2026-03-23 11:00:31 +09:00
Schneems 2256196e2d [ruby/syntax_suggest] Refactor multi-prism version logic
The reason this logic for different methods branches in the class instead of internally was to be eagerly aggressive about runtime performance. This code is currently only used once for the document where it's invoked ~N times (where N is number of lines):

```ruby
module SyntaxSuggest
  class CleanDocument
    # ...
    def join_trailing_slash!
      trailing_groups = @document.select(&:trailing_slash?).map do |code_line|
        take_while_including(code_line.index..) { |x| x.trailing_slash? }
      end
      join_groups(trailing_groups)
      self
    end
```

Since this is not currently a hot-spot I think merging the branches and using a case statement is a reasonable tradeoff and avoids the need to do specific version testing.

An alternative idea was presented in #241 of behavior-based testing for branch logic (which I would prefer), however, calling the code triggered requiring a `DelegateClass` when the `syntax_suggest/api` is being required.

https://github.com/ruby/syntax_suggest/commit/ab122c455f
2026-03-23 11:00:31 +09:00
Earlopain fd784dc762 [ruby/syntax_suggest] Handle on_sp when using prism
It used to not emit this token type, but now it does.
So when a newer version of prism is present, we can fall back
to the same code that ripper uses.

Ref:
* https://github.com/ruby/ruby/pull/15914
* https://github.com/ruby/prism/pull/3859

https://github.com/ruby/syntax_suggest/commit/42a3b8f6cb
2026-03-23 11:00:31 +09:00
Hiroshi SHIBATA df9f221e2c [ruby/syntax_suggest] bundle exec standardrb --fix
https://github.com/ruby/syntax_suggest/commit/54bb8ab330
2026-03-23 11:00:31 +09:00
Schneems 854df872e9 [ruby/syntax_suggest] v2.0.2
https://github.com/ruby/syntax_suggest/commit/e99b5ba287
2026-03-23 11:00:31 +09:00
Schneems 8136b4e5a8 [ruby/syntax_suggest] Explain why class exists
https://github.com/ruby/syntax_suggest/commit/8c36b0cb35
2026-03-23 11:00:31 +09:00
Schneems 400d94dcdf [ruby/syntax_suggest] Fix spelling
https://github.com/ruby/syntax_suggest/commit/9c78283363
2026-03-23 11:00:31 +09:00
Schneems 28edc65f45 [ruby/syntax_suggest] Freeze strings
https://github.com/ruby/syntax_suggest/commit/b17bf0baca
2026-03-23 11:00:31 +09:00
SchneemsandAndy Yong a0fd8328b7 [ruby/syntax_suggest] Fix missing line break due to puts logic
In #225 it was reported that the output looks incorrect:

```
$ cat /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
def x.y.z
end
$ ruby /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
/tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb: --> /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
expected a delimiter to close the parametersunexpected '.', ignoring it
> 1  def x.y.z
> 2  end
```

Specifically:

```
expected a delimiter to close the parametersunexpected '.', ignoring it
```

However this does not show up when executing the debug executable:

```
$ bin/bundle exec exe/syntax_suggest /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb
--> /tmp/4a71c7e417cc9eac0971e3a2519b295c/scratch.rb

expected a delimiter to close the parameters
unexpected '.', ignoring it

> 1  def x.y.z
> 2  end
```

This is because `exe/syntax_suggest` uses STDOUT.puts while calling `ruby` with the filename uses a fake IO object represented by MiniStringIO. This class was incorrectly not adding a newline to the end of the print.

The fix was to move the class to it's own file where it can be tested and then fix the behavior.

close https://github.com/ruby/syntax_suggest/pull/225

https://github.com/ruby/syntax_suggest/commit/d2ecd94a3b

Co-authored-by: Andy Yong <andyywz@gmail.com>
2026-03-23 11:00:31 +09:00
nagachika 9f045b904d unicode_normalize/normalize.rb: stop using it special block parameter in ruby_3_3. 2025-11-08 13:23:29 +09:00
nagachika e897657c00 merge revision(s) 377aa2a336: [Backport #21668]
[PATCH] Improve performance of UnicodeNormalize.canonical_ordering_one

	Use array_of_integer.sort! instead of buble-sort-like algorithm
2025-11-08 11:05:47 +09:00
nagachika bee70ff698 [ruby/rubygems] Bump up vendored uri to 0.13.3 2025-10-25 13:58:15 +09:00
Hiroshi SHIBATA 3fe7f490ff Merge URI-0.13.3 2025-10-09 23:08:48 +09:00
Hiroshi SHIBATA 111a49e77e Bump up resolv-0.3.1 for Ruby 3.3 2025-07-19 10:19:07 +09:00
nagachika 551c444f81 merge revision(s) b48b841378, 2fe8b9cd3d: [Backport #21327]
digest.so needs ruby/digest.h which is installed by build-ext

	Copy to path with the base name
2025-05-18 12:00:23 +09:00
David Rodríguez c1319d7e40 [rubygems/rubygems] Support git 2.49
One error message that we parse is now slightly different.

https://github.com/rubygems/rubygems/commit/758528791d
2025-03-24 13:24:18 +09:00
Hiroshi SHIBATA ecb9f7ef37 Merge cgi-0.4.2 2025-03-08 16:27:22 +09:00
Hiroshi SHIBATA e588271630 Merge uri-0.13.2 2025-03-08 16:27:22 +09:00
Hiroshi SHIBATA c4b6ce3675 Merge syntax-suggest-2.0.1 2024-10-21 08:41:50 -07:00
Hiroshi SHIBATA 494fcc507b Merge RubyGems-3.5.22 and Bundler-2.5.22 2024-10-17 08:55:01 -07:00
Hiroshi SHIBATA d03e4228aa Merge RubyGems-3.5.21 and Bundler-2.5.21 2024-10-17 08:55:01 -07:00
Hiroshi SHIBATA 77fb1bf434 Merge RubyGems-3.5.20 and Bundler-2.5.20 2024-09-25 10:56:17 -07:00
Hiroshi SHIBATA 3894841182 Merge RubyGems-3.5.19 and Bundler-2.5.19 2024-09-25 10:56:17 -07:00
Hiroshi SHIBATA ef3c4a7aa7 Merge RubyGems-3.5.18 and Bundler-2.5.18 2024-09-25 10:56:17 -07:00
Hiroshi SHIBATA 95f72a4a32 Merge RubyGems-3.5.17 and Bundler-2.5.17 2024-09-25 10:56:17 -07:00
Hiroshi SHIBATA 4e59e7d35f [Bug #20737] Do not warn default gems to be promoted in Ruby 3.5 (#11613) 2024-09-16 17:28:08 -07:00
Hiroshi SHIBATA c3f7041ab1 Merge reline-0.5.10 (#11558)
* Merge reline-0.5.8

* Merge reline-0.5.9

* Merge reline-0.5.10
2024-09-05 17:55:34 -07:00
Hiroshi SHIBATA 937964f346 Merge URI-0.13.1 for Ruby 3.3 (#11466)
Merge URI-0.13.1
2024-08-27 16:00:27 -07:00
9ae91eb2aa Backport warning feature for bundled gems from master (#11420)
* Make sure to always use the right `warn`

* lib/bundled_gems.rb: more reliable caller detection

The `2` skipped frames went out of sync and now it should be `3`.

Rather than just update the offset, we can implement a way that
is adaptative as long as all require decorators are also called require.

Also we should compute the corresponding `uplevel` otherwise the
warning will still point decorators.

Co-authored-by: "Hiroshi SHIBATA" <hsbt@ruby-lang.org>

* Warn ostruct for Ruby 3.5

* Warn pstore for Ruby 3.5

* Mark rdoc as bundled gems at Ruby 3.5

* Warn to use win32ole without Gemfile for Ruby 3.5

* EXACT list is mostly same as SINCE list on bundled gems.

* Mark to warn fiddle as bundled gems for Ruby 3.5

* Mark to warn logger as bundled gems for Ruby 3.5

* We should use uplevel:2 in another case.

Like the following scenario with bootsnap, that frames are same or smaller than frame_to_skip(=3).

---
"/Users/hsbt/.local/share/rbenv/versions/3.3-dev/lib/ruby/3.3.0/bundled_gems.rb:69:in `block (2 levels) in replace_require'"
"/Users/hsbt/.local/share/gem/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'"
"test_warn_bootsnap.rb:11:in `<main>'"
---

* Delete unnecessary rubocop disable comment

* Show correct script name with sub-feature case

* Skip to show script name with using ruby -r option

* Don't show script name when bundle exec and call ruby script directly.

* Pick word fix from 34adc07372

---------

Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
Co-authored-by: Kentaro Takeyama <75117116+obregonia1@users.noreply.github.com>
2024-08-21 09:40:11 -07:00
Hiroshi SHIBATA f85c7deacc Update RubyGems 3.5.16 and Bundler 2.5.16 for Ruby 3.3 (#11252)
* Merge RubyGems-3.5.12 and Bundler-2.5.12

* Merge RubyGems-3.5.13 and Bundler-2.5.13

* Merge RubyGems-3.5.14 and Bundler-2.5.14

* Merge RubyGems-3.5.15 and Bundler-2.5.15

* Merge RubyGems-3.5.16 and Bundler-2.5.16
2024-07-30 09:05:54 -07:00
Jean byroot BoussierandJean Boussier 4667f8ec10 bundled_gems.rb: Add a fast path (#11221)
bundled_gems.rb: Add a fast path

[Bug #20641] `Gem::BUNDLED_GEMS.warning?` adds a lot of extra
work on top of `require`. When the call end up atually loading code
the overhead is somewhat marginal.

However it's not uncommon for code to go some late `require` in some
paths, so it's expected that calling `require` with something already
required is somewhat fast, and `bundled_gems.rb` breaks this assumption.

To avoid this, we can have a fast path that in most case allow to
short-circuit all the heavy computations. If we extract the feature
basename and it doesn't match any of the bundled gems we care about
we can return very early.

With this change `require 'date'` is now only 1.33x slower on Ruby
3.3.3, than it was on Ruby 3.2.2, whereas before this change it
was at least 100x slower.

Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
2024-07-22 16:35:22 -07:00
Takashi Kokubun e0fe6f7017 merge revision(s) f8abd24b1f: [Backport #20522]
Improve YJIT performance warning regression test

	[Bug #20522]
2024-06-05 00:29:17 -07:00
Hiroshi SHIBATAandNobuyoshi Nakada 06f470ce66 Merge RubyGems 3.5.11 and Bundler 2.5.11 for Ruby 3.3 (#10870)
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2024-06-04 21:36:46 -07:00
Hiroshi SHIBATA 077558ee2b [Bug #20511] Update reline-0.5.7 (#10848)
* Update reline-0.5.7

* Update irb-1.13.1
2024-05-28 15:54:39 -07:00
Eugene Kenny 6edd65a080 [Bug #20450] Remove rubyarchdir from bootsnap paths 2024-05-28 13:29:22 -07:00
Masataka Pocke Kuwabara 7a3cc54946 Fix error when default gem is loaded from -r option
This patch fixes an error when a default gem that will be migrated to
a bundled gem is loaded from `-r` option.

Problem
===

`bundle exec ruby -rostruct -e ''` unexpectedly raises the following error:

```console
$ ruby -v
ruby 3.4.0dev (2024-04-08T02:39:00Z master 6f7e8e278f) [arm64-darwin21]
$ bundle init && bundle install
$ bundle exec ruby -rostruct -e ''
/Users/kuwabara.masataka/.rbenv/versions/trunk/lib/ruby/3.4.0+0/bundled_gems.rb:111:in 'Gem::BUNDLED_GEMS.warning?': undefined method 'find' for nil (NoMethodError)

      caller = caller_locations(3, 3).find {|c| c&.absolute_path}
                                     ^^^^^
        from /Users/kuwabara.masataka/.rbenv/versions/trunk/lib/ruby/3.4.0+0/bundled_gems.rb:75:in 'block (2 levels) in Kernel#replace_require'
```

Solution
===

This patch uses a safe navigation operator to fix this problem. By this
change, the command will show the warning message correctly.

```console
$ bundle exec ruby -rostruct -e ''
warning: ostruct was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.5.0. Add ostruct to your Gemfile or gemspec.
```
2024-05-28 13:29:22 -07:00
Hiroshi SHIBATA 121cec845a Ignore warnings on the bundled gems repo 2024-05-28 13:29:22 -07:00
Jean Boussier 0b3a2cf5d3 lib/bundled_gems.rb: dynamically ignore Kernel.require decorators
Followup: https://github.com/ruby/ruby/pull/10347

This avoid directly referencing bootsnap and zeitwerk, and also
handle other gems that may decorate `require`.
2024-05-28 13:29:22 -07:00
Hiroshi SHIBATA 7227b859a7 Merge RubyGems 3.5.9 and Bundler 2.5.9 (Fixed CI at Ruby 3.3) (#10348)
* Merge RubyGems-3.5.6 and Bundler-2.5.6

* Merge RubyGems-3.5.7 and Bundler-2.5.7

* Merge RubyGems-3.5.8 and Bundler-2.5.8

* Partly reverted about https://github.com/rubygems/rubygems/pull/7483

* Merge RubyGems-3.5.9 and Bundler-2.5.9
2024-04-16 02:22:22 +00:00