diff options
author | wanabe <wanabe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-09 22:38:46 +0000 |
---|---|---|
committer | wanabe <wanabe@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-09 22:38:46 +0000 |
commit | 7d73136d066eca26c8d9fdd1afe8a826dadd270c (patch) | |
tree | c44636c839bca9fe9906322b4bc66287d2f067f9 | |
parent | 6cfcb9d936af87b8ebfad23541e13af2cf6c95ef (diff) |
* vm_method.c (rb_add_method): clear attr.location before rb_ary_new3.
a patch from Masaya TARUI in [Bug #3108]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | vm_method.c | 3 |
2 files changed, 6 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Sat Apr 10 07:36:13 2010 wanabe <s.wanabe@gmail.com> + + * vm_method.c (rb_add_method): clear attr.location before rb_ary_new3. + a patch from Masaya TARUI in [Bug #3108] + Sat Apr 10 05:27:26 2010 Aaron Patterson <aaron@tenderlovemaking.com> * ext/psych/lib/psych/deprecated.rb: implementing Psych.quick_emit and diff --git a/vm_method.c b/vm_method.c index cccd02c088..027042b79c 100644 --- a/vm_method.c +++ b/vm_method.c @@ -280,13 +280,12 @@ rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *opts, rb_method_ case VM_METHOD_TYPE_ATTRSET: case VM_METHOD_TYPE_IVAR: def->body.attr.id = (ID)opts; + def->body.attr.location = Qfalse; th = GET_THREAD(); cfp = rb_vm_get_ruby_level_next_cfp(th, th->cfp); if (cfp && (line = rb_vm_get_sourceline(cfp))) { VALUE location = rb_ary_new3(2, cfp->iseq->filename, INT2FIX(line)); def->body.attr.location = rb_ary_freeze(location); - } else { - def->body.attr.location = Qfalse; } break; case VM_METHOD_TYPE_BMETHOD: |