From 37309d99a72fe18a6383658fe3898ed2e2295076 Mon Sep 17 00:00:00 2001 From: yugui Date: Thu, 2 Dec 2010 08:05:28 +0000 Subject: [PATCH] merges r29136 from trunk into ruby_1_9_2. -- * vm.c (rb_thread_method_id_and_class): curried proc has no method. [ruby-core:31871] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ test/ruby/test_proc.rb | 8 ++++++++ version.h | 2 +- vm.c | 2 +- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f8d688fa98..10349a548e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Aug 29 13:22:43 2010 Nobuyoshi Nakada + + * vm.c (rb_thread_method_id_and_class): curried proc has no + method. [ruby-core:31871] + Fri Sep 24 23:44:59 2010 Nobuyoshi Nakada * string.c (sym_call), vm.c (invoke_block_from_c), diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb index 4a1eee3926..efd5a269fd 100644 --- a/test/ruby/test_proc.rb +++ b/test/ruby/test_proc.rb @@ -793,6 +793,14 @@ class TestProc < Test::Unit::TestCase end end + def test_curry_with_trace + bug3751 = '[ruby-core:31871]' + set_trace_func(proc {}) + test_curry + ensure + set_trace_func(nil) + end + def test_block_propagation bug3792 = '[ruby-core:32075]' c = Class.new do diff --git a/version.h b/version.h index 5273dc876d..d492f33902 100644 --- a/version.h +++ b/version.h @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_PATCHLEVEL 54 +#define RUBY_PATCHLEVEL 55 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 diff --git a/vm.c b/vm.c index 8938df9d51..e235314b99 100644 --- a/vm.c +++ b/vm.c @@ -1396,7 +1396,7 @@ rb_thread_method_id_and_class(rb_thread_t *th, { rb_control_frame_t *cfp = th->cfp; rb_iseq_t *iseq = cfp->iseq; - if (!iseq) { + if (!iseq && cfp->me) { if (idp) *idp = cfp->me->def->original_id; if (klassp) *klassp = cfp->me->klass; return 1;