Skip to content

Commit da9c8f9

Browse files
committed
Drop Truffleruby JSON hack
The [fix](ruby/json#483) must've made it fully into Truffleruby now, because this isn't failing anymore.
1 parent 9809d60 commit da9c8f9

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

test/json_schema_test_suite_test.rb

+1-22
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
11
require 'test_helper'
22

33
class JSONSchemaTestSuiteTest < Minitest::Test
4-
# https://github.com/flori/json/pull/483
5-
INCOMPATIBLE_FILES = if RUBY_ENGINE == 'truffleruby' && Gem::Version.new(JSON::VERSION) < '2.6.3'
6-
# :nocov:
7-
Set[
8-
'JSON-Schema-Test-Suite/tests/draft2020-12/optional/ecmascript-regex.json',
9-
'JSON-Schema-Test-Suite/tests/draft2019-09/optional/ecmascript-regex.json',
10-
'JSON-Schema-Test-Suite/tests/draft7/optional/ecmascript-regex.json',
11-
'JSON-Schema-Test-Suite/tests/draft6/optional/ecmascript-regex.json',
12-
'JSON-Schema-Test-Suite/tests/draft4/optional/ecmascript-regex.json'
13-
]
14-
# :nocov:
15-
else
16-
Set[]
17-
end
18-
194
OUTPUT_DRAFTS = {
205
'draft2020-12' => JSONSchemer.draft202012,
216
'draft2019-09' => JSONSchemer.draft201909
@@ -122,20 +107,14 @@ def test_json_schema_test_suite
122107
# :nocov:
123108
end
124109
end
125-
rescue JSON::ParserError => e
126-
# :nocov:
127-
raise unless Encoding::CompatibilityError === e.cause && INCOMPATIBLE_FILES.include?(file)
128-
# :nocov:
129110
end
130111

131112
fixture = Pathname.new(__dir__).join('fixtures', "#{draft}.json")
132113
# :nocov:
133114
if ENV['WRITE_FIXTURES'] == 'true'
134115
fixture.write("#{JSON.pretty_generate(output)}\n")
135116
else
136-
fixture_json = JSON.parse(fixture.read)
137-
INCOMPATIBLE_FILES.each { |file| fixture_json.delete(file) }
138-
assert_equal(output, fixture_json)
117+
assert_equal(output, JSON.parse(fixture.read))
139118
end
140119
# :nocov:
141120
end

0 commit comments

Comments
 (0)