From: "dimko (Dmitriy Meremyanin)" Date: 2013-03-20T07:49:36+09:00 Subject: [ruby-core:53555] [ruby-trunk - Bug #8127][Open] NoMethodError for private / protected methods with Module#prepend Issue #8127 has been reported by dimko (Dmitriy Meremyanin). ---------------------------------------- Bug #8127: NoMethodError for private / protected methods with Module#prepend https://bugs.ruby-lang.org/issues/8127 Author: dimko (Dmitriy Meremyanin) Status: Open Priority: Normal Assignee: Category: core Target version: ruby -v: ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.2.0] =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 -- http://bugs.ruby-lang.org/