Skip to content

Commit 25a325d

Browse files
committed
Skip problematic encoding test for JRuby
1 parent a2c1372 commit 25a325d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/rdoc/test_rdoc_generator_json_index.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,16 @@ def test_generate_gzipped
237237
end
238238

239239
def test_generate_utf_8
240+
# JRuby fails this test with:
241+
# Encoding::UndefinedConversionError: "\xC2" from ASCII-8BIT to UTF-8
242+
# org/jruby/RubyIO.java:1639:in `write'
243+
# org/jruby/RubyIO.java:1612:in `write'
244+
# json/ext/GeneratorState.java:232:in `_generate'
245+
# json/ext/GeneratorState.java:137:in `generate'
246+
# /Users/runner/work/rdoc/rdoc/vendor/bundle/jruby/3.1.0/gems/json-2.9.0-java/lib/json/common.rb:824:in `dump'
247+
# /Users/runner/work/rdoc/rdoc/lib/rdoc/generator/json_index.rb:148:in `block in generate'
248+
omit if RUBY_PLATFORM =~ /java/
249+
240250
text = "5\xB0"
241251
text = RDoc::Encoding.change_encoding text, Encoding::ISO_8859_1
242252
@klass.add_comment comment(text), @top_level

0 commit comments

Comments
 (0)