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

ruby-changes:30268

From: drbrain <ko1@a...>
Date: Fri, 2 Aug 2013 09:15:10 +0900 (JST)
Subject: [ruby-changes:30268] drbrain:r42320 (trunk): * doc/syntax/refinements.rdoc: Improve description of where you may

drbrain	2013-08-02 09:14:58 +0900 (Fri, 02 Aug 2013)

  New Revision: 42320

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42320

  Log:
    * doc/syntax/refinements.rdoc:  Improve description of where you may
      activate refinements.

  Modified files:
    trunk/ChangeLog
    trunk/doc/syntax/refinements.rdoc

Index: doc/syntax/refinements.rdoc
===================================================================
--- doc/syntax/refinements.rdoc	(revision 42319)
+++ doc/syntax/refinements.rdoc	(revision 42320)
@@ -48,9 +48,11 @@ Activate the refinement with #using: https://github.com/ruby/ruby/blob/trunk/doc/syntax/refinements.rdoc#L48
 
 == Scope
 
-You may activate refinements at top-level to the end of the file or in a
-string passed to Kernel#eval, Kernel#instance_eval or Kernel#module_eval until
-the end of the string.
+You may only activate refinements at top-level, not inside any class, module
+or method scope.  You may activate refinements in a string passed to
+Kernel#eval, Kernel#instance_eval or Kernel#module_eval that is evaluated at
+top-level.  Refinements are active until the end of the file or the end of the
+eval string, respectively.
 
 Refinements are lexical in scope.  When control is transferred outside the
 scope the refinement is deactivated.  This means that if you require or load a
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 42319)
+++ ChangeLog	(revision 42320)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Aug  2 09:14:47 2013  Eric Hodel  <drbrain@s...>
+
+	* doc/syntax/refinements.rdoc:  Improve description of where you may
+	  activate refinements.
+
 Fri Aug  2 07:45:55 2013  Tanaka Akira  <akr@f...>
 
 	* bignum.c (big2str_orig): Remove len argument.

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

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