From addb1cbbfd93d30e4752ec63b2d5ff96a13fac3d Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Fri, 25 Nov 2022 00:53:36 -0800 Subject: [ruby/erb] Keep ERB::Util#html_escape private ERB::Util.html_escape has been public, but ERB::Util#html_escape had been private. https://github.com/ruby/erb/commit/e62210bf56 --- lib/erb/util.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/erb/util.rb b/lib/erb/util.rb index 9ba4583f82..97f5abbba0 100644 --- a/lib/erb/util.rb +++ b/lib/erb/util.rb @@ -21,14 +21,14 @@ module ERB::Util # # is a > 0 & a < 10? # - unless method_defined?(:html_escape) # for JRuby + unless defined?(ERB::Util.html_escape) # for JRuby def html_escape(s) CGI.escapeHTML(s.to_s) end + module_function :html_escape end alias h html_escape module_function :h - module_function :html_escape # # A utility method for encoding the String _s_ as a URL. -- cgit v1.2.3