Skip to content

Commit ebb01ea

Browse files
committed
Add comment to clarify usage of Oj.strict_load
1 parent a1c3d1a commit ebb01ea

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

test/test_urlpattern.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def test_that_it_has_a_version_number
1818
URLPATTERNTESTDATA = begin
1919
UNDERSCORE = { baseURL: :base_url, ignoreCase: :ignore_case }.freeze
2020

21+
# Use `Oj.strict_load` with `allow_invalid_unicode` to work around `JSON::ParserError` (incomplete surrogate pair).
2122
Oj.strict_load(File.read(
2223
File.join(__dir__, "fixtures", "urlpatterntestdata.json"), encoding: Encoding::UTF_8
2324
), { allow_invalid_unicode: true, symbol_keys: true }).map do |entry|

0 commit comments

Comments
 (0)