afair / postgresql_cursor

ActiveRecord PostgreSQL Adapter extension for using a cursor to return a large result set
MIT License
612 stars 47 forks source link

Deprecation warnings in Rails 6 #56

Closed aglushkov closed 1 year ago

aglushkov commented 3 years ago

I use #each_instance_batch method to iterate over batches, and when it tries to find column types for postgresql enum columns it warns https://github.com/afair/postgresql_cursor/blob/4bec7faf1612ad9377cd618a91558a81dfdd84b7/lib/postgresql_cursor/cursor.rb#L238

/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract_adapter.rb:698: warning: deprecated Object#=~ is called on Integer; it always returns nil
/gems/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract_adapter.rb:694: warning: deprecated Object#=~ is called on Integer; it always returns nil

ruby -v => ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux] rails -v => Rails 6.0.3.4

jturkel commented 1 year ago

Looks like this has become a NoMethodError in Ruby 3.2 causing the gem not work at all in Ruby 3.2. See #60.

afair commented 1 year ago

Sorry, this issue got lost 😔

I did fix this in #60 today, gem version 0.6.7.