From: "Eregon (Benoit Daloze)" Date: 2021-12-06T12:56:32+00:00 Subject: [ruby-core:106509] [Ruby master Feature#18376] Version comparison API Issue #18376 has been updated by Eregon (Benoit Daloze). deivid (David Rodr��guez) wrote in #note-24: > I mean, of course, right? What else would you expect? Isn't that the whole point? Not really, I think the whole point is to have a version API without needing to load RubyGems and working even if RubyGems is not loaded (`--disable-gems`, Bundler standalone, etc). The side-effect of breaking any access under `Gem` in some cases is IMHO bad enough that that PR is not worth it. It'll break any `defined?(Gem)` usage, etc. We've had empty YAML, Date and other modules defined in the past, it's really confusing and IMHO should be avoided at all costs. The `version` default gem idea OTOH has none of these problems, so I think that's the way to go for this issue. ---------------------------------------- Feature #18376: Version comparison API https://bugs.ruby-lang.org/issues/18376#change-95169 * Author: vo.x (Vit Ondruch) * Status: Open * Priority: Normal ---------------------------------------- Is there a chance to have version comparison API? For example if `Gem::Version` was extracted into `::Version`. This idea was triggered by this PR [1] and [2], where the `Gem::Version` API is used for comparing Ruby versions. While RubyGems might be available everywhere, it does not look correct to introduce dependencies on RubyGems into libraries which could run without them just fine. [1]: https://github.com/mperham/connection_pool/pull/157 [2]: https://github.com/mperham/connection_pool/issues/158 -- https://bugs.ruby-lang.org/ Unsubscribe: