History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRUBY-1461
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Thomas E Enebo
Reporter: Pat Cheng
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JRuby

require './NonExistantRequiredFile' causes StringIndexOutOfBoundException instead of LoadError

Created: 21/Oct/07 05:11 PM   Updated: 23/Apr/08 10:03 AM
Component/s: None
Affects Version/s: None
Fix Version/s: JRuby 1.0.3, JRuby 1.1RC1

Time Tracking:
Not Specified

File Attachments: 1. Text File testLoad.rb (0.8 kb)

Environment: Windows XP, with jDK 1.6.0 with both JRUby 1.0.1 and trunk version

Testcase included: yes


 Description  « Hide
I added this line to test/testLoad.rb

test_exception(LoadError) { require './NonExistantRequriedFile'}

fails with:
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(Unknown Source)
at org.jruby.runtime.load.LoadService.smartLoad(LoadService.java:285)
at org.jruby.runtime.load.LoadService.require(LoadService.java:344)
at org.jruby.RubyKernel.require(RubyKernel.java:671)
at org.jruby.RubyKernelInvoker$require_method_1_0.call(Unknown Source)
at org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:154)
at org.jruby.runtime.CallAdapter$DefaultCallAdapter.call(CallAdapter.java:107)
at test_load._file_(test_load.rb:1)
at test_load.load(test_load.rb)
at org.jruby.Ruby.runScript(Ruby.java:562)
at org.jruby.Ruby.runNormally(Ruby.java:484)
at org.jruby.Ruby.runFromMain(Ruby.java:409)
at org.jruby.Main.runInterpreter(Main.java:223)
at org.jruby.Main.runInterpreter(Main.java:179)
at org.jruby.Main.run(Main.java:121)
at org.jruby.Main.main(Main.java:96)



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Thomas E Enebo - 31/Dec/07 11:51 AM
This test is now in both versions and we work. This has been fixed in the past and not resolved. Stick a fork in it.