Gem dependencies versions meaning

旧城冷巷雨未停 提交于 2019-12-04 08:06:40

问题


Gem dependency version can be specified with prefixes =, <, >, <=, >= and ~>. I understand all except last one, what does ~> mean?


回答1:


The ~> operator means: match within the same version, depending on how specific you want it to be, here's some examples:

 Specification From  ... To (exclusive)
  ">= 3.0"      3.0   ... &infin;
  "~> 3.0"      3.0   ... 4.0
  "~> 3.0.0"    3.0.0 ... 3.1
  "~> 3.5"      3.5   ... 4.0
  "~> 3.5.0"    3.5.0 ... 3.6

Source



来源:https://stackoverflow.com/questions/3492772/gem-dependencies-versions-meaning

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!