View Single Post
  #21  
Old 03-18-2009, 07:23 AM
kule kule is offline
Member
 
Join Date: Oct 2008
Posts: 20
Oh just to add - remember that we're using a regular expression to find the version. If it can't find the constant we're after rails_ver will end up being nil (similar to null in most other languages).

So you may want to check before using it:

Code:
if rails_ver.nil?
  # assume old way or throw exception
else
  # whatever you wish to do
end

Last edited by kule; 03-18-2009 at 07:29 AM..
Reply With Quote