diff --git a/.github/workflows/spec_guards.yml b/.github/workflows/spec_guards.yml
index bfbe8296845fd5..edbd268d0f0b19 100644
--- a/.github/workflows/spec_guards.yml
+++ b/.github/workflows/spec_guards.yml
@@ -42,6 +42,7 @@ jobs:
- ruby-3.2
- ruby-3.3
- ruby-3.4
+ fail-fast: false
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
diff --git a/NEWS.md b/NEWS.md
index 96da441a627813..7722f3fe00c42a 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -191,7 +191,7 @@ The following default gems are updated.
* date 3.5.0
* digest 3.2.1
* english 0.8.1
-* erb 5.1.3
+* erb 6.0.0
* etc 1.4.6
* fcntl 1.3.0
* fileutils 1.8.0
diff --git a/ext/io/wait/wait.c b/ext/io/wait/wait.c
index f27d7c11e5db48..cf36346cf2f955 100644
--- a/ext/io/wait/wait.c
+++ b/ext/io/wait/wait.c
@@ -11,6 +11,8 @@
**********************************************************************/
+#include "ruby.h" /* abi_version */
+
/*
* IO wait methods are built in ruby now, just for backward compatibility.
*/
diff --git a/gems/bundled_gems b/gems/bundled_gems
index e7b5091bcc7e2e..3245e9efbc6ae7 100644
--- a/gems/bundled_gems
+++ b/gems/bundled_gems
@@ -18,7 +18,7 @@ net-pop 0.1.2 https://github.com/ruby/net-pop
net-smtp 0.5.1 https://github.com/ruby/net-smtp
matrix 0.4.3 https://github.com/ruby/matrix
prime 0.1.4 https://github.com/ruby/prime
-rbs 3.9.5 https://github.com/ruby/rbs
+rbs 3.9.5 https://github.com/ruby/rbs 22451ecbe262326176eb3915b64366712930685c # waiting for https://github.com/ruby/rbs/pull/2706
typeprof 0.31.0 https://github.com/ruby/typeprof
debug 1.11.0 https://github.com/ruby/debug
racc 1.8.1 https://github.com/ruby/racc
diff --git a/lib/erb.rb b/lib/erb.rb
index b1f4e9361b6384..445d4795b018bb 100644
--- a/lib/erb.rb
+++ b/lib/erb.rb
@@ -778,9 +778,6 @@
# [template processor]: https://en.wikipedia.org/wiki/Template_processor
#
class ERB
- Revision = '$Date:: $' # :nodoc: #'
- deprecate_constant :Revision
-
# :markup: markdown
#
# :call-seq:
@@ -827,46 +824,12 @@ def self.version
#
# It's good practice to choose a variable name that begins with an underscore: `'_'`.
#
- # Backward Compatibility
- #
- # The calling sequence given above -- which is the one you should use --
- # is a simplified version of the complete formal calling sequence,
- # which is:
- #
- # ```
- # ERB.new(template,
- # safe_level=NOT_GIVEN, legacy_trim_mode=NOT_GIVEN, legacy_eoutvar=NOT_GIVEN,
- # trim_mode: nil, eoutvar: '_erbout')
- # ```
- #
- # The second, third, and fourth positional arguments (those in the second line above) are deprecated;
- # this method issues warnings if they are given.
- #
- # However, their values, if given, are handled thus:
- #
- # - `safe_level`: ignored.
- # - `legacy_trim_mode`: overrides keyword argument `trim_mode`.
- # - `legacy_eoutvar`: overrides keyword argument `eoutvar`.
- #
# [blank line control]: rdoc-ref:ERB@Suppressing+Unwanted+Blank+Lines
# [combine trim modes]: rdoc-ref:ERB@Combining+Trim+Modes
# [newline control]: rdoc-ref:ERB@Suppressing+Unwanted+Newlines
# [shorthand format]: rdoc-ref:ERB@Shorthand+Format+for+Execution+Tags
#
- def initialize(str, safe_level=NOT_GIVEN, legacy_trim_mode=NOT_GIVEN, legacy_eoutvar=NOT_GIVEN, trim_mode: nil, eoutvar: '_erbout')
- # Complex initializer for $SAFE deprecation at [Feature #14256]. Use keyword arguments to pass trim_mode or eoutvar.
- if safe_level != NOT_GIVEN
- warn 'Passing safe_level with the 2nd argument of ERB.new is deprecated. Do not use it, and specify other arguments as keyword arguments.', uplevel: 1
- end
- if legacy_trim_mode != NOT_GIVEN
- warn 'Passing trim_mode with the 3rd argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, trim_mode: ...) instead.', uplevel: 1
- trim_mode = legacy_trim_mode
- end
- if legacy_eoutvar != NOT_GIVEN
- warn 'Passing eoutvar with the 4th argument of ERB.new is deprecated. Use keyword argument like ERB.new(str, eoutvar: ...) instead.', uplevel: 1
- eoutvar = legacy_eoutvar
- end
-
+ def initialize(str, trim_mode: nil, eoutvar: '_erbout')
compiler = make_compiler(trim_mode)
set_eoutvar(compiler, eoutvar)
@src, @encoding, @frozen_string = *compiler.compile(str)
@@ -875,12 +838,6 @@ def initialize(str, safe_level=NOT_GIVEN, legacy_trim_mode=NOT_GIVEN, legacy_eou
@_init = self.class.singleton_class
end
- # :markup: markdown
- #
- # Placeholder constant; used as default value for certain method arguments.
- NOT_GIVEN = defined?(Ractor) ? Ractor.make_shareable(Object.new) : Object.new
- private_constant :NOT_GIVEN
-
# :markup: markdown
#
# :call-seq:
@@ -894,7 +851,6 @@ def initialize(str, safe_level=NOT_GIVEN, legacy_trim_mode=NOT_GIVEN, legacy_eou
# # => #
# ```
#
-
def make_compiler(trim_mode)
ERB::Compiler.new(trim_mode)
end
@@ -1211,7 +1167,6 @@ def def_module(methodname='erb')
#