mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
6cfcb9d936
commit
7d73136d06
2 changed files with 6 additions and 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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue