File#link and File#symlink break hard on Windows
------------------------------------------------

                 Key: JRUBY-1921
                 URL: http://jira.codehaus.org/browse/JRUBY-1921
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.1RC1
         Environment: Latest JRuby 1.1RC1
            Reporter: Vladimir Sizikov
         Attachments: file-link-symlink-broken-windows.patch

The following lines:

{noformat}
File.link("blah", "blah.lnk")
File.symlink("blah", "blah.lnk")
{noformat}

break JRuby hard, with exception:

Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot locate 
function 'link'
        at com.sun.jna.NativeLibrary.getFunctionAddress(NativeLibrary.java:200)
        at com.sun.jna.Function.<init>(Function.java:106)
        at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:187)
        at com.sun.jna.Library$Handler.invoke(Library.java:155)
        at $Proxy0.link(Unknown Source)
        at org.jruby.ext.posix.BasePOSIX.link(BasePOSIX.java:108)
        at org.jruby.RubyFile.link(RubyFile.java:1088)
        at org.jruby.RubyFileInvoker$link_method_2_0.call(Unknown Source)
        at org.jruby.runtime.CallSite$ICNonBlockCallSite.call(CallSite.java:167)
        at 
org.jruby.runtime.CallSite$ArgumentBoxingCallSite.call(CallSite.java:100)
        at org.jruby.evaluator.ASTInterpreter.callNode(ASTInterpreter.java:653)
        at 
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:300)
        at org.jruby.evaluator.ASTInterpreter.rootNode(ASTInterpreter.java:1602)
        at 
org.jruby.evaluator.ASTInterpreter.evalInternal(ASTInterpreter.java:449)
        at org.jruby.evaluator.ASTInterpreter.eval(ASTInterpreter.java:168)
        at 
org.jruby.evaluator.ASTInterpreter.evalWithBinding(ASTInterpreter.java:217)
        at org.jruby.RubyKernel.eval(RubyKernel.java:756)


At a minimum, invocation of File#link and File#symlink should not break, but 
rather should
throw NotImplementedError.

The proposed patch fixes the problem.


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