From: Stefan Lang Date: 2005-10-31T00:22:10+09:00 Subject: Re: Kernel#require accepting multiple arguments? On Sunday 30 October 2005 16:17, Daniel Schierbeck wrote: > What is the reason that Kernel#require only accepts one filename? > Implementing a version of `require' that can take multiple > arguments is pretty easy: > > module Kernel > alias_method :__require__, :require > > def require(*filenames) > filenames.all? { |file| __require__(file) } > end > end Perhaps to allow version specification in the future. E.g.: require 'foo', '>= 1.0.1' like RubyGems require_gem. Regards, Stefan