Skip to content

Commit

Permalink
Merge pull request afair#60 from afair/60-fix-ruby-32-deprecation
Browse files Browse the repository at this point in the history
NoMethodError when using Ruby 3.2
  • Loading branch information
afair authored Jan 10, 2023
2 parents e6bde82 + 127a456 commit 6f3800f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/postgresql_cursor/cursor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ def column_types
fields.each_with_index do |fname, i|
ftype = @result.ftype i
fmod = @result.fmod i
types[fname] = @connection.get_type_map.fetch(ftype, fmod) do |oid, mod|
warn "unknown OID: #{fname}(#{oid}) (#{sql})"
types[fname] = @connection.get_type_map.fetch(ftype.to_s, fmod) do |oid, mod|
# warn "unknown OID: #{fname}(#{oid}, #{mod}) (#{sql})"
if ::ActiveRecord::VERSION::MAJOR <= 4
::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Identity.new
else
Expand Down

0 comments on commit 6f3800f

Please sign in to comment.