Heredocs with DOS line endings confuse Kernel#load on UNIX
----------------------------------------------------------
Key: JRUBY-4423
URL: http://jira.codehaus.org/browse/JRUBY-4423
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.5
Environment: JVM 1.5 on Leopard PPC
Reporter: Ian Dees
Priority: Minor
Fix For: JRuby 1.5
On OS X, with the following code in {{has_heredoc.rb}}, _using DOS-style line
endings_:
{noformat}
puts <<HERE
Multiline
text
HERE
{noformat}
... trying to {{load}} the file in JRuby yields the following error:
{noformat}
irb(main):001:0> load 'has_heredoc.rb'
SyntaxError: ./has_heredoc.rb:5: can't find string "HERE" anywhere before EOF
from ./has_heredoc.rb:2
from ./has_heredoc.rb:2:in `load'
from (irb):2
{noformat}
The reverse problem does not seem to happen; UNIX-style line endings appear to
work okay on Windows.
This problem affects Rake, which relies on {{load}}.
--
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