Skip to content

Commit 3f9897d

Browse files
authored
Workaround JRuby's jar-dependencies error and test failures on CI (#1225)
* Workaround JRuby's jar-dependencies error on CI * Skip problematic encoding test for JRuby
1 parent e2d4ac9 commit 3f9897d

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Gemfile

+3
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ group :development do
1212
gem 'gettext'
1313
gem 'prism', '>= 0.30.0'
1414
end
15+
16+
# Workaround for https://github.com/mkristian/jar-dependencies/issues/86
17+
gem "jar-dependencies", "~> 0.4.0", platform: :jruby

test/rdoc/test_rdoc_generator_json_index.rb

+10
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)