mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 12:14:51 +00:00
[ruby/erb] Declare escape functions as Ractor-safe
(https://github.com/ruby/erb/pull/63) https://github.com/ruby/erb/commit/fdd45c0d89
This commit is contained in:
parent
35660ec17d
commit
71d4518c59
@ -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…
x
Reference in New Issue
Block a user