File.read or File.open with a url to a file resource fails with StringIndexOutOfBounds exception ------------------------------------------------------------------------------------------------
Key: JRUBY-3634 URL: http://jira.codehaus.org/browse/JRUBY-3634 Project: JRuby Issue Type: Bug Reporter: Chad DePue Assignee: Thomas E Enebo doesn't matter if the file resource is valid, placing a url in the method causes this error: jruby -e 'File.read("file://")' String.java:1768:in `substring': java.lang.StringIndexOutOfBoundsException: String index out of range: -6 from ChannelDescriptor.java:616:in `open' from ChannelDescriptor.java:586:in `open' from ChannelStream.java:1127:in `fopen' from RubyFile.java:513:in `fopen' from RubyFile.java:483:in `openInternal' from RubyFile.java:457:in `openFile' from RubyFile.java:421:in `initialize' from org/jruby/RubyFile$i_method_0_2$RUBYFRAMEDINVOKER$initialize.gen:-1:in `call' from CachingCallSite.java:238:in `cacheAndCall' from CachingCallSite.java:46:in `callBlock' from CachingCallSite.java:51:in `call' from RubyClass.java:592:in `newInstance' from RubyIO.java:976:in `open' from RubyKernel.java:266:in `open' from RubyIO.java:2987:in `read' from org/jruby/RubyIO$s_method_multi$RUBYINVOKER$read.gen:-1:in `call' from JavaMethod.java:312:in `call' from CachingCallSite.java:278:in `cacheAndCall' from CachingCallSite.java:117:in `call' from -e:1:in `__file__' from -e:-1:in `load' from Ruby.java:560:in `runScript' from Ruby.java:482:in `runNormally' from Ruby.java:360:in `runFromMain' from Main.java:229:in `run' from Main.java:110:in `run' from Main.java:94:in `main' -- 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