Frazer created JRUBY-6554:
-----------------------------
Summary: eval seems to be broken in versions greater than 1.6.5.1
Key: JRUBY-6554
URL: https://jira.codehaus.org/browse/JRUBY-6554
Project: JRuby
Issue Type: Bug
Components: Ruby 1.9.3
Affects Versions: JRuby 1.6.7, JRuby 1.6.6
Reporter: Frazer
Assignee: Thomas E Enebo
I had an issue recently which forced me to revert to back to jruby-1.6.5.1 from
jruby-1.6.7
jruby-1.6.7 :001 > s = "{ :summary =>'some text\n\r\n\nPlease be sure to
include your:\n\r\n \r\nfull name \r\n \r\nemail address \r',
:keywords=>'premium services'}"
=> "{ :summary =>'some text\n\r\n\nPlease be sure to include your:\n\r\n
\r\nfull name \r\n \r\nemail address \r', :keywords=>'premium services'}"
jruby-1.6.7 :002 > eval(s)
SyntaxError: (eval):9: syntax error, unexpected tIDENTIFIER
', :keywords=>'premium services'}
^
from org/jruby/RubyKernel.java:1088:in `eval'
from (irb):2:in `evaluate'
from org/jruby/RubyKernel.java:1088:in `eval'
from org/jruby/RubyKernel.java:1410:in `loop'
from org/jruby/RubyKernel.java:1197:in `catch'
from org/jruby/RubyKernel.java:1197:in `catch'
from /home/ubuntu/.rvm/rubies/jruby-1.6.7/bin/jirb:17:in `(root)'
The above behaviour also occurs in 1.6.6
In jruby-1.6.5.1 all is well:
jruby-1.6.5.1 :001 > s = "{ :summary =>'some text\n\r\n\nPlease be sure to
include your:\n\r\n \r\nfull name \r\n \r\nemail address \r',
:keywords=>'premium services'}"
=> "{ :summary =>'some text\n\r\n\nPlease be sure to include your:\n\r\n
\r\nfull name \r\n \r\nemail address \r', :keywords=>'premium services'}"
jruby-1.6.5.1 :002 > eval(s)
=> {:summary=>"some text\n\n\nPlease be sure to include your:\n\n \nfull name
\n \nemail address \n", :keywords=>"premium services"}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.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