From: Robert Klemme Date: 2012-03-07T01:07:46+09:00 Subject: Re: How to detect Linux Kernel and glibc version? "IƱaki Baz Castillo" wrote in post #1050385: > ---------------------------------- > case RUBY_PLATFORM > when /linux/ > if KERNEL_VERSION >= "2.6.28" and GLIBC_VERSION >= "2.10" > add_define 'HAVE_ACCEPT4' > end > ---------------------------------- > > > Well, I could run "uname -r" but that is dangerous, example: > > "2.6.3" >= "2.6.28" > => true OPSSSSS !!! > > And unfortunatelly I cannot add more gems (i.e. versionomy) as > depencency. But you could add a few lines, couldn't you? Why not irb(main):001:0> class String irb(main):002:1> def to_v irb(main):003:2> scan(/\d+/).map(&:to_i).extend Comparable irb(main):004:2> end irb(main):005:1> end => nil irb(main):006:0> "2.6.3".to_v > "2.6.28".to_v => false Kind regards robert -- Posted via http://www.ruby-forum.com/.