summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorUse amazing-print instead <git@caulfield.me>2021-02-09 12:53:51 +0000
committerMarc-André Lafortune <github@marc-andre.ca>2021-02-09 08:22:37 -0500
commite7a831de8e1f38c2e25ae1610db5f3f62265176b (patch)
tree18c7cbf9b1ae659f96aaa7ca3bc556e4424cf5b6 /doc
parent6bb103f01263583bcbe4baa8bdd380f08c46f70e (diff)
Improve the wording surrounding `Proc#isolate`
This change moves the statement that `Proc#isolate` isn't yet exposed for Ruby users to the first time the method is mentioned. This is so that readers don't waste time trying to look it up in Ruby docs. There was also unnecessary duplication: ``` Paragraph 1: "Given block will be isolated from outer scope by Proc#isolate." Paragraph 2: "Given block will be isolated by Proc#isolate method" ``` So I combined the two sentences and slightly improved the wording for clarity.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4161
Diffstat (limited to 'doc')
-rw-r--r--doc/ractor.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/ractor.md b/doc/ractor.md
index 0b39783b5d..33aa3dfdf0 100644
--- a/doc/ractor.md
+++ b/doc/ractor.md
@@ -95,9 +95,9 @@ r.name #=> 'test-name'
### Given block isolation
The Ractor executes given `expr` in a given block.
-Given block will be isolated from outer scope by `Proc#isolate`. To prevent sharing unshareable objects between ractors, block outer-variables, `self` and other information are isolated.
+Given block will be isolated from outer scope by the `Proc#isolate` method (not exposed yet for Ruby users). To prevent sharing unshareable objects between ractors, block outer-variables, `self` and other information are isolated.
-Given block will be isolated by `Proc#isolate` method (not exposed yet for Ruby users). `Proc#isolate` is called at Ractor creation timing (`Ractor.new` is called). If given Proc object is not able to isolate because of outer variables and so on, an error will be raised.
+`Proc#isolate` is called at Ractor creation time (when `Ractor.new` is called). If given Proc object is not able to isolate because of outer variables and so on, an error will be raised.
```ruby
begin