summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorayumin <ayumin@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-03 07:01:15 +0000
committerayumin <ayumin@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-01-03 07:01:15 +0000
commit966d1f8962e8c00c8c85c4f2be9ecbb83a55b2f1 (patch)
treec12eb4d77ea6e7dd6d8b5d60aa558fbd0a57fd72 /thread.c
parent9ecd19a7f841bf3c8b94507b295ac2e6207510ad (diff)
* thread.c: changed documentation for "thread-local" variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/thread.c b/thread.c
index f52efec829..d356cb5b36 100644
--- a/thread.c
+++ b/thread.c
@@ -2058,9 +2058,9 @@ rb_thread_local_aref(VALUE thread, ID id)
* call-seq:
* thr[sym] -> obj or nil
*
- * Attribute Reference---Returns the value of a thread-local variable, using
- * either a symbol or a string name. If the specified variable does not exist,
- * returns <code>nil</code>.
+ * Attribute Reference---Returns the value of a fiber-local variable (current thread's root fiber
+ * if not explicitely inside a Fiber), using either a symbol or a string name.
+ * If the specified variable does not exist, returns <code>nil</code>.
*
* [
* Thread.new { Thread.current["name"] = "A" },
@@ -2111,7 +2111,7 @@ rb_thread_local_aset(VALUE thread, ID id, VALUE val)
* call-seq:
* thr[sym] = obj -> obj
*
- * Attribute Assignment---Sets or creates the value of a thread-local variable,
+ * Attribute Assignment---Sets or creates the value of a fiber-local variable,
* using either a symbol or a string. See also <code>Thread#[]</code>.
*/
@@ -2126,7 +2126,7 @@ rb_thread_aset(VALUE self, VALUE id, VALUE val)
* thr.key?(sym) -> true or false
*
* Returns <code>true</code> if the given string (or symbol) exists as a
- * thread-local variable.
+ * fiber-local variable.
*
* me = Thread.current
* me[:oliver] = "a"
@@ -2179,7 +2179,7 @@ rb_thread_alone(void)
* call-seq:
* thr.keys -> array
*
- * Returns an an array of the names of the thread-local variables (as Symbols).
+ * Returns an an array of the names of the fiber-local variables (as Symbols).
*
* thr = Thread.new do
* Thread.current[:cat] = 'meow'