6th
Sat
RubyGemsのバージョン番号指定の'~>'の意味
RubyGemsを使うときに、たびたびGemのバージョンを指定する機会があります。 '=', '>=', '>' などの等号、不等号は、対応するRubyのオペレータと同じような機能なのでわかりやすいのですが、'~>'についてはどういう意味なのか若干わかりにくい感じです。一応マニュアルにはこんな感じに書かれています。
- = Equals version
- != Not equal to version
- > Greater than version
- < Less than version
- >= Greater than or equal to
- <= Less than or equal to
- ~> Approximat
ely greater than (see "Pessimisti c Version Constraint " below)
'~>' は、悲観的(pessimisti
posted by
genki
on Sat 6 Jun 2009
at 02:04