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

ruby-changes:10391

From: nobu <ko1@a...>
Date: Mon, 2 Feb 2009 09:49:52 +0900 (JST)
Subject: [ruby-changes:10391] Ruby:r21935 (trunk): * vm.c (vm_backtrace_each): progname is not available at

nobu	2009-02-02 09:49:40 +0900 (Mon, 02 Feb 2009)

  New Revision: 21935

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

  Log:
    * vm.c (vm_backtrace_each): progname is not available at
      initializing phase.

  Modified files:
    trunk/ChangeLog
    trunk/vm.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 21934)
+++ ChangeLog	(revision 21935)
@@ -1,3 +1,8 @@
+Mon Feb  2 09:49:39 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* vm.c (vm_backtrace_each): progname is not available at
+	  initializing phase.
+
 Mon Feb  2 08:12:50 2009  Nobuyoshi Nakada  <nobu@r...>
 
 	* lib/xmlrpc/server.rb (Server#serve): gets rid of hardcoded
Index: vm.c
===================================================================
--- vm.c	(revision 21934)
+++ vm.c	(revision 21935)
@@ -692,7 +692,7 @@
 {
     const rb_control_frame_t *limit_cfp = th->cfp;
     const rb_control_frame_t *cfp = (void *)(th->stack + th->stack_size);
-    const char *file;
+    const char *file = "ruby";
     int line_no = 0;
 
     cfp -= 2;
@@ -702,7 +702,7 @@
 	}
     }
     limit_cfp = RUBY_VM_NEXT_CONTROL_FRAME(limit_cfp);
-    file = RSTRING_PTR(th->vm->progname);
+    if (th->vm->progname) file = RSTRING_PTR(th->vm->progname);
     while (cfp > limit_cfp) {
 	if (cfp->iseq != 0) {
 	    if (cfp->pc != 0) {

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

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