why-hpricot 0.6.207 → 0.6.210
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/hpricot/builder.rb +2 -1
- data/test/test_preserved.rb +3 -0
- metadata +1 -1
data/lib/hpricot/builder.rb
CHANGED
data/test/test_preserved.rb
CHANGED
@@ -10,6 +10,9 @@ class TestPreserved < Test::Unit::TestCase
|
|
10
10
|
doc = Hpricot(str)
|
11
11
|
yield doc if block_given?
|
12
12
|
str2 = doc.to_original_html
|
13
|
+
if RUBY_VERSION =~ /^1.9/
|
14
|
+
str2.force_encoding('UTF-8')
|
15
|
+
end
|
13
16
|
str.lines.zip(str2.lines).each do |s1, s2|
|
14
17
|
assert_equal s1, s2
|
15
18
|
end
|