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

ruby-changes:35869

From: nobu <ko1@a...>
Date: Wed, 15 Oct 2014 23:38:11 +0900 (JST)
Subject: [ruby-changes:35869] nobu:r47951 (trunk): vm_backtrace.c: fix unknown ID name

nobu	2014-10-15 23:37:54 +0900 (Wed, 15 Oct 2014)

  New Revision: 47951

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

  Log:
    vm_backtrace.c: fix unknown ID name
    
    * vm_backtrace.c (id2str): adapt rb_id2str which returns 0 on
      unknown ID to return Qnil, since oldbt_arg functions expect Qnil
      on unknown method names.

  Modified files:
    trunk/vm_backtrace.c
Index: vm_backtrace.c
===================================================================
--- vm_backtrace.c	(revision 47950)
+++ vm_backtrace.c	(revision 47951)
@@ -23,6 +23,15 @@ static VALUE rb_cBacktraceLocation; https://github.com/ruby/ruby/blob/trunk/vm_backtrace.c#L23
 
 extern VALUE ruby_engine_name;
 
+static VALUE
+id2str(ID id)
+{
+    VALUE str = rb_id2str(id);
+    if (!id) return Qnil;
+    return str;
+}
+#define rb_id2str(id) id2str(id)
+
 inline static int
 calc_lineno(const rb_iseq_t *iseq, const VALUE *pc)
 {

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

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