$: << ''  causes problems on Windows
------------------------------------

                 Key: JRUBY-3231
                 URL: http://jira.codehaus.org/browse/JRUBY-3231
             Project: JRuby
          Issue Type: Bug
          Components: Windows
    Affects Versions: JRuby 1.1.5
         Environment: Windows Vista, JRuby 1.1.5
            Reporter: Adam Murray
            Priority: Minor


Steps to recreate:

> jirb

irb(main):001:0> $: << ''
=> ["C:/Users/Adam/Downloads/jruby-1.1.5/lib/ruby/site_ruby/1.8", 
"C:/Users/Adam/Downloads/jruby-1.1.5/lib/ruby/site_ruby", 
"C:/Users/Adam/Downloads/jruby-1.1.
/lib/ruby/1.8", "C:/Users/Adam/Downloads/jruby-1.1.5/lib/ruby/1.8/java", 
"lib/ruby/1.8", ".", ""]

irb(main):002:0> require 'socket'
org.jruby.util.JRubyFile:60:in `createNoUnicodeConversion': 
java.lang.IllegalArgumentException: Neither current working directory () nor 
pathname (socket.class
 led to an absolute path
        from org.jruby.util.JRubyFile:49:in `create'
        from org.jruby.runtime.load.LoadService:839:in `tryResourceFromLoadPath'
        from org.jruby.runtime.load.LoadService:754:in 
`tryResourceFromLoadPathOrURL'
        from org.jruby.runtime.load.LoadService:631:in `findLibraryWithoutCWD'
        from org.jruby.runtime.load.LoadService:618:in `findLibraryWithCWD'
        from org.jruby.runtime.load.LoadService:122:in `access$200'
        from org.jruby.runtime.load.LoadService$NormalSearcher:388:in 
`trySearch'
        from org.jruby.runtime.load.LoadService:265:in `smartLoad'
        from org.jruby.runtime.load.LoadService:282:in `require'
        from org.jruby.RubyKernel:829:in `require'
        from org.jruby.RubyKernel$s_method_1_0$RUBYFRAMEDINVOKER$require:-1:in 
`call'
        from org.jruby.internal.runtime.methods.DynamicMethod:152:in `call'
        from org.jruby.runtime.callsite.CachingCallSite:280:in `cacheAndCall'
        from org.jruby.runtime.callsite.CachingCallSite:116:in `call'
        from org.jruby.ast.FCallOneArgNode:36:in `interpret'
        from org.jruby.ast.NewlineNode:101:in `interpret'
        from org.jruby.ast.RootNode:126:in `interpret'
        from org.jruby.evaluator.ASTInterpreter:124:in `evalWithBinding'
        from org.jruby.RubyKernel:873:in `eval'
        ....


Expected behavior:
Require 'socket' should work as usual.
Although it is pointless to add the empty string to the LOAD_PATH, it shouldn't 
cause things to break.
I have tried this on MRI ruby on Windows, and JRuby 1.1.5 on OS X, and it works 
as expected.


-- 
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