File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -602,6 +602,9 @@ def transaction(read_only = false) # :yields: pstore
602602 EMPTY_MARSHAL_DATA = Marshal . dump ( { } )
603603 EMPTY_MARSHAL_CHECKSUM = CHECKSUM_ALGO . digest ( EMPTY_MARSHAL_DATA )
604604
605+ EMPTY_MARSHAL_DATA . freeze
606+ EMPTY_MARSHAL_CHECKSUM . freeze
607+
605608 #
606609 # Open the specified filename (either in read-only mode or in
607610 # read-write mode) and lock it for reading or writing.
@@ -666,9 +669,12 @@ def load_data(file, read_only)
666669
667670 def on_windows?
668671 is_windows = RUBY_PLATFORM =~ /mswin|mingw|bccwin|wince/
669- self . class . __send__ ( :define_method , :on_windows? ) do
672+
673+ on_windows_proc = Proc . new do
670674 is_windows
671675 end
676+ Ractor . make_shareable ( on_windows_proc ) if defined? ( Ractor )
677+ self . class . __send__ ( :define_method , :on_windows? , &on_windows_proc )
672678 is_windows
673679 end
674680
You can’t perform that action at this time.
0 commit comments