[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Getting the version number of the ruby interpreter

Keith P. Boruff

1/21/2005 6:28:00 PM

Hello all,

Is there a way to get the version number within a ruby script of the
interpreter running that script?

Yes, I know I can do this on the cmd line:
% ruby --version

I didn't seem to find anything in the documentation though I am new at
this language.

I have my reasons for wanting the version info in this manner. If you
really want to know, I'll tell you. Otherwise, I'll spare you the boring
details.

Thanks,
KPB
3 Answers

Trevor

1/21/2005 6:35:00 PM

0

Keith P. Boruff wrote:

> Hello all,
>
> Is there a way to get the version number within a ruby script of the
> interpreter running that script?

irb(main):001:0> VERSION
=> "1.8.2"
irb(main):002:0>


http://www.zenspider.com/Languages/Ruby/Qui...


Keith P. Boruff

1/21/2005 6:38:00 PM

0

Trevor Wennblom wrote:
> Keith P. Boruff wrote:
>
>> Hello all,
>>
>> Is there a way to get the version number within a ruby script of the
>> interpreter running that script?
>
>
> irb(main):001:0> VERSION
> => "1.8.2"
> irb(main):002:0>
>
>
> http://www.zenspider.com/Languages/Ruby/Qui...
>
>

Thanks! that did it. Also, thanks for the link.

KPB

nobu.nokada

1/22/2005 1:51:00 AM

0

Hi,

At Sat, 22 Jan 2005 03:34:47 +0900,
> irb(main):001:0> VERSION
> => "1.8.2"
> irb(main):002:0>

Note that the constant VERSION has been obsolete. Use
RUBY_VERSION instead.

--
Nobu Nakada