Ruby 版本语法 [英] Ruby version syntax

查看:34
本文介绍了Ruby 版本语法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不同版本的 ruby​​ 的命名语法是什么,我应该倾向于哪种来运行脚本?即,使用 rbenv 我可以安装以下版本的 Ruby 1.9.3:

1.9.3-dev1.9.3-p01.9.3-p1251.9.3-p1941.9.3-p2861.9.3-p3271.9.3-p3621.9.3-p3741.9.3-p3851.9.3-p3921.9.3-p4291.9.3-预览11.9.3-rc1

所以我们有几种不同的类型:

  • 开发
  • p#
  • 预览#
  • rc#

我相信我可以假设 p# 是针对规范的构建修复,preview# 是版本规范的预览和 rc 的前身#,规范的候选版本.所以,这就留下了dev.dev 标记的构建是我应该用于编写脚本的内容还是开发分支?我应该尝试安装最新的 p# 吗?这里的最佳做法是什么?

解决方案

Ruby 使用 semver 来命名版本.>

最佳实践是使用最新的 p# 构建尽可能使您的 ruby​​ 保持最新.

当前版本是 Ruby 2.0.0-p195

如果您因为兼容性原因卡在 1.9.3 中,最新的补丁是 1.9.3-p459.

您可以在 Ruby 主页

上看到这些版本

What's the naming syntax for different versions of ruby and which should I gravitate towards for running scripts? i.e., using rbenv I can install the following versions of Ruby 1.9.3:

1.9.3-dev
1.9.3-p0
1.9.3-p125
1.9.3-p194
1.9.3-p286
1.9.3-p327
1.9.3-p362
1.9.3-p374
1.9.3-p385
1.9.3-p392
1.9.3-p429
1.9.3-preview1
1.9.3-rc1

So we have several different types:

  • dev
  • p#
  • preview#
  • rc#

I believe I can assume that p# is for build fixes to the spec, preview# is a preview of the version spec and a precursor to rc#, the release candidate of the spec. So, this leaves dev. Is the dev tagged build what I should use for scripting or is it the development branch? And should I try to keep the latest p# installed? What's the best practice here?

解决方案

Ruby uses semver for naming versions.

Best practice is keep your ruby as up-to-date as possible using the latest p# build.

Current version is Ruby 2.0.0-p195

If you're stuck in 1.9.3 for compatibility reasons, the latest patch is 1.9.3-p459.

You can see these versions on the Ruby homepage

这篇关于Ruby 版本语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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