From: Eric Hodel Date: 2005-10-31T16:47:48+09:00 Subject: Re: Kernel#require accepting multiple arguments? On Oct 30, 2005, at 7:17 AM, 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 Or you can turn the problem around: %w[file1 file2].each { |f| require f } -- Eric Hodel - drbrain@segment7.net - http://segment7.net FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04