Skip to content

Commit fdb517d

Browse files
committed
🩹 Workaround JRuby JSON encoding error
See ruby/json#870
1 parent ad5eb96 commit fdb517d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

rakelib/string_prep_tables_generator.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,12 @@ def parse_rfc_text(rfc3454_text)
292292
.to_h.compact
293293
.transform_values {|t| t.first.size == 2 ? t.to_h : t }
294294
tables["titles"] = titles
295+
296+
# See https://github.com/ruby/json/issues/870
297+
if RUBY_ENGINE == "jruby"
298+
tables["titles"].transform_values! { _1.dump.undump }
299+
end
300+
295301
tables
296302
end
297303

0 commit comments

Comments
 (0)