From: Dylan Evans Date: 2009-02-11T21:40:53+09:00 Subject: Re: require behaviour --000e0cd22c1679ebef0462a3ee16 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Wed, Feb 11, 2009 at 10:29 PM, Maran Chandrasekar < maran.asterisk@gmail.com> wrote: > Dear folks, > I'm new to ruby, Please explain the following snippet's behavior > > def require( *packages ) Override require with an array an variable length argument list, which will be an array in the function > > packages.each{ | pack | Iterate through the list where pack is the current item. > > super( pack ); Send the current item to the ogiginal require. > > } > end > require('rubygems','actionmailer') Which allows you to require more than one item at a time. Hope this helps. > > -- > Posted via http://www.ruby-forum.com/. > > -- The UNIX system has a command, nice ... in order to be nice to the other users. Nobody ever uses it." - Andrew S. Tanenbaum --000e0cd22c1679ebef0462a3ee16--