Project

General

Profile

Feature #5079

More removal of inadvertent symbol creation

Added by jeremyevans0 (Jeremy Evans) over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
[ruby-core:38404]

Description

As I mentioned in an update to #5072, this removes inadvertent symbol creation for the following methods:

class_variable_get
instance_variable_get
remove_class_variable
remove_instance_variable
remove_const
method
instance_method
public_method
public_instance_method

It also fixes the NameError messages for the following cases (which were changed by r32621):

Object.const_defined?("gadzooks1")
Object.instance_variable_defined?("gadzooks2")
Object.class_variable_defined?("gadzooks3")

One new function is added to intern.h, rb_name_error_str, which is just like rb_name_error except it takes a VALUE instead of an ID.


Files


Related issues

Precedes Ruby master - Feature #5072: Avoid inadvertent symbol creation in reflection methodsClosed07/25/201107/25/2011Actions

Associated revisions

Revision 4dc1a218
Added by nobu (Nobuyoshi Nakada) over 8 years ago

  • error.c (rb_name_error_str): new function to raise NameError with the name string but not ID.
  • object.c, proc.c, variable.c: more removal of inadvertent symbol creation. [Feature #5079]

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

Revision 32645
Added by nobu (Nobuyoshi Nakada) over 8 years ago

  • error.c (rb_name_error_str): new function to raise NameError with the name string but not ID.
  • object.c, proc.c, variable.c: more removal of inadvertent symbol creation. [Feature #5079]

Revision 32645
Added by nobu (Nobuyoshi Nakada) over 8 years ago

  • error.c (rb_name_error_str): new function to raise NameError with the name string but not ID.
  • object.c, proc.c, variable.c: more removal of inadvertent symbol creation. [Feature #5079]

Revision 32645
Added by nobu (Nobuyoshi Nakada) over 8 years ago

  • error.c (rb_name_error_str): new function to raise NameError with the name string but not ID.
  • object.c, proc.c, variable.c: more removal of inadvertent symbol creation. [Feature #5079]

Revision 32645
Added by nobu (Nobuyoshi Nakada) over 8 years ago

  • error.c (rb_name_error_str): new function to raise NameError with the name string but not ID.
  • object.c, proc.c, variable.c: more removal of inadvertent symbol creation. [Feature #5079]

Revision 32645
Added by nobu (Nobuyoshi Nakada) over 8 years ago

  • error.c (rb_name_error_str): new function to raise NameError with the name string but not ID.
  • object.c, proc.c, variable.c: more removal of inadvertent symbol creation. [Feature #5079]

Revision 32645
Added by nobu (Nobuyoshi Nakada) over 8 years ago

  • error.c (rb_name_error_str): new function to raise NameError with the name string but not ID.
  • object.c, proc.c, variable.c: more removal of inadvertent symbol creation. [Feature #5079]

History

#1

Updated by nobu (Nobuyoshi Nakada) over 8 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r32645.
Jeremy, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • error.c (rb_name_error_str): new function to raise NameError with the name string but not ID.
  • object.c, proc.c, variable.c: more removal of inadvertent symbol creation. [Feature #5079]

Updated by nobu (Nobuyoshi Nakada) over 8 years ago

  • Assignee set to jeremyevans0 (Jeremy Evans)

Also available in: Atom PDF