[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

how to obtain Ruby version info from a program code

Karel Miarka

1/18/2006 9:39:00 AM

Hello,

Is there an API call returning Ruby version on which the code is
running? Eg. the same information which is returned by running "ruby
--version" on command line? I cannot find one.

Thanks,
Karel

--
Posted via http://www.ruby-....


3 Answers

Guest

1/18/2006 9:43:00 AM

0

The constant RUBY_VERSION.

regards,
Jan Friedrich

--
Posted via http://www.ruby-....


Karel Miarka

1/18/2006 9:47:00 AM

0

Guest wrote:
> The constant RUBY_VERSION.
>
> regards,
> Jan Friedrich

Great! Thanks for your fast response :)

--
Posted via http://www.ruby-....


jzakiya

1/18/2006 3:30:00 PM

0

Also just VERSION.

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