From: "unasuke (Yusuke Nakamura)" Date: 2021-12-03T03:56:42+00:00 Subject: [ruby-core:106438] [Ruby master Feature#18376] Version comparison API Issue #18376 has been updated by unasuke (Yusuke Nakamura). I think it is useful for not just gem authors but also application developers. In my known case of providing an SDK and API as service, version string compare is often used in parsing SDK version string on request from SDK to API server. Gem::Version is commonly used for comparing "semantic version"-ed version string in that situation. Because it can use without any other gem installed. But that is not "Gem". It brings tiny context confusion. If I can use the same function with `::Version`, it's useful. Not that I'm against it, but I am not sure if it's worth introducing this as a standard library because it might require a lot of work to resolve all of the above concerns. ---------------------------------------- Feature #18376: Version comparison API https://bugs.ruby-lang.org/issues/18376#change-95081 * 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: