On Aug 20, 2007, at 4:29 PM, Gary Wright wrote: > > On Aug 20, 2007, at 5:12 PM, Hassan Schroeder wrote: > >> On 8/20/07, John Joyce <dangerwillrobinsondanger / gmail.com> wrote: >> >>> It is part of the Ruby 'standard library' but you do still need to >>> require a library before using it. >> >> Is this platform dependent? 'require' doesn't seem to be, er, >> required >> on my SuSE system -- >> >> hassan@ceylon:~> ruby -v >> ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux] >> hassan@ceylon:~> irb >> irb(main):001:0> DateTime.now.to_s >> => "2007-08-20T14:14:31-07:00" >> irb(main):002:0> > > Be careful with irb. It has its own set of startup rules and > behaviors that > are slightly different than Ruby itself. Try: > > ruby -e 'puts DateTime.now.to_s' > > Ruby's startup behaviour can also be changed if the RUBYOPT > environment > variable is set. > > On my installation irb shows 451 classes defined at startup while > the Ruby > interpreter just shows 147 classes. > Good call, that's true, irb does require some things automatically.