Is 1.8.2 imminent? And detecting Rubyx version

A

Andrew Walrond

I'm holding off an 'official' release of Rubyx (ruby based linux distro)
because it hits some bugs in 1.8.1 which have been fixed in cvs

I was wondering whether anyone knows when 1.8.2 will be released?

Otherwise, is there a way of detecting a version of ruby, which also covers
dated stable snapshots?

Eg Rubyx needs stable-snapshot-2004-01-14.rar or newer. How can I test for it?

Andrew Walrond
 
M

Mauricio Fernández

I'm holding off an 'official' release of Rubyx (ruby based linux distro)
because it hits some bugs in 1.8.1 which have been fixed in cvs

I was wondering whether anyone knows when 1.8.2 will be released?

Otherwise, is there a way of detecting a version of ruby, which also covers
dated stable snapshots?

Eg Rubyx needs stable-snapshot-2004-01-14.rar or newer. How can I test for it?

VERSION and RUBY_RELEASE_DATE

--
_ _
| |__ __ _| |_ ___ _ __ ___ __ _ _ __
| '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \
| |_) | (_| | |_\__ \ | | | | | (_| | | | |
|_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_|
Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com

And Bruce is effectively building BruceIX
-- Alan Cox
 
N

nobu.nokada

Hi,

At Fri, 6 Feb 2004 19:03:58 +0900,
Mauricio Fernández wrote in [ruby-talk:91687]:
VERSION and RUBY_RELEASE_DATE

VERSION is already obsolete and no longer available in 1.9, use
RUBY_VERSION instead.
 
A

Andrew Walrond

VERSION and RUBY_RELEASE_DATE

Thanks! My implementation seems messy though. Can anybody think of how to
clean it up?


#Need ruby 1.8.1 stable snapshot >= 2004-01-14
catch :eek:k do
puts("Detected ruby version #{VERSION}, released #{RUBY_RELEASE_DATE}")
VERSION =~ /(\d*).(\d*).(\d*)/
v1,v2,v3 = $1.to_i,$2.to_i,$3.to_i
RUBY_RELEASE_DATE =~ /(\d*)-(\d*)-(\d*)/
d1,d2,d3 = $1.to_i,$2.to_i,$3.to_i
throw :eek:k if v1 > 1 or (v1 == 1 and v2 > 8) or (v1 == 1 and v2 == 8 and v3
if v1 == 1 and v2 == 8 and v3 == 1
throw :eek:k if d1 > 2004 or (d1 == 2004 and d2 > 1) or (d1 == 2004 and d2
== 1 and d3 > 13)
end
raise "Rubyx needs ruby version 1.8.2 or a 1.8.1 stable snapshot released
after 2004-02-13"
end
 
R

Robert Klemme

Maybe this old posting (Nov 25th 2003) of mine helps:
A bit more complicated, but could be included in the std. distribution...

module Kernel
def ensure_version( ver )
if ( RUBY_VERSION.split(/\./).map{|x|x.to_i} <=>
ver.split(/\./).map{|x|x.to_i} ) < 0
throw "Version error: should be #{ver} but is #{RUBY_VERSION}"
end
end
end

ensure_version "1.7.0"
ensure_version "1.8.0"
ensure_version "1.8.1"

Kind regards

robert
 
N

nobu.nokada

Hi,

At Fri, 6 Feb 2004 19:42:54 +0900,
Andrew Walrond wrote in [ruby-talk:91690]:
Thanks! My implementation seems messy though. Can anybody think of how to
clean it up?


#Need ruby 1.8.1 stable snapshot >= 2004-01-14

case RUBY_VERSION <=> "1.8.1"
when 1 then true
when 0 then RUBY_RELEASE_DATE >= "2004-01-14"
end or raise "Need ruby 1.8.1 stable snapshot >= 2004-01-14"
 
A

Andrew Walrond

case RUBY_VERSION <=> "1.8.1"
when 1 then true
when 0 then RUBY_RELEASE_DATE >= "2004-01-14"
end or raise "Need ruby 1.8.1 stable snapshot >= 2004-01-14"

Smart-arse :)

Thanks!
 
H

Han Holl

Hi,

irb(main):001:0> "1.12.3" <=> "1.8.0"
=> -1

Does ruby guarantee never to use two-digit version and release
numbers. If not, your comparison method will fail.

Cheers,

Han Holl
 
N

nobu.nokada

Hi,

At Sun, 8 Feb 2004 19:15:00 +0900,
Han Holl wrote in [ruby-talk:91781]:
Does ruby guarantee never to use two-digit version and release
numbers. If not, your comparison method will fail.

Yes, guaranteed.
 
Y

Yukihiro Matsumoto

Hi,

In message "Re: Is 1.8.2 imminent? And detecting Rubyx version"

|Does ruby guarantee never to use two-digit version and release
|numbers. If not, your comparison method will fail.

We will never use two digit version. Don't worry.

matz.
 

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
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top