Skip to content

Commit 348777b

Browse files
wanabek0kubun
authored andcommitted
Make ERB::NOT_GIVEN ractor-shareable
1 parent 4efd343 commit 348777b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/erb.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ def initialize(str, safe_level=NOT_GIVEN, legacy_trim_mode=NOT_GIVEN, legacy_eou
353353
@lineno = 0
354354
@_init = self.class.singleton_class
355355
end
356-
NOT_GIVEN = Object.new
356+
NOT_GIVEN = defined?(Ractor) ? Ractor.make_shareable(Object.new) : Object.new
357357
private_constant :NOT_GIVEN
358358

359359
##

0 commit comments

Comments
 (0)