Project

General

Profile

Feature #11208

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

Added by normalperson (Eric Wong) about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
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

Associated revisions

Revision 99487313
Added by normal about 4 years ago

ChangeLog: add missing reference

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 50759
Added by normalperson (Eric Wong) about 4 years ago

ChangeLog: add missing reference

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

Revision 50759
Added by normal about 4 years ago

ChangeLog: add missing reference

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

Revision 50759
Added by normal about 4 years ago

ChangeLog: add missing reference

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

Revision 50759
Added by normal about 4 years ago

ChangeLog: add missing reference

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

Revision 50759
Added by normal about 4 years ago

ChangeLog: add missing reference

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

History

Updated by ko1 (Koichi Sasada) about 4 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) about 4 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.

#3

Updated by Anonymous about 4 years ago

  • Status changed from Open to Closed

Applied in changeset r50759.


ChangeLog: add missing reference

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

Also available in: Atom PDF