From 03a284b8bdd3d4dbf9c6b0bc2cabd047148c8038 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 20 Jan 2010 23:45:05 +0000 Subject: [PATCH] * iseq.c (iseq_s_disasm): check for proc first. based on the patch by Roger Pack in [ruby-core:27626]. [ruby-core:27227] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ iseq.c | 8 ++++---- version.h | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index fa3af8173a..6054e15733 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Jan 21 08:45:03 2010 Nobuyoshi Nakada + + * iseq.c (iseq_s_disasm): check for proc first. based on the + patch by Roger Pack in [ruby-core:27626]. [ruby-core:27227] + Wed Jan 20 16:09:59 2010 URABE Shyouhei * common.mk (compile.$(OBJEXT)): dependencies lacking. diff --git a/iseq.c b/iseq.c index 7a59fce049..3c957c7692 100644 --- a/iseq.c +++ b/iseq.c @@ -1012,10 +1012,7 @@ iseq_s_disasm(VALUE klass, VALUE body) rb_secure(1); - if ((iseq = rb_method_get_iseq(body)) != 0) { - ret = rb_iseq_disasm(iseq->self); - } - else if (rb_obj_is_proc(body)) { + if (rb_obj_is_proc(body)) { rb_proc_t *proc; VALUE iseqval; GetProcPtr(body, proc); @@ -1024,6 +1021,9 @@ iseq_s_disasm(VALUE klass, VALUE body) ret = rb_iseq_disasm(iseqval); } } + else if ((iseq = rb_method_get_iseq(body)) != 0) { + ret = rb_iseq_disasm(iseq->self); + } return ret; } diff --git a/version.h b/version.h index 0c552c36f4..7861703fec 100644 --- a/version.h +++ b/version.h @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_RELEASE_DATE "2010-01-20" +#define RUBY_RELEASE_DATE "2010-01-21" #define RUBY_PATCHLEVEL -1 #define RUBY_BRANCH_NAME "trunk" @@ -8,7 +8,7 @@ #define RUBY_VERSION_TEENY 1 #define RUBY_RELEASE_YEAR 2010 #define RUBY_RELEASE_MONTH 1 -#define RUBY_RELEASE_DAY 20 +#define RUBY_RELEASE_DAY 21 #include "ruby/version.h"