ruby-changes:22149
From: ayumin <ko1@a...>
Date: Tue, 3 Jan 2012 16:01:25 +0900 (JST)
Subject: [ruby-changes:22149] ayumin:r34198 (trunk): * thread.c: changed documentation for "thread-local" variables.
ayumin 2012-01-03 16:01:15 +0900 (Tue, 03 Jan 2012) New Revision: 34198 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34198 Log: * thread.c: changed documentation for "thread-local" variables. Modified files: trunk/ChangeLog trunk/thread.c Index: ChangeLog =================================================================== --- ChangeLog (revision 34197) +++ ChangeLog (revision 34198) @@ -1,3 +1,8 @@ +Tue Jan 03 15:58:22 2012 Ayumu AIZAWA <ayumu.aizawa@g...> + + * thread.c: changed documentation for "thread-local" variables. + patch from Julien Ammous. + Tue Jan 03 15:50:12 2012 Ayumu AIZAWA <ayumu.aizawa@g...> * process.c: Fix typo. patch from Aviv Ben-Yosef. Index: thread.c =================================================================== --- thread.c (revision 34197) +++ thread.c (revision 34198) @@ -2058,9 +2058,9 @@ * 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 @@ * 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 @@ * 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 @@ * 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' -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/