mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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/trunk@29136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b9432e7630
commit
e6f86c982f
3 changed files with 14 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Sun Aug 29 13:22:43 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* vm.c (rb_thread_method_id_and_class): curried proc has no
|
||||||
|
method. [ruby-core:31871]
|
||||||
|
|
||||||
Sun Aug 29 12:51:33 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sun Aug 29 12:51:33 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* load.c (rb_provide_feature): clarify error message for frozen
|
* load.c (rb_provide_feature): clarify error message for frozen
|
||||||
|
|
|
@ -792,4 +792,12 @@ class TestProc < Test::Unit::TestCase
|
||||||
assert_equal([obj, nil], [a, b], '[ruby-core:24139]')
|
assert_equal([obj, nil], [a, b], '[ruby-core:24139]')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_curry_with_trace
|
||||||
|
bug3751 = '[ruby-core:31871]'
|
||||||
|
set_trace_func(proc {})
|
||||||
|
test_curry
|
||||||
|
ensure
|
||||||
|
set_trace_func(nil)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
2
vm.c
2
vm.c
|
@ -1394,7 +1394,7 @@ rb_thread_method_id_and_class(rb_thread_t *th,
|
||||||
{
|
{
|
||||||
rb_control_frame_t *cfp = th->cfp;
|
rb_control_frame_t *cfp = th->cfp;
|
||||||
rb_iseq_t *iseq = cfp->iseq;
|
rb_iseq_t *iseq = cfp->iseq;
|
||||||
if (!iseq) {
|
if (!iseq && cfp->me) {
|
||||||
if (idp) *idp = cfp->me->def->original_id;
|
if (idp) *idp = cfp->me->def->original_id;
|
||||||
if (klassp) *klassp = cfp->me->klass;
|
if (klassp) *klassp = cfp->me->klass;
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in a new issue