Feature #11208
closed[PATCH] variable.c: remove generic ivar support for special constants
Description
variable.c: remove generic ivar support for special constants
Special constants are all frozen since [Feature #8923] and cannot
support ivars. Remove some unused code we had for supporting them.
Can somebody please sanity check this for me? Maybe I missed something,
but if not, I'll commit in a few days...
Files
Updated by ko1 (Koichi Sasada) almost 9 years ago
Good patch.
Before generic_ivar_set(), frozen check is already done.
So the following check should be redundant.
if (rb_obj_frozen_p(obj)) rb_error_frozen("object");
It should be just
if (rb_special_const_p(obj)) rb_bug("...");
Updated by normalperson (Eric Wong) almost 9 years ago
ko1@atdot.net wrote:
So the following check should be redundant.
if (rb_obj_frozen_p(obj)) rb_error_frozen("object");
It should be just
if (rb_special_const_p(obj)) rb_bug("...");
I will rely on rb_check_frozen and add new tests:
http://80x24.org/spew/m/e66c803892085c843b84cc6f35d4d96c83556dc1.txt
I'll squash that onto my previous commit when I commit.
Updated by Anonymous almost 9 years ago
- Status changed from Open to Closed