Luigi,

* Luigi Ballabio <luigi.balla...@gmail.com> [131231 16:24]:
>     the module does compile and install. I'm not sure if it's in any
> shape to be released, though: 3 scripts out of the four in
> Ruby/examples dump core on my machine (truth be told, it might have
> also happened with 1.8. I should go and check that, too). It looks
> like something going awry in a destructor. Do they run on yours?
> 
> Supporting both 1.8 and 1.9 might be doable in the wrappers if I can
> get the Ruby version (I see a macro for it in ruby/version.h, but the
> comments are discouraging me from using it); [..]

I don't know your userbase, but I somehow doubt that supporting 1.8
is still worth it. 1.8.7 has been released over 5 years ago, and
1.9.3 has been released over 2 years ago. In Debian, we might
actually remove 1.9 in this cycle as well, and ship with 2.0.
I hear Ruby upstream has released 2.1 recently.

> My Ruby-fu is very rusty, though, so I'm not sure how to require
> 'ftools' or 'fileutils' depending on the version, or how to alias a
> common name to the correct one. Christian, do you have any
> suggestions? (Also on the version thing above?)

Try something like this:

$ irb
irb(main):001:0> RUBY_VERSION
=> "2.0.0"
irb(main):009:0> if RUBY_VERSION >= "1.9"
irb(main):010:1>   puts :yep
irb(main):011:1> else
irb(main):012:1*   puts :no
irb(main):013:1> end
yep
=> nil


    Happy new year,
    Christian

-- 
 ,''`.  Christian Hofstaedtler <z...@debian.org>
: :' :  Debian Developer
`. `'   7D1A CFFA D9E0 806C 9C4C  D392 5C13 D6DB 9305 2E03
  `-

Attachment: signature.asc
Description: Digital signature

Reply via email to