erb 4.0.0 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS.md +6 -2
- data/Rakefile +4 -1
- data/ext/erb/escape/extconf.rb +6 -1
- data/lib/erb/util.rb +6 -3
- data/lib/erb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e00dd4c30b3c6affa697b52c33f6888583030f2cd90ae088e92dc36e1e2d513b
|
4
|
+
data.tar.gz: 5c778ef315846ec45a3c2f0413ca1c1f1bf38727037bcb2c23be2a2782f4f5b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3ec96b260c70b9a3c673d21500a5b2e4834870caecb0153b0f7bf5337581e5183a90ed81b59e5a26843b76012540d5c695c26cfe206b636e7a33a2639c4d6fa
|
7
|
+
data.tar.gz: f918bf3065949b0ab784212357a160bce6432b284509660d0949d8479866cc5577bbe3892a9f1dee721d501f5a09d522efcd22473aee84c14a4557ae94ca6dc8
|
data/NEWS.md
CHANGED
@@ -1,12 +1,16 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 4.0.1
|
4
|
+
|
5
|
+
* Stop building the C extension for TruffleRuby [#39](https://github.com/ruby/erb/pull/39)
|
6
|
+
|
3
7
|
## 4.0.0
|
4
8
|
|
5
|
-
* Optimize `ERB::Util.html_escape`
|
9
|
+
* Optimize `ERB::Util.html_escape` [#27](https://github.com/ruby/erb/pull/27)
|
6
10
|
* No longer duplicate an argument string when nothing is escaped.
|
7
11
|
* This makes `ERB::Util.html_escape` faster than `CGI.escapeHTML` in no-escape cases.
|
8
12
|
* It skips calling `#to_s` when an argument is already a String.
|
9
|
-
* Define `ERB::Escape.html_escape` as an alias to `ERB::Util.html_escape`
|
13
|
+
* Define `ERB::Escape.html_escape` as an alias to `ERB::Util.html_escape` [#38](https://github.com/ruby/erb/pull/38)
|
10
14
|
* `ERB::Util.html_escape` is known to be monkey-patched by Rails.
|
11
15
|
`ERB::Escape.html_escape` is useful when you want a non-monkey-patched version.
|
12
16
|
* Drop deprecated `-S` option from `erb` command
|
data/Rakefile
CHANGED
@@ -7,7 +7,10 @@ Rake::TestTask.new(:test) do |t|
|
|
7
7
|
t.test_files = FileList['test/**/test_*.rb']
|
8
8
|
end
|
9
9
|
|
10
|
-
|
10
|
+
case RUBY_ENGINE
|
11
|
+
when 'jruby', 'truffleruby'
|
12
|
+
# not using C extension
|
13
|
+
else
|
11
14
|
require 'rake/extensiontask'
|
12
15
|
Rake::ExtensionTask.new('erb/escape')
|
13
16
|
task test: :compile
|
data/ext/erb/escape/extconf.rb
CHANGED
data/lib/erb/util.rb
CHANGED
@@ -4,10 +4,13 @@
|
|
4
4
|
# A subset of ERB::Util. Unlike ERB::Util#html_escape, we expect/hope
|
5
5
|
# Rails will not monkey-patch ERB::Escape#html_escape.
|
6
6
|
begin
|
7
|
-
|
8
|
-
|
7
|
+
# We don't build the C extension for JRuby, TruffleRuby, and WASM
|
8
|
+
if $LOAD_PATH.resolve_feature_path('erb/escape')
|
9
|
+
require 'erb/escape'
|
10
|
+
end
|
11
|
+
rescue LoadError # resolve_feature_path raises LoadError on TruffleRuby 22.3.0
|
9
12
|
end
|
10
|
-
unless defined?(ERB::Escape)
|
13
|
+
unless defined?(ERB::Escape)
|
11
14
|
module ERB::Escape
|
12
15
|
def html_escape(s)
|
13
16
|
CGI.escapeHTML(s.to_s)
|
data/lib/erb/version.rb
CHANGED
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: 4.0.
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masatoshi SEKI
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: libexec
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-11-
|
12
|
+
date: 2022-11-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cgi
|