Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.1.6
-
Fix Version/s: JRuby 1.3
-
Component/s: Core Classes/Modules
-
Labels:None
-
Environment:Macosx 10.5, java version "1.5.0_16", Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
-
Number of attachments :
Description
Using the following ruby file which is the shortest case I could find to reproduce the issue I originally had when running Puppet with JRuby:
r.rb:
require 'fcntl'
puts "F_SETFD: %s" % Fcntl::F_SETFD
On original ruby 1.8.7 or 1.8.6, the following is printed:
FD: 2
On JRuby 1.1.6:
fcntl:1:in `const_missing': uninitialized constant Fcntl::F_SETFD (NameError)
from /tmp/r.rb:3
The fcntl file exists in the installation directory as FFI. It seems to be available to the architecture on which I run JRuby, but for some unknown reason the file doesn't seem to be loaded.
Ok, I modified fcntl to now load all constants correctly, using our FFI-based logic for getting those constants. Can you submit some specs to RubySpec that check for the presence of those constants, so we can keep them working in the future?