Feature #5089
closedEven More Inadvertent Symbol Removal, And Fix Issue With Previous Code
Description
This is the third and hopefully final patch for removing inadvertent symbol creation. It removes it from the following methods:
alias_method
autoload?
private_class_method
private_constant
private
protected
public
public_class_method
public_constant
remove_method
undef_method
untrace_var
It also removes it from const_get if an invalid constant name is used or const_missing has not been overridden. If a valid constant name is used and const_missing has been overridden, then a symbol must be created so it can be passed to const_missing.
The second patch fixes the previous patches to handle the case where a non-String that implements to_str is passed to the methods.
Files
Updated by nobu (Nobuyoshi Nakada) over 13 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r32686.
Jeremy, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- eval_error.c (rb_print_undef_str): new function to raise
NameError for undefined method. - load.c (rb_mod_autoload_p), object.c (rb_mod_const_get),
variable.c (rb_f_untrace_var, set_const_visibility), vm_method.c
(rb_mod_{remove,undef,alias}_method, set_method_visibility):
remove inadvertent symbol creation. based on the first patch by
Jeremy Evans at [ruby-core:38447]. [Feature #5089]