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

Key: JRUBY-1408
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Thomas E Enebo
Reporter: Sergey Martynov
Votes: 0
Watchers: 1
Operations

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

JRuby crashes with error: can't find string "EOF" anywhere before EOF (SyntaxError)

Created: 07/Oct/07 05:15 PM   Updated: 22/Dec/07 06:28 AM
Component/s: Parser
Affects Version/s: None
Fix Version/s: JRuby 1.1b1, JRuby 1.0.2

Time Tracking:
Not Specified

File Attachments: 1. File heredoc_lexer_eof.path (3 kb)
2. File heredoc_lexer_eof_test.path (0.4 kb)

Environment:
Linux serega-laptop 2.6.22-13-generic #1 SMP Thu Oct 4 17:18:44 GMT 2007 i686 GNU/Linux

ruby 1.8.5 (2007-10-07 rev 3876) [i386-jruby1.1]

Testcase included: yes
Patch Submitted: Yes


 Description  « Hide
I'm trying to run rails app on jruby.

In this app i use rutils plugin. jruby fail on loading from this plugin:
http://rutils.rubyforge.org/svn/trunk/lib/countries/countries.rb

with following error:
countries.rb:1771: can't find string "EOF" anywhere before EOF (SyntaxError)

On MRI ruby app works ok.

I browse the code and find that problem is in how LexerSource.matchString called.
It allways called like this: src.matchString("expectedString" + '\n', indent);
I remove '\n' from call and add parameter to match string until next line or end of file.
This works perfectly for me and all test cases passed.

Patch and test attached.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Charles Oliver Nutter - 19/Oct/07 08:09 PM
Enebo: examine and apply or fix...your discretion whether to backport the change. I figured since you were in the lexer anyway...

Thomas E Enebo - 23/Oct/07 03:10 PM
Fixed in 1.0 branch in 4694. trunk fix coming in next day or so.

Thomas E Enebo - 25/Oct/07 01:16 PM
Resolved in trunk in commit 4731.