erb 6.0.0 → 6.0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24e8a0ab298d9b248a5bd3080947f0c8096291df4c8448dc8863dfd9a9e6f7a2
4
- data.tar.gz: c55db78471a7a43d8c0c570de76f43c74a082bbd51f6f47e6640444253244e11
3
+ metadata.gz: 699fa4b868078fb1f1c665a30fc39e8eb25f169a62cb49620a5443dd6e213fa4
4
+ data.tar.gz: 472de54777fb648fdee981930424f848fb025495c51284a26bbba0c6b451f43b
5
5
  SHA512:
6
- metadata.gz: fe73982eda100d4da4a2051d06ee8d76d08d71006e148405a23f4a836256c2b67d0821f97abf0bc89d4852c403c5637bc41482f0c8ecc25ece504cadefa96909
7
- data.tar.gz: 3f96a3426744e4f6b69d9ae774a5c51ad1d79141d5e6b2182c9a4bc6a5cb3f66398347be67a265b110c1a8e6fffedd66094245b5a8b3802abc223db3695d5ed6
6
+ metadata.gz: 3be7d825296a080b39e00cfb05c450c696194a8e7e6c4cd9d130c65811facf237949020822e1c62f4c15e168c1473510104cb9b33f3256c7cb0faf5634e583cc
7
+ data.tar.gz: 34bb56cc547cc8c4bd4aa38b339b7f9a19a9d5c1d2256c3726fe3b7541af8af3a9bd7cf938071311777594eaa49c7d8e7a872fa1839624350bbc66f94438df65
@@ -27,11 +27,11 @@ jobs:
27
27
 
28
28
  steps:
29
29
  - name: Harden Runner
30
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
30
+ uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
31
31
  with:
32
32
  egress-policy: audit
33
33
 
34
- - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
34
+ - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
35
35
 
36
36
  - name: Set up Ruby
37
37
  uses: ruby/setup-ruby@d5126b9b3579e429dd52e51e68624dda2e05be25 # v1.267.0
@@ -8,7 +8,7 @@ jobs:
8
8
  runs-on: ubuntu-latest
9
9
  if: ${{ github.repository_owner == 'ruby' }}
10
10
  steps:
11
- - uses: actions/checkout@v5
11
+ - uses: actions/checkout@v6
12
12
 
13
13
  - name: Create GitHub App token
14
14
  id: app-token
@@ -23,7 +23,7 @@ jobs:
23
23
  fail-fast: false
24
24
  runs-on: ${{ matrix.os }}
25
25
  steps:
26
- - uses: actions/checkout@v5
26
+ - uses: actions/checkout@v6
27
27
  - name: Set up Ruby
28
28
  uses: ruby/setup-ruby@v1
29
29
  with:
data/NEWS.md CHANGED
@@ -1,4 +1,12 @@
1
- # Change Lo
1
+ # Changelog
2
+
3
+ ## 6.0.1.1
4
+
5
+ * Prohibit `def_method` on marshal-loaded ERB instances
6
+
7
+ ## 6.0.1
8
+
9
+ * Freeze `ERB::Compiler::TrimScanner::ERB_STAG` for Ractor compatibility
2
10
 
3
11
  ## 6.0.0
4
12
 
data/lib/erb/compiler.rb CHANGED
@@ -225,7 +225,7 @@ class ERB::Compiler # :nodoc:
225
225
  end
226
226
  end
227
227
 
228
- ERB_STAG = %w(<%= <%# <%)
228
+ ERB_STAG = %w(<%= <%# <%).freeze
229
229
  def is_erb_stag?(s)
230
230
  ERB_STAG.member?(s)
231
231
  end
data/lib/erb/util.rb CHANGED
@@ -9,7 +9,7 @@
9
9
  require 'cgi/escape'
10
10
 
11
11
  # Load or define ERB::Escape#html_escape.
12
- # We don't build the C extention 'cgi/escape' for JRuby, TruffleRuby, and WASM.
12
+ # We don't build the C extension 'cgi/escape' for JRuby, TruffleRuby, and WASM.
13
13
  # miniruby (used by CRuby build scripts) also fails to load erb/escape.so.
14
14
  begin
15
15
  require 'erb/escape'
data/lib/erb/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  class ERB
3
3
  # The string \ERB version.
4
- VERSION = '6.0.0'
4
+ VERSION = '6.0.1.1'
5
5
  end
data/lib/erb.rb CHANGED
@@ -1086,6 +1086,9 @@ class ERB
1086
1086
  # ```
1087
1087
  #
1088
1088
  def def_method(mod, methodname, fname='(ERB)')
1089
+ unless @_init.equal?(self.class.singleton_class)
1090
+ raise ArgumentError, "not initialized"
1091
+ end
1089
1092
  src = self.src.sub(/^(?!#|$)/) {"def #{methodname}\n"} << "\nend\n"
1090
1093
  mod.module_eval do
1091
1094
  eval(src, binding, fname, -1)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erb
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0
4
+ version: 6.0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masatoshi SEKI
@@ -55,7 +55,7 @@ licenses:
55
55
  metadata:
56
56
  homepage_uri: https://github.com/ruby/erb
57
57
  source_code_uri: https://github.com/ruby/erb
58
- changelog_uri: https://github.com/ruby/erb/blob/v6.0.0/NEWS.md
58
+ changelog_uri: https://github.com/ruby/erb/blob/v6.0.1.1/NEWS.md
59
59
  rdoc_options: []
60
60
  require_paths:
61
61
  - lib