erb 6.0.3-java → 6.0.5-java
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 +4 -4
- data/Gemfile +6 -1
- data/NEWS.md +21 -1
- data/lib/erb/version.rb +1 -1
- data/lib/erb.rb +13 -2
- 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: e1fdd0c922896e9fe7333bcdefec35a6485344f0b577157f21a27e9e0ca56455
|
|
4
|
+
data.tar.gz: d0dbe48be9caa4bd235c9cb2b6bf2da03eeb23a527a6a75f1f6e333f6204fc58
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3cfadb5d42a2592d786718f4c5bf1a9ca912188dec002de1cb5474fabf0ad471e88eb37cd777fd343289872708aaccc383e1640a893d9b5f3e7a44025985528d
|
|
7
|
+
data.tar.gz: 439e139bcbd315dccd701d543c984593e166f2c99004c2c9f0b8571c392856275cd20feb5fd11dc17a847231e4b07b22b878c1b12a491d806444ebfa84466bb3
|
data/Gemfile
CHANGED
|
@@ -5,7 +5,12 @@ gemspec
|
|
|
5
5
|
group :development do
|
|
6
6
|
gem 'rake'
|
|
7
7
|
gem 'rake-compiler'
|
|
8
|
-
|
|
8
|
+
if RUBY_ENGINE == 'jruby'
|
|
9
|
+
# RDoc 8 pulls in RBS 4, which attempts to build a native extension on JRuby.
|
|
10
|
+
gem 'rdoc', '< 8'
|
|
11
|
+
else
|
|
12
|
+
gem 'rdoc'
|
|
13
|
+
end
|
|
9
14
|
gem 'test-unit'
|
|
10
15
|
gem "test-unit-ruby-core"
|
|
11
16
|
end
|
data/NEWS.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 6.0.5
|
|
4
|
+
|
|
5
|
+
* Avoid overridable method dispatch in the initialization guard
|
|
6
|
+
|
|
7
|
+
## 6.0.4
|
|
8
|
+
|
|
9
|
+
* Prohibit `def_method` on marshal-loaded ERB instances
|
|
10
|
+
|
|
3
11
|
## 6.0.3
|
|
4
12
|
|
|
5
13
|
* Exclude some files from published gem https://github.com/ruby/erb/pull/108
|
|
@@ -8,6 +16,10 @@
|
|
|
8
16
|
|
|
9
17
|
* Freeze `src` in `ERB#initialize` for Ractor compatibility https://github.com/ruby/erb/pull/105
|
|
10
18
|
|
|
19
|
+
## 6.0.1.1
|
|
20
|
+
|
|
21
|
+
* Prohibit `def_method` on marshal-loaded ERB instances
|
|
22
|
+
|
|
11
23
|
## 6.0.1
|
|
12
24
|
|
|
13
25
|
* Freeze `ERB::Compiler::TrimScanner::ERB_STAG` for Ractor compatibility
|
|
@@ -51,9 +63,17 @@
|
|
|
51
63
|
* Drop `cgi` from runtime dependencies [#59](https://github.com/ruby/erb/pull/59)
|
|
52
64
|
* Make `ERB::VERSION` public
|
|
53
65
|
|
|
66
|
+
## 4.0.4.1
|
|
67
|
+
|
|
68
|
+
* Prohibit `def_method` on marshal-loaded ERB instances
|
|
69
|
+
|
|
54
70
|
## 4.0.4
|
|
55
71
|
|
|
56
|
-
* Skip building the C extension for JRuby
|
|
72
|
+
* Skip building the C extension for JRuby
|
|
73
|
+
|
|
74
|
+
## 4.0.3.1
|
|
75
|
+
|
|
76
|
+
* Prohibit `def_method` on marshal-loaded ERB instances
|
|
57
77
|
|
|
58
78
|
## 4.0.3
|
|
59
79
|
|
data/lib/erb/version.rb
CHANGED
data/lib/erb.rb
CHANGED
|
@@ -778,6 +778,9 @@ require 'erb/util'
|
|
|
778
778
|
# [template processor]: https://en.wikipedia.org/wiki/Template_processor
|
|
779
779
|
#
|
|
780
780
|
class ERB
|
|
781
|
+
IDENTITY_METHOD = BasicObject.instance_method(:equal?) # :nodoc:
|
|
782
|
+
private_constant :IDENTITY_METHOD
|
|
783
|
+
|
|
781
784
|
# :markup: markdown
|
|
782
785
|
#
|
|
783
786
|
# :call-seq:
|
|
@@ -889,7 +892,7 @@ class ERB
|
|
|
889
892
|
#
|
|
890
893
|
# ```
|
|
891
894
|
# erb = ERB.new(template, eoutvar: '_foo')
|
|
892
|
-
# puts
|
|
895
|
+
# puts erb.src.split('; ')
|
|
893
896
|
# #coding:UTF-8
|
|
894
897
|
# _foo = +''
|
|
895
898
|
# _foo.<< "The time is ".freeze
|
|
@@ -1007,7 +1010,7 @@ class ERB
|
|
|
1007
1010
|
# [local binding]: rdoc-ref:ERB@Local+Binding
|
|
1008
1011
|
#
|
|
1009
1012
|
def result(b=new_toplevel)
|
|
1010
|
-
unless
|
|
1013
|
+
unless initialized_by_new?
|
|
1011
1014
|
raise ArgumentError, "not initialized"
|
|
1012
1015
|
end
|
|
1013
1016
|
eval(@src, b, (@filename || '(erb)'), @lineno)
|
|
@@ -1061,6 +1064,11 @@ class ERB
|
|
|
1061
1064
|
end
|
|
1062
1065
|
private :new_toplevel
|
|
1063
1066
|
|
|
1067
|
+
def initialized_by_new? # :nodoc:
|
|
1068
|
+
IDENTITY_METHOD.bind_call(@_init, self.class.singleton_class)
|
|
1069
|
+
end
|
|
1070
|
+
private :initialized_by_new?
|
|
1071
|
+
|
|
1064
1072
|
# :markup: markdown
|
|
1065
1073
|
#
|
|
1066
1074
|
# :call-seq:
|
|
@@ -1087,6 +1095,9 @@ class ERB
|
|
|
1087
1095
|
# ```
|
|
1088
1096
|
#
|
|
1089
1097
|
def def_method(mod, methodname, fname='(ERB)')
|
|
1098
|
+
unless initialized_by_new?
|
|
1099
|
+
raise ArgumentError, "not initialized"
|
|
1100
|
+
end
|
|
1090
1101
|
src = self.src.sub(/^(?!#|$)/) {"def #{methodname}\n"} << "\nend\n"
|
|
1091
1102
|
mod.module_eval do
|
|
1092
1103
|
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.
|
|
4
|
+
version: 6.0.5
|
|
5
5
|
platform: java
|
|
6
6
|
authors:
|
|
7
7
|
- Masatoshi SEKI
|
|
@@ -49,7 +49,7 @@ licenses:
|
|
|
49
49
|
metadata:
|
|
50
50
|
homepage_uri: https://github.com/ruby/erb
|
|
51
51
|
source_code_uri: https://github.com/ruby/erb
|
|
52
|
-
changelog_uri: https://github.com/ruby/erb/blob/v6.0.
|
|
52
|
+
changelog_uri: https://github.com/ruby/erb/blob/v6.0.5/NEWS.md
|
|
53
53
|
rdoc_options: []
|
|
54
54
|
require_paths:
|
|
55
55
|
- lib
|