summaryrefslogtreecommitdiff
path: root/test/json/json_generator_test.rb
diff options
context:
space:
mode:
authorJean Boussier <[email protected]>2024-10-17 19:12:58 +0200
committerHiroshi SHIBATA <[email protected]>2024-10-18 11:30:55 +0900
commit8feed977a06aba59d16af48a409ea0b802468c8a (patch)
treec89772f280ca5df34bccc4615565c65bf59dea0a /test/json/json_generator_test.rb
parent20dc1e5c255da87afb3829fa015142f23ee56b57 (diff)
[ruby/json] Assume Encoding is defined
https://github.com/ruby/json/commit/8713aa4812
Diffstat (limited to 'test/json/json_generator_test.rb')
-rwxr-xr-xtest/json/json_generator_test.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/json/json_generator_test.rb b/test/json/json_generator_test.rb
index 2436fa0627..d14966f8d0 100755
--- a/test/json/json_generator_test.rb
+++ b/test/json/json_generator_test.rb
@@ -479,9 +479,7 @@ EOT
end
end
- if defined?(Encoding)
- def test_nonutf8_encoding
- assert_equal("\"5\u{b0}\"", "5\xb0".force_encoding("iso-8859-1").to_json)
- end
+ def test_nonutf8_encoding
+ assert_equal("\"5\u{b0}\"", "5\xb0".force_encoding("iso-8859-1").to_json)
end
end