Kernel::VERSION

B

Bret Jolly

There used to be a constant of this name, which I was using
in programs to figure out which version of Ruby the user had.
It seems to be gone in Ruby version 1.8.1. What should I
use instead?

Regards, Bret
 
R

Ryan Pavlik

On Tue, 6 Jan 2004 07:21:41 +0900
There used to be a constant of this name, which I was using
in programs to figure out which version of Ruby the user had.
It seems to be gone in Ruby version 1.8.1. What should I
use instead?

$ irb
irb(main):001:0> VERSION
=> "1.8.1"
irb(main):002:0> Kernel::VERSION
NameError: uninitialized constant Kernel::VERSION
from (irb):2

Looks like it's just not Kernel::VERSION.
 
M

Matt Armstrong

There used to be a constant of this name, which I was using
in programs to figure out which version of Ruby the user had.
It seems to be gone in Ruby version 1.8.1. What should I
use instead?

RUBY_VERSION works too.
 
B

Bret Jolly

Matt Armstrong said:
RUBY_VERSION works too.

Thanks. RUBY_VERSION looks good and works as early
as ruby 1.6.4 (the earliest version that builds on my
machine).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top