HEX
Server: Apache
System: Linux vps-cdc32557.vps.ovh.ca 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
User: hanode (1017)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/share/ri/3.0.0/system/Ractor/make_shareable-c.ri
U:RDoc::AnyMethod[iI"make_shareable:ETI"Ractor::make_shareable;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph;	[I"*Make +obj+ shareable between ractors.;To:RDoc::Markup::BlankLineo;
;	[I"L+obj+ and all the objects it refers to will be frozen, unless they are ;TI"already shareable.;T@o;
;	[I"TIf +copy+ keyword is +true+, the method will copy objects before freezing them ;TI"4This is safer option but it can take be slower.;T@o;
;	[I"KNote that the specification and implementation of this method are not ;TI"-mature and may be changed in the future.;T@o:RDoc::Markup::Verbatim;	[I"obj = ['test']
;TI"*Ractor.shareable?(obj)     #=> false
;TI"-Ractor.make_shareable(obj) #=> ["test"]
;TI")Ractor.shareable?(obj)     #=> true
;TI")obj.frozen?                #=> true
;TI")obj[0].frozen?             #=> true
;TI"
;TI""# Copy vs non-copy versions:
;TI"obj1 = ['test']
;TI")obj1s = Ractor.make_shareable(obj1)
;TI"2obj1.frozen?                        #=> true
;TI"2obj1s.object_id == obj1.object_id   #=> true
;TI"obj2 = ['test']
;TI"5obj2s = Ractor.make_shareable(obj2, copy: true)
;TI"3obj2.frozen?                        #=> false
;TI"2obj2s.frozen?                       #=> true
;TI"3obj2s.object_id == obj2.object_id   #=> false
;TI"7obj2s[0].object_id == obj2[0].object_id #=> false
;T:@format0o;
;	[I"WSee also the "Shareable and unshareable objects" section in the Ractor class docs.;T:
@fileI"ractor.rb;T:0@omit_headings_from_table_of_contents_below0I">Ractor.make_shareable(obj, copy: false) -> shareable_obj
;T0[I"(obj, copy: false);T@2FI"Ractor;TcRDoc::NormalClass00