LoginSignup
8
2

More than 5 years have passed since last update.

Ruby の gem のバージョン指定に利用する ~> の名前に関するまとめ

Posted at

~> とは?

Gemfile や gemspec で依存 gem のバージョン指定をする際に指定される記法。

Ruby's Pessimistic Operator - Giant Robots Smashing into Other Giant Robots

様々な呼び方

  • pessimistic comparison operator
  • twiddle-wakka
  • approximate
  • spermy

ググってみると pessimistic (comparison) operator と呼んでいる人が多い。
RubyGemsのドキュメントでは twiddle-wakka になっている。
RubyGemsのソースコードでは approximate になっている。
approximate に変更する前は spermy になっていた。名前が微妙なので変えたようだ。
まぁ、たしかに見た目は・・・いや、しかし・・・。

成り立ち

Jim Weirich 氏によって >* という書式で追加されたあとに ~> に変更された。
コミットコメントをみると当時は pessimistic operator と名付けていたようだ。

便利ツール

外部資料

8
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
2