Skip to content

Commit

Permalink
[ruby/rdoc] Workaround JRuby's jar-dependencies error and test
Browse files Browse the repository at this point in the history
failures on CI
(ruby/rdoc#1225)

* Workaround JRuby's jar-dependencies error on CI

* Skip problematic encoding test for JRuby

ruby/rdoc@3f9897d64c
  • Loading branch information
st0012 authored and matzbot committed Dec 5, 2024
1 parent 2ecd2fe commit 26ab20f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/rdoc/test_rdoc_generator_json_index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,16 @@ def test_generate_gzipped
end

def test_generate_utf_8
# JRuby fails this test with:
# Encoding::UndefinedConversionError: "\xC2" from ASCII-8BIT to UTF-8
# org/jruby/RubyIO.java:1639:in `write'
# org/jruby/RubyIO.java:1612:in `write'
# json/ext/GeneratorState.java:232:in `_generate'
# json/ext/GeneratorState.java:137:in `generate'
# /Users/runner/work/rdoc/rdoc/vendor/bundle/jruby/3.1.0/gems/json-2.9.0-java/lib/json/common.rb:824:in `dump'
# /Users/runner/work/rdoc/rdoc/lib/rdoc/generator/json_index.rb:148:in `block in generate'
omit if RUBY_PLATFORM =~ /java/

text = "5\xB0"
text = RDoc::Encoding.change_encoding text, Encoding::ISO_8859_1
@klass.add_comment comment(text), @top_level
Expand Down

0 comments on commit 26ab20f

Please sign in to comment.