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

ruby-changes:12015

From: nobu <ko1@a...>
Date: Sat, 13 Jun 2009 15:04:00 +0900 (JST)
Subject: [ruby-changes:12015] Ruby:r23681 (trunk): * load.c (load_lock): show backtrace at circular require.

nobu	2009-06-13 15:03:44 +0900 (Sat, 13 Jun 2009)

  New Revision: 23681

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

  Log:
    * load.c (load_lock): show backtrace at circular require.

  Modified files:
    trunk/ChangeLog
    trunk/load.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 23680)
+++ ChangeLog	(revision 23681)
@@ -1,5 +1,7 @@
-Sat Jun 13 15:00:41 2009  Nobuyoshi Nakada  <nobu@r...>
+Sat Jun 13 15:03:41 2009  Nobuyoshi Nakada  <nobu@r...>
 
+	* load.c (load_lock): show backtrace at circular require.
+
 	* load.c (rb_provide): assumes us-ascii only.
 
 	* load.c (rb_require_safe): FilePathValue() implies rb_str_new4().
Index: load.c
===================================================================
--- load.c	(revision 23680)
+++ load.c	(revision 23681)
@@ -379,7 +379,10 @@
 	st_insert(loading_tbl, (st_data_t)ftptr, data);
 	return (char *)ftptr;
     }
-    rb_warning("loading in progress, circular require considered harmful - %s", ftptr);
+    if (RTEST(ruby_verbose)) {
+	rb_warning("loading in progress, circular require considered harmful - %s", ftptr);
+	rb_backtrace();
+    }
     return RTEST(rb_barrier_wait((VALUE)data)) ? (char *)ftptr : 0;
 }
 

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

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