mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Make method id explicit in rb_exec_recursive_outer
Previously, because opt_aref and opt_aset don't push a frame, when they would call rb_hash to determine the hash value of the key, the initial level of recursion would incorrectly use the method id at the top of the stack instead of "hash". This commit replaces rb_exec_recursive_outer with rb_exec_recursive_outer_mid, which takes an explicit method id, so that we can make the hash calculation behave consistently. rb_exec_recursive_outer was documented as being internal, so I believe this should be okay to change.
This commit is contained in:
parent
f4747958e5
commit
52da90acee
Notes:
git
2022-06-11 06:48:42 +09:00
5 changed files with 27 additions and 5 deletions
|
|
@ -16,7 +16,7 @@ exec_recursive(VALUE self, VALUE mid)
|
|||
static VALUE
|
||||
exec_recursive_outer(VALUE self, VALUE mid)
|
||||
{
|
||||
return rb_exec_recursive_outer(recursive_i, self, mid);
|
||||
return rb_exec_recursive_outer_mid(recursive_i, self, mid, rb_intern("exec_recursive_outer"));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue