Hi,

At Tue, 29 Aug 2006 04:00:39 +0900,
Ola Bini wrote in [ruby-talk:211191]:
> and I would have a module Baz which could be included, without having 
> do_one_thing included.

http://www.rubyist.net/~nobu/ruby/aliasing.rb may help you.

  require 'aliasing'

  module Foo
    def do_one_thing
      "one_thing"
    end
    def do_second
      "second"
    end
    def do_third
      "third"
    end
  end

  class Bar
    include Foo.only_aliasing(:do_second, :do_third)
  end

  p Bar.instance_methods.grep(/^do/)
  bar = Bar.new
  p bar.do_second
  p bar.do_third
  p (begin bar.do_one_thing; rescue NoMethodError => e; e; end)

-- 
Nobu Nakada