From 62282e32d95d1e63166eecea8dd006881955b1ca Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 18 Sep 2025 13:57:58 +0900 Subject: [PATCH 1/2] [DOC] Fix the location of `url_encode` doc The documentation must be just before the definition. --- lib/erb/util.rb | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/erb/util.rb b/lib/erb/util.rb index 42c7a57..efa8ca1 100644 --- a/lib/erb/util.rb +++ b/lib/erb/util.rb @@ -47,19 +47,19 @@ module ERB::Util alias h html_escape module_function :h - # - # A utility method for encoding the String _s_ as a URL. - # - # require "erb" - # include ERB::Util - # - # puts url_encode("Programming Ruby: The Pragmatic Programmer's Guide") - # - # _Generates_ - # - # Programming%20Ruby%3A%20%20The%20Pragmatic%20Programmer%27s%20Guide - # if CGI.respond_to?(:escapeURIComponent) + # + # A utility method for encoding the String _s_ as a URL. + # + # require "erb" + # include ERB::Util + # + # puts url_encode("Programming Ruby: The Pragmatic Programmer's Guide") + # + # _Generates_ + # + # Programming%20Ruby%3A%20%20The%20Pragmatic%20Programmer%27s%20Guide + # def url_encode(s) CGI.escapeURIComponent(s.to_s) end From 7fed01c4deff3848596ec6f373c423ee0d0a9fbd Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 18 Sep 2025 14:00:44 +0900 Subject: [PATCH 2/2] [DOC] `ERB::Version` --- lib/erb/version.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/erb/version.rb b/lib/erb/version.rb index 0875dcb..1c2c6fe 100644 --- a/lib/erb/version.rb +++ b/lib/erb/version.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true class ERB + # The version string VERSION = '5.0.2' end