mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Ensure shape_id is never used on T_IMEMO
It doesn't make sense to set ivars or anything shape related on a T_IMEMO. Co-Authored-By: John Hawthorn <john@hawthorn.email>
This commit is contained in:
parent
ed632cd0ba
commit
60ffb714d2
Notes:
git
2025-05-15 14:07:06 +00:00
5 changed files with 23 additions and 6 deletions
6
eval.c
6
eval.c
|
@ -529,10 +529,14 @@ exc_setup_message(const rb_execution_context_t *ec, VALUE mesg, VALUE *cause)
|
|||
rb_exc_check_circular_cause(*cause);
|
||||
#else
|
||||
VALUE c = *cause;
|
||||
while (!NIL_P(c = rb_attr_get(c, id_cause))) {
|
||||
while (!NIL_P(c)) {
|
||||
if (c == mesg) {
|
||||
rb_raise(rb_eArgError, "circular causes");
|
||||
}
|
||||
if (THROW_DATA_P(c)) {
|
||||
break;
|
||||
}
|
||||
c = rb_attr_get(c, id_cause);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue