From: "mame (Yusuke Endoh)" Date: 2012-11-24T18:17:14+09:00 Subject: [ruby-core:50031] [ruby-trunk - Bug #7406][Assigned] English.rb says that $_ is thread-local, but it is frame-local Issue #7406 has been updated by mame (Yusuke Endoh). Status changed from Open to Assigned Assignee set to mame (Yusuke Endoh) Target version set to 2.0.0 I think that "scope-local" normally implies "thread-local". If you think it is confusing, I'll delete the comments, unless there is objection. diff --git a/lib/English.rb b/lib/English.rb index 4fd53c5..44baf17 100644 --- a/lib/English.rb +++ b/lib/English.rb @@ -119,7 +119,7 @@ alias $CHILD_STATUS $? # and $1 to $9 are all derived from # $~. Assigning to $~ changes the values of these # derived variables. This variable is local to the current -# scope. Thread local. +# scope. alias $LAST_MATCH_INFO $~ # If set to any value apart from +nil+ or +false+, all pattern matches @@ -135,21 +135,21 @@ alias $ARGV $* # The string matched by the last successful pattern # match. This variable is local to the current -# scope. Read only. Thread local. +# scope. Read only. alias $MATCH $& # The string preceding the match in the last # successful pattern match. This variable is local to -# the current scope. Read only. Thread local. +# the current scope. Read only. alias $PREMATCH $` # The string following the match in the last # successful pattern match. This variable is local to -# the current scope. Read only. Thread local. +# the current scope. Read only. alias $POSTMATCH $' # The contents of the highest-numbered group matched in the last # successful pattern match. Thus, in "cat" =~ /(c|a)(t|z)/, # $+ will be set to "t". This variable is local to the -# current scope. Read only. Thread local. +# current scope. Read only. alias $LAST_PAREN_MATCH $+ -- Yusuke Endoh ---------------------------------------- Bug #7406: English.rb says that $_ is thread-local, but it is frame-local https://bugs.ruby-lang.org/issues/7406#change-33805 Author: headius (Charles Nutter) Status: Assigned Priority: Normal Assignee: mame (Yusuke Endoh) Category: Target version: 2.0.0 ruby -v: 2.0.0preview1 system ~/projects/jruby/gist-4110634 $ jirb irb(main):001:0> $_ = 'foo' => "foo" irb(main):002:0> def blah; p $_; end => nil irb(main):003:0> p $_ "foo" => "foo" irb(main):004:0> blah nil => nil Not thread-local. -- http://bugs.ruby-lang.org/