Ben Browning created JRUBY-6463: ----------------------------------- Summary: File.read('foo').strip Leaves Trailing Newline Under 1.9 Key: JRUBY-6463 URL: https://jira.codehaus.org/browse/JRUBY-6463 Project: JRuby Issue Type: Bug Affects Versions: JRuby 1.6.7 Reporter: Ben Browning Assignee: Thomas E Enebo
Trailing newlines are left on stripped strings when the string contents come from a File.read. Sample code to demonstrate: {{code} $ echo "foo" > blah $ jruby --1.8 -e "puts File.read('blah').gsub(%Q(\n), '\n')" foo\n $ jruby --1.8 -e "puts File.read('blah').strip.gsub(%Q(\n), '\n')" foo $ jruby --1.9 -e "puts File.read('blah').gsub(%Q(\n), '\n')" foo\n $ jruby --1.9 -e "puts File.read('blah').strip.gsub(%Q(\n), '\n')" foo\n {{code}} -- 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