Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ group :development do
gem 'gettext'
gem 'prism', '>= 0.30.0'
end

# Workaround for https://github.com/mkristian/jar-dependencies/issues/86
gem "jar-dependencies", "~> 0.4.0", platform: :jruby
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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@headius do you know why this test starts failing on JRuby?

# 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
Loading