[前][次][番号順一覧][スレッド一覧]

ruby-changes:65207

From: Use <ko1@a...>
Date: Tue, 9 Feb 2021 22:23:05 +0900 (JST)
Subject: [ruby-changes:65207] e7a831de8e (master): Improve the wording surrounding `Proc#isolate`

https://git.ruby-lang.org/ruby.git/commit/?id=e7a831de8e

From e7a831de8e1f38c2e25ae1610db5f3f62265176b Mon Sep 17 00:00:00 2001
From: Use amazing-print instead <git@c...>
Date: Tue, 9 Feb 2021 12:53:51 +0000
Subject: 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.
---
 doc/ractor.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/ractor.md b/doc/ractor.md
index 0b39783..33aa3df 100644
--- a/doc/ractor.md
+++ b/doc/ractor.md
@@ -95,9 +95,9 @@ r.name #=> 'test-name' https://github.com/ruby/ruby/blob/trunk/doc/ractor.md#L95
 ### 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
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]