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

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Karel M. (Guest)
on 2006-01-18 12:14

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.

Guest (Guest)
on 2006-01-18 12:19
The constant RUBY_VERSION.

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.