Created
November 10, 2011 17:09
-
-
Save tehviking/1355431 to your computer and use it in GitHub Desktop.
JRuby in 1.9 UTF-8 breaks ERB: Java::JavaLang::ArrayIndexOutOfBoundsException in Default#index
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#WORKS | |
# -*- coding: UTF-8 -*- | |
require 'erb' | |
template = ERB.new <<-EOF | |
<% 0.times do %> | |
<% end %> | |
☃ | |
EOF | |
puts template.result | |
#BREAKS | |
# -*- coding: UTF-8 -*- | |
require 'erubis' | |
template = Erubis::Eruby.new <<-EOF | |
<% 0.times do %> | |
<% end %> | |
☃ | |
EOF | |
puts template.result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Java::JavaLang::ArrayIndexOutOfBoundsException in Default#index | |
Showing /Users/bjohnson/learn/jutf/app/views/default/index.html.erb where line # raised: | |
2 | |
Extracted source (around line #): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
☃ | |
<% 0.times do %> | |
<% end %> |
Tom says he hasn't had time to look into this issue, but should soon. I'll post again if and when I hear this issue is ready for some testing.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
+1