我知道 'mongoid', '~> 3.1.2'
是什么意思。但是如果版本只有一个数字,那是什么意思呢? gem 'mongoid', '~> 4' 是否等于 gem 'mongoid', '>= 4'?
最佳答案
Most of the version specifiers, like >= 1.0, are self-explanatory. The specifier ~> has a special meaning, best shown by example. ~> 2.0.3 is identical to >= 2.0.3 and < 2.1. ~> 2.1 is identical to >= 2.1 and < 3.0. ~> 2.2.beta will match prerelease versions like 2.2.beta.12.
关于ruby-on-rails - gem 'mongoid' , '~> 4' 是否等于 gem 'mongoid' , '>= 4' ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36725347/