Project

General

Profile

Actions

Feature #9947

open

Make `Object#send` and `Object#method` private

Added by alexeymuranov (Alexey Muranov) almost 8 years ago. Updated 5 months ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:63188]

Description

I propose to make Object#send and Object#method private.

  • If someone wants to use public #send or #method with their class, they can easily opt in :
class MyClass
  public :send, :method
end
  • They can also use BasicObject#__send__. (There is however a mismatch between BasicObject#__send__ and Kernel#__method__.)

  • There is hardly any good reason IMO to use public #send or #method with someone else's classes.

  • I am trying to never call #send or #method with an explicit receiver, but since #send and #method are public anyway, i feel that my code will be under-appreciated if someone looks at it.

Actions #1

Updated by hsbt (Hiroshi SHIBATA) 5 months ago

  • Project changed from 14 to Ruby master
Actions

Also available in: Atom PDF