13 Commits

Author SHA1 Message Date
Takashi Kokubun
1d3221ad28 [ruby/erb] Give up on using resolve_feature_path
Apparently `$LOAD_PATH.resolve_feature_path('erb/escape')` returns true
for miniruby but `require 'erb/escape'` fails on it.

I still don't want to check it and rescue LoadError at the same time
because the code looks too complicated. Let me just rescue LoadError for
platforms that don't build native extensions.

https://github.com/ruby/erb/commit/3081c6b20f
2025-05-13 23:54:02 +00:00
Takashi Kokubun
e8e7daa71a [ruby/erb] Reapply "Refactor the logic of require 'erb/escape'
(https://github.com/ruby/erb/pull/61)"

This reverts commit https://github.com/ruby/erb/commit/1c9200aab071.

Now that we've bumped BASERUBY, we shouldn't need to rescue the
LoadError.

https://github.com/ruby/erb/commit/846b20fe0e
2025-05-13 23:31:02 +00:00
Takashi Kokubun
cbaf85cb32 [ruby/erb] Update the reason why we need to rescue LoadError
https://github.com/ruby/erb/commit/c2d1f82817
2025-05-13 18:23:04 +00:00
Takashi Kokubun
c71f9b8aee [ruby/erb] Revert "Refactor the logic of require 'erb/escape'
(https://github.com/ruby/erb/pull/61)"

This reverts commit https://github.com/ruby/erb/commit/1c393aa738f3.

https://github.com/ruby/erb/commit/1c9200aab0
2025-05-13 18:23:04 +00:00
Takashi Kokubun
4a9d46ce07 [ruby/erb] Refactor the logic of require 'erb/escape'
(https://github.com/ruby/erb/pull/61)

https://github.com/ruby/erb/commit/1c393aa738
2025-05-13 18:00:07 +00:00
Takashi Kokubun
735f28388c [ruby/erb] Support all cgi.gem versions
(https://github.com/ruby/erb/pull/60)

https://github.com/ruby/erb/commit/de9bb8c3cc
2025-05-13 17:50:05 +00:00
Nobuyoshi Nakada
311b9352a1 [ruby/erb] [DOC] Make documentation 100%
https://github.com/ruby/erb/commit/9152ce8db4
2025-05-12 13:57:24 +00:00
Josh Nichols
0955ca342e [ruby/erb] Enable frozen_string_literal in all files
(https://github.com/ruby/erb/pull/49)

I was surprised to see erb show up when I was using memory_profiler on
my app. ERB::Compiler#compile has a blank string literal, and it
ended up allocating some 41532 blank strings for a relatively small surface
area.

https://github.com/ruby/erb/commit/b7e45c2bdc
2023-08-22 04:41:22 +00:00
Takashi Kokubun
d2c62426e5 [ruby/erb] Skip using the extension for truffleruby as well
(https://github.com/ruby/erb/pull/39)

* Skip using the extension for truffleruby as well

* Just skip building the C extension for TruffleRuby

* Skip rake compile for truffleruby

* Use resolve_feature_path

* Revert "Use resolve_feature_path"

This reverts commit https://github.com/ruby/erb/commit/acc1e0c0ffaf.

* Use resolve_feature_path with LoadError guard

https://github.com/ruby/erb/commit/85dcb08439
2022-11-27 06:30:48 +00:00
Takashi Kokubun
574896a0ce [ruby/erb] Define ERB::Escape module
(https://github.com/ruby/erb/pull/38)

Close #32
2022-11-26 05:32:25 +00:00
Takashi Kokubun
addb1cbbfd [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
2022-11-25 08:54:18 +00:00
Takashi Kokubun
bcdfe12919 [ruby/erb] Allow requiring erb/escape.so alone
(https://github.com/ruby/erb/pull/37)

Prior to this commit, requiring erb/escape first and then requiring erb
did not work as expected.
2022-11-24 23:49:15 +00:00
Takashi Kokubun
8ac4081aa8 [ruby/erb] Split erb.rb into files for each module under ERB
(https://github.com/ruby/erb/pull/36)

https://github.com/ruby/erb/commit/f74833cc07
2022-11-24 23:40:53 +00:00