【问题标题】:what does ~> mean in gemspec dependencies? [duplicate]~> 在 gemspec 依赖项中是什么意思? [复制]
【发布时间】:2012-09-08 09:35:22
【问题描述】:

可能重复:
Meaning of tilde-greater-than (~>) in version requirement?

我在 gemspecs 中经常看到这样的东西:

s.add_dependency 'some_gem', '~> 1.5.0'

~>是什么意思?

【问题讨论】:

    标签: ruby gem bundler


    【解决方案1】:

    来自gembundler

    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.
    

    【讨论】:

      猜你喜欢
      • 2018-04-10
      • 2011-08-05
      • 1970-01-01
      • 1970-01-01
      • 2011-07-07
      • 1970-01-01
      • 2019-03-28
      • 2019-04-23
      • 2021-06-07
      相关资源
      最近更新 更多