〜>是什么?捆绑器Gemfile中的符号意思是什么? [英] What does the ~> symbol mean in a bundler Gemfile?

查看:81
本文介绍了〜>是什么?捆绑器Gemfile中的符号意思是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

-> 在Gemfile中的版本号旁边是什么意思?

What does the -> mean next to a version number in a Gemfile?

例如:

gem 'sass-rails',   '~> 3.1.5'


推荐答案

从捆绑商网站:


说明符〜>具有特殊含义,例如以最佳方式显示:

'〜> ; 2.0.3'等于'> = 2.0.3 '和'< 2.1。’

’〜> 2.1'  等于'> = 2.1'  和'< 3.0’

’〜> 2.2.beta’将与‘2.2.beta.12’等预发行版本匹配。

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'.

请参见 https://bundler.io/gemfile.html http:// guides.rubygems.org/patterns/#pessimistic-version-constraint

这篇关于〜&gt;是什么?捆绑器Gemfile中的符号意思是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆