From: Tim Hunter Date: 2007-06-11T05:16:24+09:00 Subject: Re: Requiring more than one file? Marc Heiler wrote: > require does accept ony word, which should be the name that has > to be required. Since duck typing is en vogue, is it a bad idea to > have require use something like this here instead? > > require %w( pp English pathname fileutils abbrev pp digest/md5 yaml) > > The reason I write this is because I quite often see this: > > %w( pathname fileutils English abbrev pp digest/md5 yaml ).each { |file| > require file } > > which some people like to do compared to the a little cumbersome: > > require 'pathname' > require 'fileutils' > require 'English' > require 'abbrev' > I don't understand why this is considered cumbersome. Certainly it's more readable than looping over an array, and it's not like this is something you have to type a lot, or read a lot. -- RMagick OS X Installer [http://rubyforge.org/projects/rmagick/] RMagick Hints & Tips [http://rubyforge.org/forum/forum.php?forum_id=1618] RMagick Installation FAQ [http://rmagick.rubyforge.org/install-faq.html]