# Ruby Treasures 0.1
# Copyright (C) 2001 Paul Brannan <paul@atdesk.com>
# 
# You may distribute this software under the same terms as Ruby (see the file
# COPYING that was distributed with this library).
# 
require 'ds_test_helpers'
require 'hacks/method_missing_delegate'

class Foo
  def foo
    puts "foo!"
  end

  def bar
    yield 1
    yield 2
    yield 3
  end
end

class Bar < MethodMissingDelegateClass(Foo)
  def initialize
    @f = Foo.new
    super(@f)
  end
end

b = Bar.new
b.foo
b.bar do |x|
  puts x
end

