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
That should have said ‘detecting ruby version’
VERSION and RUBY_RELEASE_DATE
···
On Fri, Feb 06, 2004 at 04:58:03PM +0900, Andrew Walrond wrote:
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?
–
_ _
__ __ | | ___ _ __ ___ __ _ _ __
'_ \ / | __/ __| '_ _ \ / ` | ’ \
) | ( | | | __ \ | | | | | (| | | | |
.__/ _ , |_| / | | | ||_ ,| | |_|
Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com
And Bruce is effectively building BruceIX
– Alan Cox
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.
···
–
Nobu Nakada
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
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 :ok 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 :ok 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 :ok 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
···
On Friday 06 Feb 2004 10:03 am, Mauricio Fernández wrote:
On Fri, Feb 06, 2004 at 04:58:03PM +0900, Andrew Walrond wrote:
Thanks for that. I’ll make the change
···
On Friday 06 Feb 2004 10:41 am, nobu.nokada@softhome.net wrote:
VERSION is already obsolete and no longer available in 1.9, use
RUBY_VERSION instead.
Robert
(Robert)
6 February 2004 10:55
7
Maybe this old posting (Nov 25th 2003) of mine helps:
“Ara.T.Howard” ahoward@ngdc.noaa.gov schrieb im Newsbeitrag
news:Pine.LNX.4.44.0311241336440.28055-100000@fattire.ngdc.noaa.gov …
any better methods of require a specific version/set of versions?
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
“Andrew Walrond” andrew@walrond.org schrieb im Newsbeitrag
news:200402061042.49252.andrew@walrond.org …
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
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 :ok 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 :ok 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 :ok 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
···
On Friday 06 Feb 2004 10:03 am, Mauricio Fernández wrote:
On Fri, Feb 06, 2004 at 04:58:03PM +0900, Andrew Walrond wrote:
after 2004-02-13"
end
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”
···
–
Nobu Nakada
Han_Holl2
(Han Holl)
8 February 2004 10:15
10
Andrew Walrond andrew@walrond.org wrote in message news:200402061117.25819.andrew@walrond.org …
case RUBY_VERSION <=> “1.8.1”
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
···
On Friday 06 Feb 2004 10:55 am, nobu.nokada@softhome.net wrote:
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.
···
–
Nobu Nakada