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

ruby-changes:22709

From: drbrain <ko1@a...>
Date: Thu, 23 Feb 2012 10:58:11 +0900 (JST)
Subject: [ruby-changes:22709] drbrain:r34758 (trunk): * load.c (rb_f_require): Add note to require for scope of items in the

drbrain	2012-02-23 10:58:01 +0900 (Thu, 23 Feb 2012)

  New Revision: 34758

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

  Log:
    * load.c (rb_f_require):  Add note to require for scope of items in the
      loaded file.  [ruby-trunk - #5910]

  Modified files:
    trunk/ChangeLog
    trunk/load.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 34757)
+++ ChangeLog	(revision 34758)
@@ -1,3 +1,8 @@
+Thu Feb 23 09:57:21 2012  Eric Hodel  <drbrain@s...>
+
+	* load.c (rb_f_require):  Add note to require for scope of items in the
+	  loaded file.  [ruby-trunk - #5910]
+
 Thu Feb 23 03:58:08 2012  Marc-Andre Lafortune  <ruby-core@m...>
 
 	* lib/ostruct.rb (delete_field): Bug fix so previous value is
Index: load.c
===================================================================
--- load.c	(revision 34757)
+++ load.c	(revision 34758)
@@ -469,6 +469,11 @@
  *
  *    require "my-library.rb"
  *    require "db-driver"
+ *
+ *  Any constants or globals within the loaded source file will be available
+ *  in the calling program's global namespace. However, local variables will
+ *  not be propagated to the loading environment.
+ *
  */
 
 VALUE

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

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