Skip to content

Commit 2aaea66

Browse files
committed
fix typo s/sharable/shareable/
1 parent 5062c0c commit 2aaea66

7 files changed

Lines changed: 12 additions & 12 deletions

File tree

bootstraptest/test_ractor.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,9 +1203,9 @@ def /(other)
12031203
end
12041204
}
12051205

1206-
# Ractor.make_sharable(Method/UnboundMethod)
1206+
# Ractor.make_shareable(Method/UnboundMethod)
12071207
assert_equal 'true', %q{
1208-
# raise because receiver is unsharable
1208+
# raise because receiver is unshareable
12091209
begin
12101210
_m0 = Ractor.make_shareable(self.method(:__id__))
12111211
rescue => e
@@ -1214,7 +1214,7 @@ def /(other)
12141214
raise "no error"
12151215
end
12161216
1217-
# Method with sharable receiver
1217+
# Method with shareable receiver
12181218
M1 = Ractor.make_shareable(Object.method(:__id__))
12191219
12201220
# UnboundMethod

doc/syntax/comments.rdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ In this mode, all values assigned to constants are made shareable.
170170

171171
# shareable_constant_value: experimental_everything
172172
FOO = Set[1, 2, {foo: []}]
173-
# same as FOO = Ractor.make_sharable(...)
173+
# same as FOO = Ractor.make_shareable(...)
174174
# OR same as `FOO = Set[1, 2, {foo: [].freeze}.freeze].freeze`
175175

176176
var = [{foo: []}]

include/ruby/internal/core/rtypeddata.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ rbimpl_typeddata_flags {
160160
// experimental flag
161161
// Similar to RUBY_TYPED_FROZEN_SHAREABLE, but doesn't make shareable
162162
// reachable objects from this T_DATA object on the Ractor.make_shareable.
163-
// If it refers to unsharable objects, simply raise an error.
163+
// If it refers to unshareable objects, simply raise an error.
164164
// RUBY_TYPED_FROZEN_SHAREABLE_NO_REC = RUBY_FL_FINALIZE,
165165

166166
/**

include/ruby/ractor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ VALUE rb_ractor_make_shareable(VALUE obj);
217217
*
218218
* @param[in] obj Arbitrary ruby object to duplicate.
219219
* @exception rb_eRactorError Ractors cannot share `obj` by nature.
220-
* @return A deep copy of `obj` which is sharable among Ractors.
220+
* @return A deep copy of `obj` which is shareable among Ractors.
221221
*/
222222
VALUE rb_ractor_make_shareable_copy(VALUE obj);
223223

ractor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2366,7 +2366,7 @@ ractor_local_value_store_if_absent(rb_execution_context_t *ec, VALUE self, VALUE
23662366
return rb_mutex_synchronize(cr->local_storage_store_lock, ractor_local_value_store_i, (VALUE)&data);
23672367
}
23682368

2369-
// sharable_proc
2369+
// shareable_proc
23702370

23712371
static VALUE
23722372
ractor_shareable_proc(rb_execution_context_t *ec, VALUE replace_self, bool is_lambda)

ractor.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ def unmonitor port
607607

608608
#
609609
# call-seq:
610-
# Ractor.sharable_proc(self: nil){} -> sharable proc
610+
# Ractor.shareable_proc(self: nil){} -> shareable proc
611611
#
612612
# It returns shareable Proc object. The Proc object is
613613
# shareable and the self in a block will be replaced with
@@ -619,7 +619,7 @@ def unmonitor port
619619
# Ractor.shareable_proc{ p a }
620620
# #=> can not isolate a Proc because it accesses outer variables (a). (ArgumentError)
621621
#
622-
# The `self` should be a sharable object
622+
# The `self` should be a shareable object
623623
#
624624
# Ractor.shareable_proc(self: self){}
625625
# #=> self should be shareable: main (Ractor::IsolationError)
@@ -634,9 +634,9 @@ def self.shareable_proc self: nil
634634

635635
#
636636
# call-seq:
637-
# Ractor.sharable_proc{} -> sharable proc
637+
# Ractor.shareable_proc{} -> shareable proc
638638
#
639-
# Same as Ractor.sharable_proc, but returns lambda proc.
639+
# Same as Ractor.shareable_proc, but returns lambda proc.
640640
#
641641
def self.shareable_lambda self: nil
642642
Primitive.attr! :use_block

test/ruby/test_parse.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1544,7 +1544,7 @@ def test_shareable_constant_value_ignored
15441544
end
15451545

15461546
def test_shareable_constant_value_simple
1547-
obj = [['unsharable_value']]
1547+
obj = [['unshareable_value']]
15481548
a, b, c = eval_separately("#{<<~"begin;"}\n#{<<~'end;'}")
15491549
begin;
15501550
# shareable_constant_value: experimental_everything

0 commit comments

Comments
 (0)