* error.c (rb_name_err_mesg_new): guard mesg, recv and method.
The problem in [ruby-dev:41464] is caused because mesg is collected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8bca09325d
commit
d81b2491f7
@ -1,3 +1,8 @@
|
||||
Sat Jun 5 11:00:48 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* error.c (rb_name_err_mesg_new): guard mesg, recv and method.
|
||||
The problem in [ruby-dev:41464] is caused because mesg is collected.
|
||||
|
||||
Sat Jun 5 10:03:31 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* .gdbinit (rp): detect and show RTypedData.
|
||||
|
7
error.c
7
error.c
@ -825,11 +825,16 @@ VALUE
|
||||
rb_name_err_mesg_new(VALUE obj, VALUE mesg, VALUE recv, VALUE method)
|
||||
{
|
||||
VALUE *ptr = ALLOC_N(VALUE, NAME_ERR_MESG_COUNT);
|
||||
VALUE result;
|
||||
|
||||
ptr[0] = mesg;
|
||||
ptr[1] = recv;
|
||||
ptr[2] = method;
|
||||
return TypedData_Wrap_Struct(rb_cNameErrorMesg, &name_err_mesg_data_type, ptr);
|
||||
result = TypedData_Wrap_Struct(rb_cNameErrorMesg, &name_err_mesg_data_type, ptr);
|
||||
RB_GC_GUARD(mesg);
|
||||
RB_GC_GUARD(recv);
|
||||
RB_GC_GUARD(method);
|
||||
return result;
|
||||
}
|
||||
|
||||
/* :nodoc: */
|
||||
|
Loading…
x
Reference in New Issue
Block a user