Turning ObjectSpace on after requiring rubygems breaks future gem require 
statements
------------------------------------------------------------------------------------

                 Key: JRUBY-4330
                 URL: http://jira.codehaus.org/browse/JRUBY-4330
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.5
         Environment: Ubuntu 9.10
            Reporter: Jeremy Stephens
            Assignee: Thomas E Enebo
            Priority: Minor
             Fix For: JRuby 1.x+
         Attachments: test.rb

This code breaks in JRuby trunk:

{noformat}
require 'rubygems'

require 'java'
JRuby.objectspace = true

require 'nokogiri'      # this could be any gem
require 'blaarrgggghh'  # or a non-existant file
{noformat}

If you turn ObjectSpace on BEFORE you require rubygems, everything works fine.  
Here's the backtrace:

{noformat}
/opt/jruby/lib/ruby/site_ruby/1.8/rubygems/gem_path_searcher.rb:75:in 
`matching_files': can't convert nil into String (TypeError)
        from 
/opt/jruby/lib/ruby/site_ruby/1.8/rubygems/gem_path_searcher.rb:66:in 
`matching_file?'
        from 
/opt/jruby/lib/ruby/site_ruby/1.8/rubygems/gem_path_searcher.rb:49:in `find'
        from 
/opt/jruby/lib/ruby/site_ruby/1.8/rubygems/gem_path_searcher.rb:49:in `find'
        from /opt/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:in 
`require'
        from test.rb:9
{noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to