Skip to content

Commit

Permalink
Suppress encoding error with encoding normalization
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Jun 22, 2013
1 parent 8393b89 commit dd2a7c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/compiler/compiled_file.rb
Expand Up @@ -268,7 +268,9 @@ def marshal(val)
when Tuple
str = "p\n#{val.size}\n"
val.each do |ele|
str.append marshal(ele)
data = marshal(ele)
data.force_encoding(str.encoding) if defined?(Encoding)
str.append data
end
str
when Float
Expand Down

0 comments on commit dd2a7c5

Please sign in to comment.