Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions dm-types.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@ Gem::Specification.new do |gem|
gem.require_paths = [ "lib" ]
gem.version = '1.2.2'

# Ruby 3.3 compatibility: the original 1.2.2 gemspec pinned json (~> 1.6) and
# fastercsv (~> 1.5), both unmaintained and incompatible with Ruby 3.x:
# * json 1.8.x fails to resolve cleanly against the modern default json gem
# and forces json_pure 1.8.6 into the bundle (broken on Ruby 3.2+).
# * fastercsv targets Ruby 1.8 only; Ruby 1.9+ ships csv in the stdlib.
# The runtime never uses these directly: json.rb uses multi_json, and csv.rb
# `require 'csv'` (stdlib) first, only falling back to fastercsv on Ruby < 1.9.
# Drop both pins so the bundle can use multi_json + the modern default json gem.
gem.add_runtime_dependency('bcrypt-ruby', '~> 3.0')
gem.add_runtime_dependency('fastercsv', '~> 1.5')
gem.add_runtime_dependency('multi_json', '~> 1.0')
gem.add_runtime_dependency('json', '~> 1.6')
gem.add_runtime_dependency('stringex', '~> 1.4')
gem.add_runtime_dependency('uuidtools', '~> 2.1')
gem.add_runtime_dependency('dm-core', '~> 1.2.0')
Expand Down
5 changes: 4 additions & 1 deletion lib/dm-types/enum.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ def typecast_to_primitive(value)
case flag_map[1]
when ::Symbol then value.to_sym
when ::String then value.to_s
when ::Fixnum then value.to_i
# Fixnum was unified into Integer in Ruby 2.4 and the constant was
# removed in Ruby 3.2; match ::Integer so this `when` clause keeps
# working (every former Fixnum is an Integer).
when ::Integer then value.to_i
else value
end
end
Expand Down