Project

General

Profile

Bug #9138

make initialize_copy private

Added by Zachary Scott about 3 years ago. Updated almost 3 years ago.

Status:
Assigned
Priority:
Normal
Assignee:
ruby -v:
2.1.0dev
[ruby-core:58488]

Description

it was discussed with nobu that initialize_copy should be a private method, and any cases where it's public is considered a bug.

when i asked matz he said, it sounds good and ok to experiment with this change in trunk.

History

#1 [ruby-core:59093] Updated by Zachary Scott almost 3 years ago

  • Target version set to next minor

Going to postpone this until 2.2

#2 [ruby-core:59098] Updated by Marc-Andre Lafortune almost 3 years ago

Isn't initialize_copy already private (as it should be)?

ObjectSpace.each_object(Class).reject {|k| k.private_method_defined?(:initialize_copy)}
 # => [BasicObject]

Also available in: Atom PDF