diff --git a/changelog/fix_an_error_when_using_old_json_gem.md b/changelog/fix_an_error_when_using_old_json_gem.md new file mode 100644 index 00000000000..b36a8f3b448 --- /dev/null +++ b/changelog/fix_an_error_when_using_old_json_gem.md @@ -0,0 +1 @@ +* [#10745](https://github.com/rubocop/rubocop/issues/10745): Require JSON 2.3 or higher to fix an incompatible JSON API error. ([@koic][]) diff --git a/rubocop.gemspec b/rubocop.gemspec index a7c08c3c25d..8716f8236fb 100644 --- a/rubocop.gemspec +++ b/rubocop.gemspec @@ -31,6 +31,7 @@ Gem::Specification.new do |s| 'rubygems_mfa_required' => 'true' } + s.add_runtime_dependency('json', '~> 2.3') s.add_runtime_dependency('parallel', '~> 1.10') s.add_runtime_dependency('parser', '>= 3.1.0.0') s.add_runtime_dependency('rainbow', '>= 2.2.2', '< 4.0')