Issue Type: Bug Bug
Affects Versions: JRuby 1.7.4
Assignee: Unassigned
Components: Core Classes/Modules
Created: 03/Aug/13 5:52 AM
Description:

Ran into another bug while trying to get rails testsuite running on JRuby. Like, previous one this too is caused by non-english chars.

Problem

when StaticTests#test_served_static_file_with_non_english_filename is run, it raises the following Exception

IllegalArgumentException
Buffer.java:236:in `position': java.lang.IllegalArgumentException
	from CharSequenceParameterConverter.java:125:in `toNative'
	from null:-1:in `__xstat64'
	from LinuxPOSIX.java:116:in `stat'
	from CheckedPOSIX.java:261:in `stat'
	from LazyPOSIX.java:263:in `stat'
	from RubyFileStat.java:160:in `setup'
	from RubyFileStat.java:92:in `newFileStat'
	from Ruby.java:3180:in `newFileStat'
	from RubyFile.java:913:in `mtime'
	from RubyFile$INVOKER$s$1$0$mtime.gen:-1:in `call'
	from CachingCallSite.java:326:in `cacheAndCall'
	from CachingCallSite.java:170:in `call'
	from CallOneArgNode.java:57:in `interpret'
	from FCallOneArgNode.java:36:in `interpret'
	from NewlineNode.java:105:in `interpret'
	from RootNode.java:129:in `interpret'
	from ASTInterpreter.java:121:in `INTERPRET_ROOT'
	from Ruby.java:838:in `runInterpreter'
	from Ruby.java:846:in `runInterpreter'
	from Ruby.java:677:in `runNormally'
	from Ruby.java:522:in `runFromMain'
	from Main.java:395:in `doRunFromMain'
	from Main.java:290:in `internalRun'
	from Main.java:217:in `run'
	from Main.java:197:in `main'

I looked into this further and managed to isolate the issue to this line of Rack::File

last_modified = F.mtime(@path).httpdate

With this new information, I was able to reproduce this behaviour directly from command-line

$ jruby -e'puts File.mtime "/home/gaurish/code/repo/rails/actionpack/test/fixtures/public/foo/こんにちは.html"'

For the intended/expected behaviour it should return DateTime Object as seen below on MRI

$ ruby -e'puts File.mtime "/home/gaurish/code/repo/rails/actionpack/test/fixtures/public/foo/こんにちは.html"'
2013-08-01 18:39:02 +0530

Project: JRuby
Priority: Major Major
Reporter: Gaurish Sharma
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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