From: Luis Lavena Date: 2010-08-12T04:40:06+09:00 Subject: Re: Determining whether the running ruby is outdated? On Aug 11, 4:29 pm, Dan Rathbun wrote: > Lars, I found where the information is in each package. > > It is in the version.h file (a C source header file.) > > In the some of the older precompiled packages, a copy of this file, is > placed in the #{platform} subdir of the ruby/lib/ruby/#{engine} > directory. > In newer precompiled packages, it cannot find it and it may have been > replaced with rbconfig.rb > No, all versions of MRI (Matz Ruby Implementation) still stores version information in a C header, not Ruby code. > In the source packages, the file is in the source/#{ver-patchlevel} dir > of the source archives. > The problem with them is thay are all in compressed archives (tarballs > or zips,) so you cannot read them over the net. > Yes, the only workaround is download, extract and find the file. In RubyInstaller we know what we are looking for: http://github.com/oneclick/rubyinstaller/blob/master/recipes/packager/inno.rake#L3-14 http://github.com/oneclick/rubyinstaller/blob/master/recipes/packager/inno.rake#L116 Do a Dir.glob and look for version.h -- Luis Lavena