We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 48fc87a commit 769ceb8Copy full SHA for 769ceb8
1 file changed
lib/erb/util.rb
@@ -4,8 +4,11 @@
4
# A subset of ERB::Util. Unlike ERB::Util#html_escape, we expect/hope
5
# Rails will not monkey-patch ERB::Escape#html_escape.
6
begin
7
- require 'erb/escape'
8
-rescue LoadError # for JRuby, TruffleRuby
+ # We don't build the C extension for JRuby, TruffleRuby, and WASM
+ 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
12
end
13
unless defined?(ERB::Escape)
14
module ERB::Escape
0 commit comments