Saturday, June 23, 2007

My best Ruby coding hint

One programming trick that I use to reference Ruby source code for the standard libraries and locally installed gems is to set up TextMate projects (Eclipse Ruby projects also work well) for:
  • /usr/local/lib/ruby/1.8 - location of Ruby source code for standard libraries on my system
  • /usr/local/lib/ruby/gems/1.8/gems - location of local gem installs (often contain examples/tests and documentation files) on my system
When you are using a standard library or a gem it is great to have the source right in front of you for reference.