How to obtain Ruby version info from a program code

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

The constant RUBY_VERSION.

regards,
Jan F.

Guest wrote:

The constant RUBY_VERSION.

regards,
Jan F.

Great! Thanks for your fast response :slight_smile: