From 0f408e10bab2a3831560beedb4e4424869330d88 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 7 Oct 2009 16:23:20 +0000 Subject: [PATCH] * iseq.c (iseq_s_disasm): accept proc objects. [ruby-core:18762] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ iseq.c | 9 +++++++++ version.h | 4 ++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c7b66e47c7..03d98e2ab8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Oct 8 01:23:18 2009 Nobuyoshi Nakada + + * iseq.c (iseq_s_disasm): accept proc objects. [ruby-core:18762] + Wed Oct 7 16:42:28 2009 Nobuyoshi Nakada * marshal.c (mark_dump_arg, mark_load_arg): ignore already cleaned diff --git a/iseq.c b/iseq.c index a14f374687..72f7f0c7bb 100644 --- a/iseq.c +++ b/iseq.c @@ -1011,6 +1011,15 @@ iseq_s_disasm(VALUE klass, VALUE body) if ((iseq = rb_method_get_iseq(body)) != 0) { ret = rb_iseq_disasm(iseq->self); } + else { + rb_proc_t *proc; + VALUE iseqval; + GetProcPtr(body, proc); + iseqval = proc->block.iseq->self; + if (RUBY_VM_NORMAL_ISEQ_P(iseqval)) { + ret = rb_iseq_disasm(iseqval); + } + } return ret; } diff --git a/version.h b/version.h index 03d7a93b42..20a3e53df4 100644 --- a/version.h +++ b/version.h @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_RELEASE_DATE "2009-10-07" +#define RUBY_RELEASE_DATE "2009-10-08" #define RUBY_PATCHLEVEL -1 #define RUBY_BRANCH_NAME "trunk" @@ -8,7 +8,7 @@ #define RUBY_VERSION_TEENY 1 #define RUBY_RELEASE_YEAR 2009 #define RUBY_RELEASE_MONTH 10 -#define RUBY_RELEASE_DAY 7 +#define RUBY_RELEASE_DAY 8 #include "ruby/version.h"