# $Id: proc.rb,v 1.5 2003/01/31 19:22:47 knu Exp $

require 'features/ruby18/base'

class Proc
  def self.__ruby18_yield(args)
    yield(args)
  end
  def yield(*args)
    if args.empty?
      call
    elsif [nil] == args
      call(nil)
    else
      type.__ruby18_yield(args, &self)
    end
  end
end
