RbConfig::CONFIG["ruby_version"]

Darryl L. Pierce mcpierce at gmail.com
Wed Dec 3 21:56:23 UTC 2014


I have a gem I package for Fedora [1] that has a new feature coming with
our next release. That feature depends on being able to release the GIL
for blocking operations so that other threads in the app can get
interpreter time.

The determination as to which GIL-releasing API to call is determined at
install time via extconf.rb:

---8<[snip]---

# set the ruby version compiler flag
runtime_version = RbConfig::CONFIG["ruby_version"].gsub(/\./,"")[0,2]
$CFLAGS << " -DRUBY#{runtime_version}"

---8<[snip]---

And in the native code is decides based on whether RUBY19, RUBY20 or
RUBY21 is defined (RUBY18 is a noop in this case).

However, on Fedora 19+ and RHEL7 this fails. The reason is because the
Ruby package for F19-F22/EL7 returns an empty string for the above value
in RbConfig::CONFIG. On Windows, Ubuntu, Debian and the Mac it outputs
the version info for the VM.

I filed a BZ for this (BZ#1170282) and would consider this a blocker
since I won't be able to release an updated RPM for my gem when we have
our next release due to this bug.

Any proven packager here who could give this BZ some lovin' and get a
fix pushed?

-- 
Darryl L. Pierce <mcpierce at gmail.com>
http://mcpierce.blogspot.com/
Famous last words:
   "I wonder what happens if we do it this way?"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/ruby-sig/attachments/20141203/5a7f8982/attachment.sig>


More information about the ruby-sig mailing list