Forum: Ruby how to obtain Ruby version info from a program code

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Karel M. (Guest)
on 2006-01-18 12:14
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
Guest (Guest)
on 2006-01-18 12:19
The constant RUBY_VERSION.

regards,
Jan F.
Karel M. (Guest)
on 2006-01-18 12:23
Guest wrote:
> The constant RUBY_VERSION.
>
> regards,
> Jan F.

Great! Thanks for your fast response :)
This topic is locked and can not be replied to.