Actions
Bug #8127
closedNoMethodError for private / protected methods with Module#prepend
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.2.0]
Backport:
Description
=begin
Calling protected / private methods after using Module#prepend raises NoMethodError exception.
module Foo
end
class Record
prepend Foo
def protected_method
end
protected :protected_method
end
record = Record.new
record.respond_to?(:protected_method, true) #=> true
record.send(:protected_method) #=> NoMethodError: undefined method `protected_method'
=end
Updated by nobu (Nobuyoshi Nakada) almost 11 years ago
- Status changed from Open to Closed
Actions
Like0
Like0