diff options
| author | Koichi Sasada <ko1@atdot.net> | 2025-12-05 02:40:59 +0900 |
|---|---|---|
| committer | Koichi Sasada <ko1@atdot.net> | 2025-12-05 03:10:50 +0900 |
| commit | 2aaea665bb19be8ed64605ec9aa5c990fddbd2ce (patch) | |
| tree | f6e20a54e33cf819c1852d280ce18d58095f69c7 | |
| parent | 5062c0c621d887367af8a054e5e5d83d7ec57dd3 (diff) | |
fix typo s/sharable/shareable/
| -rw-r--r-- | bootstraptest/test_ractor.rb | 6 | ||||
| -rw-r--r-- | doc/syntax/comments.rdoc | 2 | ||||
| -rw-r--r-- | include/ruby/internal/core/rtypeddata.h | 2 | ||||
| -rw-r--r-- | include/ruby/ractor.h | 2 | ||||
| -rw-r--r-- | ractor.c | 2 | ||||
| -rw-r--r-- | ractor.rb | 8 | ||||
| -rw-r--r-- | test/ruby/test_parse.rb | 2 |
7 files changed, 12 insertions, 12 deletions
diff --git a/bootstraptest/test_ractor.rb b/bootstraptest/test_ractor.rb index cc00fa3586..271abb3c84 100644 --- a/bootstraptest/test_ractor.rb +++ b/bootstraptest/test_ractor.rb @@ -1203,9 +1203,9 @@ assert_equal '[:ok, "Proc\'s self is not shareable:"]', %q{ end } -# Ractor.make_sharable(Method/UnboundMethod) +# Ractor.make_shareable(Method/UnboundMethod) assert_equal 'true', %q{ - # raise because receiver is unsharable + # raise because receiver is unshareable begin _m0 = Ractor.make_shareable(self.method(:__id__)) rescue => e @@ -1214,7 +1214,7 @@ assert_equal 'true', %q{ raise "no error" end - # Method with sharable receiver + # Method with shareable receiver M1 = Ractor.make_shareable(Object.method(:__id__)) # UnboundMethod diff --git a/doc/syntax/comments.rdoc b/doc/syntax/comments.rdoc index 00d19d588a..cb6829a984 100644 --- a/doc/syntax/comments.rdoc +++ b/doc/syntax/comments.rdoc @@ -170,7 +170,7 @@ In this mode, all values assigned to constants are made shareable. # shareable_constant_value: experimental_everything FOO = Set[1, 2, {foo: []}] - # same as FOO = Ractor.make_sharable(...) + # same as FOO = Ractor.make_shareable(...) # OR same as `FOO = Set[1, 2, {foo: [].freeze}.freeze].freeze` var = [{foo: []}] diff --git a/include/ruby/internal/core/rtypeddata.h b/include/ruby/internal/core/rtypeddata.h index ee79c2e2a9..ebcac2c846 100644 --- a/include/ruby/internal/core/rtypeddata.h +++ b/include/ruby/internal/core/rtypeddata.h @@ -160,7 +160,7 @@ rbimpl_typeddata_flags { // experimental flag // Similar to RUBY_TYPED_FROZEN_SHAREABLE, but doesn't make shareable // reachable objects from this T_DATA object on the Ractor.make_shareable. - // If it refers to unsharable objects, simply raise an error. + // If it refers to unshareable objects, simply raise an error. // RUBY_TYPED_FROZEN_SHAREABLE_NO_REC = RUBY_FL_FINALIZE, /** diff --git a/include/ruby/ractor.h b/include/ruby/ractor.h index 85222bbe11..8cfca21621 100644 --- a/include/ruby/ractor.h +++ b/include/ruby/ractor.h @@ -217,7 +217,7 @@ VALUE rb_ractor_make_shareable(VALUE obj); * * @param[in] obj Arbitrary ruby object to duplicate. * @exception rb_eRactorError Ractors cannot share `obj` by nature. - * @return A deep copy of `obj` which is sharable among Ractors. + * @return A deep copy of `obj` which is shareable among Ractors. */ VALUE rb_ractor_make_shareable_copy(VALUE obj); @@ -2366,7 +2366,7 @@ ractor_local_value_store_if_absent(rb_execution_context_t *ec, VALUE self, VALUE return rb_mutex_synchronize(cr->local_storage_store_lock, ractor_local_value_store_i, (VALUE)&data); } -// sharable_proc +// shareable_proc static VALUE ractor_shareable_proc(rb_execution_context_t *ec, VALUE replace_self, bool is_lambda) @@ -607,7 +607,7 @@ class Ractor # # call-seq: - # Ractor.sharable_proc(self: nil){} -> sharable proc + # Ractor.shareable_proc(self: nil){} -> shareable proc # # It returns shareable Proc object. The Proc object is # shareable and the self in a block will be replaced with @@ -619,7 +619,7 @@ class Ractor # Ractor.shareable_proc{ p a } # #=> can not isolate a Proc because it accesses outer variables (a). (ArgumentError) # - # The `self` should be a sharable object + # The `self` should be a shareable object # # Ractor.shareable_proc(self: self){} # #=> self should be shareable: main (Ractor::IsolationError) @@ -634,9 +634,9 @@ class Ractor # # call-seq: - # Ractor.sharable_proc{} -> sharable proc + # Ractor.shareable_proc{} -> shareable proc # - # Same as Ractor.sharable_proc, but returns lambda proc. + # Same as Ractor.shareable_proc, but returns lambda proc. # def self.shareable_lambda self: nil Primitive.attr! :use_block diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index 98e95b98af..78a5638647 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -1544,7 +1544,7 @@ x = __ENCODING__ end def test_shareable_constant_value_simple - obj = [['unsharable_value']] + obj = [['unshareable_value']] a, b, c = eval_separately("#{<<~"begin;"}\n#{<<~'end;'}") begin; # shareable_constant_value: experimental_everything |
