Project

General

Profile

Actions

Feature #11208

closed

[PATCH] variable.c: remove generic ivar support for special constants

Added by normalperson (Eric Wong) almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:69441]

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

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.

Actions #3

Updated by Anonymous almost 9 years ago

  • Status changed from Open to Closed

Applied in changeset r50759.


ChangeLog: add missing reference

[ruby-core:69441] [Feature #11208]

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0