mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 05:29:10 +02:00
[ruby/erb] Declare escape functions as Ractor-safe
(https://github.com/ruby/erb/pull/63)
fdd45c0d89
This commit is contained in:
parent
35660ec17d
commit
71d4518c59
2 changed files with 5 additions and 0 deletions
|
@ -89,6 +89,10 @@ erb_escape_html(VALUE self, VALUE str)
|
|||
void
|
||||
Init_escape(void)
|
||||
{
|
||||
#ifdef HAVE_RB_EXT_RACTOR_SAFE
|
||||
rb_ext_ractor_safe(true);
|
||||
#endif
|
||||
|
||||
rb_cERB = rb_define_class("ERB", rb_cObject);
|
||||
rb_mEscape = rb_define_module_under(rb_cERB, "Escape");
|
||||
rb_define_module_function(rb_mEscape, "html_escape", erb_escape_html, 1);
|
||||
|
|
|
@ -4,5 +4,6 @@ case RUBY_ENGINE
|
|||
when 'jruby', 'truffleruby'
|
||||
File.write('Makefile', dummy_makefile($srcdir).join)
|
||||
else
|
||||
have_func("rb_ext_ractor_safe", "ruby.h")
|
||||
create_makefile 'erb/escape'
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue