Issue #2170 has been updated by Marc-Andre Lafortune.

Assigned to set to Yukihiro Matsumoto

I'm trying to see how that could be useful, to understand your goal.

Once you have a Method (or an Unbound one), the visibility is no longer relevant. What I mean is that the visibility affects only the calls like my_obj.some_method, but if one obtains that method, there is no problem calling it even if it was private (similar to using send which ignores accessibility). Since this accessibility has no consequence once you have your Method object, I wonder why it could be useful to call method.private?

Moreover I see problems with defining it. The original method could have changed of accessibility or no longer exist. method#private? returns the accessibility at the moment the Method was created, which seems even less useful. 

Similarly, results with aliases can be counterintuive.

Code example:

class X
  def f; foo; end
  alias_method :g, :f
  private :f
end
x = X.new
f = x.method(:f)
g = x.method(:g)
class X
  private :g
end
g2 = x.method(:g)
f == g  # ==> true
g == g2  # ==> true
f.private? == g.private?  # ==> false
g.private? == g2.private?  # ==> false

----------------------------------------
http://redmine.ruby-lang.org/issues/show/2170

----------------------------------------
http://redmine.ruby-lang.org