diff options
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1858,7 +1858,10 @@ vm_define_method(rb_thread_t *th, VALUE obj, ID id, VALUE iseqval, rb_id2name(id), rb_obj_classname(obj)); } - rb_check_frozen(obj); + if (OBJ_FROZEN(obj)) { + rb_error_frozen("object"); + } + klass = rb_singleton_class(obj); noex = NOEX_PUBLIC; } |