diff --git a/dm-serializer.gemspec b/dm-serializer.gemspec index dd058db..7c23fd2 100644 --- a/dm-serializer.gemspec +++ b/dm-serializer.gemspec @@ -15,10 +15,17 @@ Gem::Specification.new do |gem| gem.require_paths = [ "lib" ] gem.version = '1.2.2' - gem.add_runtime_dependency('fastercsv', '~> 1.5') + # Ruby 3.3 compatibility: the original 1.2.2 gemspec pinned json (~> 1.6), + # json_pure (~> 1.6) and fastercsv (~> 1.5). All three are unmaintained and + # incompatible with Ruby 3.x: + # * json/json_pure 1.8.x use a Parser whose #parse arity differs from modern + # JSON, and json_pure 1.8.6 fails to load on Ruby 3.2+ (3-arg Regexp.new etc.). + # * fastercsv targets Ruby 1.8 only; Ruby 1.9+ ships csv in the stdlib. + # The runtime never uses these gems directly: to_json.rb uses multi_json, and + # to_csv.rb does `require 'csv'` (the stdlib) on Ruby >= 1.9. We drop the + # json/json_pure/fastercsv pins and rely on multi_json + the stdlib csv, which + # lets the bundle resolve the modern default json gem instead of json 1.8.6. gem.add_runtime_dependency('multi_json', '~> 1.0') - gem.add_runtime_dependency('json', '~> 1.6') - gem.add_runtime_dependency('json_pure', '~> 1.6') gem.add_runtime_dependency('dm-core', '~> 1.2.0') gem.add_development_dependency('rake', '~> 0.9')