RUBY_DESCRIPTION will give you something like this:

ruby-1.9.2-p0 > RUBY_DESCRIPTION
 => "ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0]"
ree-1.8.7-2010.02 > RUBY_DESCRIPTION
 => "ruby 1.8.7 (2010-04-19 patchlevel 253) [i686-darwin10.4.0], MBARI
0x6770, Ruby Enterprise Edition 2010.02"