mperham / connection_pool

Generic connection pooling for Ruby
MIT License
1.63k stars 143 forks source link

Use prerelease aware version comparison #157

Closed deivid-rodriguez closed 2 years ago

deivid-rodriguez commented 2 years ago

The problem is:

irb(main):001:0> "2.7.0.preview1" >= "2.7.0"
=> true
irb(main):002:0> Gem::Version.new("2.7.0.preview1") >= Gem::Version.new("2.7.0")
=> false

This is very minor, and will only solve actual issues when using old prereleases of ruby, which is not great anyways (users should upgrade). But I guess it sets a standard in the code, so that if further checks like this are added in the future, they are done like this, in a way that respects prereleases.

deivid-rodriguez commented 2 years ago

Thanks!

mperham commented 2 years ago

thank you for the polish! always room for improvement.

On Mon, Nov 29, 2021 at 8:25 AM David Rodríguez @.***> wrote:

Thanks!

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/mperham/connection_pool/pull/157#issuecomment-981796632, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAAWX4O4UCPWZZ66MDQN4TUOOSODANCNFSM5IYAGO3Q .