mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
don't allow setting class variable on module that's frozen [Bug #19341]
This commit is contained in:
parent
bf3940a306
commit
f66804e6f7
Notes:
git
2023-01-19 21:25:41 +00:00
2 changed files with 16 additions and 0 deletions
|
@ -3939,6 +3939,7 @@ rb_class_ivar_set(VALUE obj, ID key, VALUE value)
|
|||
{
|
||||
RUBY_ASSERT(RB_TYPE_P(obj, T_CLASS) || RB_TYPE_P(obj, T_MODULE));
|
||||
int found;
|
||||
rb_check_frozen(obj);
|
||||
|
||||
RB_VM_LOCK_ENTER();
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue