I've hit on a bug in Gem::GemPathSearcher#matching_file that will probably break any Gem that has more than one directory
listed in its require_paths. This bug is present in version 0.8.4. This one may be related to some of the other bugs
already reported for custom_require.rb but I'm not sure.
The require_paths for the FXRuby gem are defined thusly in the GemSpec:
spec.require_paths = ['ext/fox12', 'lib']
and the name of the extension that users will try to
The Gem::GemPathSearcher#find method iterates over all of the specifications, calling matching_file(spec, path). The
first line of matching_file() defines a glob pattern using this template:
glob = "#{@lib_dirs[spec.object_id]}/#{path}#{SUFFIX_PATTERN}"
which for this case expands to the string:
glob = "c:/ruby-1.8.2/lib/ruby/gems/1.8/gems/fxruby-1.2.3-mswin32/ext/fox12,lib/fox12{,.rb,.so,.bundle,.dll,.sl}
and when that pattern is passed into Dir.glob it of course returns an empty array. Part of the problem is that
the @lib_dirs[spec.object_id] value has been defined incorrectly, but I guess there's more to it than that.
I'll check out the CVS shortly and see if I can cook up a patch, but I wanted to go ahead and get this one in the system.
Not really sure how to work around it. |