mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
thread.c, vm_method.c: avoid inadvertent pin-down
* thread.c (rb_thread_variable_set): get rid of inadvertent dynamic symbol pin-down. * vm_method.c (obj_respond_to): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6db9db48ad
commit
00b040b8d5
2 changed files with 2 additions and 2 deletions
2
thread.c
2
thread.c
|
@ -2928,7 +2928,7 @@ rb_thread_variable_set(VALUE thread, VALUE id, VALUE val)
|
|||
}
|
||||
|
||||
locals = rb_ivar_get(thread, id_locals);
|
||||
return rb_hash_aset(locals, ID2SYM(rb_to_id(id)), val);
|
||||
return rb_hash_aset(locals, rb_to_symbol(id), val);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1694,7 +1694,7 @@ obj_respond_to(int argc, VALUE *argv, VALUE obj)
|
|||
if (!(id = rb_check_id(&mid))) {
|
||||
if (!rb_method_basic_definition_p(CLASS_OF(obj), idRespond_to_missing)) {
|
||||
VALUE args[2];
|
||||
args[0] = ID2SYM(rb_to_id(mid));
|
||||
args[0] = rb_to_symbol(mid);
|
||||
args[1] = priv;
|
||||
return rb_funcall2(obj, idRespond_to_missing, 2, args);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue