зеркало из https://github.com/github/ruby.git
[ruby/erb] Rename erb.so to erb/escape.so
(https://github.com/ruby/erb/pull/35) https://github.com/ruby/erb/commit/1280046952
This commit is contained in:
Родитель
04a92a6764
Коммит
c480f589c2
|
@ -84,7 +84,7 @@ erb_escape_html(VALUE self, VALUE str)
|
|||
}
|
||||
|
||||
void
|
||||
Init_erb(void)
|
||||
Init_escape(void)
|
||||
{
|
||||
rb_cERB = rb_define_class("ERB", rb_cObject);
|
||||
rb_mUtil = rb_define_module_under(rb_cERB, "Util");
|
|
@ -0,0 +1,2 @@
|
|||
require 'mkmf'
|
||||
create_makefile 'erb/escape'
|
|
@ -1,2 +0,0 @@
|
|||
require 'mkmf'
|
||||
create_makefile 'erb'
|
|
@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
|||
spec.platform = 'java'
|
||||
else
|
||||
spec.required_ruby_version = '>= 2.7.0'
|
||||
spec.extensions = ['ext/erb/extconf.rb']
|
||||
spec.extensions = ['ext/erb/escape/extconf.rb']
|
||||
end
|
||||
|
||||
spec.add_dependency 'cgi', '>= 0.3.3'
|
||||
|
|
|
@ -1000,7 +1000,7 @@ class ERB
|
|||
#
|
||||
begin
|
||||
# ERB::Util.html_escape
|
||||
require 'erb.so'
|
||||
require 'erb/escape'
|
||||
rescue LoadError
|
||||
def html_escape(s)
|
||||
CGI.escapeHTML(s.to_s)
|
||||
|
|
Загрузка…
Ссылка в новой задаче