From 74b6f79282366aefcd9f2c6edd4240e72d2871da Mon Sep 17 00:00:00 2001 From: Vagish Date: Wed, 16 Oct 2019 05:39:46 -0400 Subject: [PATCH 0001/1487] Remove the links of Lucent (no longer existing website) --- bg/documentation/success-stories/index.md | 3 +-- de/documentation/success-stories/index.md | 3 +-- en/documentation/success-stories/index.md | 3 +-- fr/documentation/success-stories/index.md | 3 +-- id/documentation/success-stories/index.md | 3 +-- it/documentation/success-stories/index.md | 3 +-- ko/documentation/success-stories/index.md | 3 +-- pl/documentation/success-stories/index.md | 3 +-- pt/documentation/success-stories/index.md | 3 +-- ru/documentation/success-stories/index.md | 3 +-- tr/documentation/success-stories/index.md | 3 +-- vi/documentation/success-stories/index.md | 3 +-- zh_cn/documentation/success-stories/index.md | 3 +-- zh_tw/documentation/success-stories/index.md | 3 +-- 14 files changed, 14 insertions(+), 28 deletions(-) diff --git a/bg/documentation/success-stories/index.md b/bg/documentation/success-stories/index.md index 3b9272afeb..0ac1e98374 100644 --- a/bg/documentation/success-stories/index.md +++ b/bg/documentation/success-stories/index.md @@ -34,7 +34,7 @@ lang: bg #### Телефония -* Ruby се използва в [Lucent][7] за изграждането на 3G безжични +* Ruby се използва в Lucent за изграждането на 3G безжични телефонни продукти. #### Системна Администрация @@ -58,7 +58,6 @@ lang: bg [2]: http://www.motorola.com [3]: http://www.sketchup.com/ [4]: https://www.uhn.ca/TorontoRehab -[7]: http://www.lucent.com/ [8]: http://www.level3.com/ [9]: http://www.basecamphq.com [10]: http://www.37signals.com diff --git a/de/documentation/success-stories/index.md b/de/documentation/success-stories/index.md index 85dd38bc2c..23e00c8aca 100644 --- a/de/documentation/success-stories/index.md +++ b/de/documentation/success-stories/index.md @@ -28,7 +28,7 @@ Projekten, die Ruby nutzen. #### Telephonie -* Ruby wird bei [Lucent][5] in einem 3G Wireless Telefonieprodukt +* Ruby wird bei Lucent in einem 3G Wireless Telefonieprodukt eingesetzt. #### Systemadministration @@ -51,7 +51,6 @@ Projekten, die Ruby nutzen. [1]: http://www.motorola.com [2]: https://www.uhn.ca/TorontoRehab -[5]: http://www.lucent.com/ [6]: http://www.level3.com/ [7]: http://www.basecamphq.com [8]: http://www.37signals.com diff --git a/en/documentation/success-stories/index.md b/en/documentation/success-stories/index.md index f8fd6f395c..297ffc7395 100644 --- a/en/documentation/success-stories/index.md +++ b/en/documentation/success-stories/index.md @@ -33,7 +33,7 @@ you’ll find a small sample of real world usage of Ruby. #### Telephony -* Ruby is being used within [Lucent][7] on a 3G wireless telephony +* Ruby is being used within Lucent on a 3G wireless telephony product. #### System Administration @@ -71,7 +71,6 @@ you’ll find a small sample of real world usage of Ruby. [2]: http://www.motorola.com [3]: http://www.sketchup.com/ [4]: https://www.uhn.ca/TorontoRehab -[7]: http://www.lucent.com/ [8]: http://www.level3.com/ [9]: http://www.basecamphq.com [10]: http://www.37signals.com diff --git a/fr/documentation/success-stories/index.md b/fr/documentation/success-stories/index.md index a21db356be..dea0606593 100644 --- a/fr/documentation/success-stories/index.md +++ b/fr/documentation/success-stories/index.md @@ -36,7 +36,7 @@ témoignages du « monde réel. » #### Téléphonie -* Ruby est utilisé sur un projet de [Lucent][8]\: un téléphone 3G sans +* Ruby est utilisé sur un projet de Lucent\: un téléphone 3G sans fil. #### Administration système @@ -61,7 +61,6 @@ témoignages du « monde réel. » [3]: http://www.motorola.com [4]: http://www.sketchup.com/ [5]: https://www.uhn.ca/TorontoRehab -[8]: http://www.lucent.com/ [9]: http://www.level3.com/ [10]: http://www.basecamphq.com [11]: http://www.37signals.com diff --git a/id/documentation/success-stories/index.md b/id/documentation/success-stories/index.md index 9cf8ff707a..361d405f00 100644 --- a/id/documentation/success-stories/index.md +++ b/id/documentation/success-stories/index.md @@ -36,7 +36,7 @@ kecil contoh dari berbagai penggunaan Ruby di dunia nyata. #### Telekomunikasi -* Ruby digunakan oleh [Lucent][7] pada produk wireless 3G yang mereka +* Ruby digunakan oleh Lucent pada produk wireless 3G yang mereka kembangkan. #### Administrasi Sistem @@ -75,7 +75,6 @@ kecil contoh dari berbagai penggunaan Ruby di dunia nyata. [2]: http://www.motorola.com [3]: http://www.sketchup.com/ [4]: https://www.uhn.ca/TorontoRehab -[7]: http://www.lucent.com/ [8]: http://www.level3.com/ [9]: http://www.basecamphq.com [10]: http://www.37signals.com diff --git a/it/documentation/success-stories/index.md b/it/documentation/success-stories/index.md index d77ca19003..64aedd676a 100644 --- a/it/documentation/success-stories/index.md +++ b/it/documentation/success-stories/index.md @@ -34,7 +34,7 @@ alcuni esempi reali di come viene utilizzato Ruby nel mondo. #### Telefonia -* Ruby viene utilizzato in [Lucent][7] un prodotto telefonico di terza +* Ruby viene utilizzato in Lucent un prodotto telefonico di terza generazione. #### Amministrazione di sistema @@ -68,7 +68,6 @@ alcuni esempi reali di come viene utilizzato Ruby nel mondo. [2]: http://www.motorola.com [3]: http://www.sketchup.com/ [4]: https://www.uhn.ca/TorontoRehab -[7]: http://www.lucent.com/ [8]: http://www.level3.com/ [9]: http://www.basecamphq.com [10]: http://www.37signals.com diff --git a/ko/documentation/success-stories/index.md b/ko/documentation/success-stories/index.md index bbe58f8fd7..9c51ca88f3 100644 --- a/ko/documentation/success-stories/index.md +++ b/ko/documentation/success-stories/index.md @@ -33,7 +33,7 @@ lang: ko #### 전화 -* 루비는 3G 무선 전화 제품인 [Lucent][7]에서도 사용됩니다. +* 루비는 3G 무선 전화 제품인 Lucent에서도 사용됩니다. #### 시스템 관리 @@ -67,7 +67,6 @@ lang: ko [2]: http://www.motorola.com [3]: http://www.sketchup.com/ [4]: https://www.uhn.ca/TorontoRehab -[7]: http://www.lucent.com/ [8]: http://www.level3.com/ [9]: http://www.basecamphq.com [10]: http://www.37signals.com diff --git a/pl/documentation/success-stories/index.md b/pl/documentation/success-stories/index.md index a8864070fc..12b7e57229 100644 --- a/pl/documentation/success-stories/index.md +++ b/pl/documentation/success-stories/index.md @@ -30,7 +30,7 @@ Rubiego w rzeczywistości. #### Telefonia -* [Lucent][7] używa Rubiego w swoim produkcie telefonii bezprzewodowej +* Lucent używa Rubiego w swoim produkcie telefonii bezprzewodowej 3G. #### Administracja Systemami @@ -77,7 +77,6 @@ Rubiego w rzeczywistości. [2]: http://www-106.ibm.com/developerworks/linux/library/l-oslab/ [3]: http://www.motorola.com [4]: https://www.uhn.ca/TorontoRehab -[7]: http://www.lucent.com/ [8]: http://www.level3.com/ [9]: http://www.basecamphq.com [10]: http://www.37signals.com diff --git a/pt/documentation/success-stories/index.md b/pt/documentation/success-stories/index.md index bd06467200..94120a6602 100644 --- a/pt/documentation/success-stories/index.md +++ b/pt/documentation/success-stories/index.md @@ -34,7 +34,7 @@ Aqui você encontrará uma pequena amostra do uso de Ruby no mundo real. #### Telefonia -* Ruby está sendo utilizado na [Lucent][7] num produto de telefonia +* Ruby está sendo utilizado na Lucent num produto de telefonia 3G wireless. #### Administração de Sistemas @@ -70,7 +70,6 @@ Aqui você encontrará uma pequena amostra do uso de Ruby no mundo real. [2]: http://www.motorola.com [3]: http://www.sketchup.com/ [4]: https://www.uhn.ca/TorontoRehab -[7]: http://www.lucent.com/ [8]: http://www.level3.com/ [9]: http://www.basecamphq.com [10]: http://www.37signals.com diff --git a/ru/documentation/success-stories/index.md b/ru/documentation/success-stories/index.md index e08e4afc15..710a6e905d 100644 --- a/ru/documentation/success-stories/index.md +++ b/ru/documentation/success-stories/index.md @@ -36,7 +36,7 @@ lang: ru #### Телефония -* Ruby используется в [Lucent][7], в их 3G беспроводном телефонном +* Ruby используется в Lucent, в их 3G беспроводном телефонном продукте. #### Системное администрирование @@ -72,7 +72,6 @@ lang: ru [2]: http://www.motorola.com [3]: http://www.sketchup.com/ [4]: https://www.uhn.ca/TorontoRehab -[7]: http://www.lucent.com/ [8]: http://www.level3.com/ [9]: http://www.basecamphq.com [10]: http://www.37signals.com diff --git a/tr/documentation/success-stories/index.md b/tr/documentation/success-stories/index.md index 784b84b570..1bbb26fdde 100644 --- a/tr/documentation/success-stories/index.md +++ b/tr/documentation/success-stories/index.md @@ -35,7 +35,7 @@ olarak. Burada Ruby’nin gerçek dünyadan örneklerini görebilirsiniz. #### Telefonculuk -* Ruby 3G kablosuz telefonculuk ürünü olan [Lucent][6] içinde +* Ruby 3G kablosuz telefonculuk ürünü olan Lucent içinde kullanılmaya başlandı. #### Sistem Yönetimi @@ -70,7 +70,6 @@ olarak. Burada Ruby’nin gerçek dünyadan örneklerini görebilirsiniz. [1]: http://www.larc.nasa.gov/ [2]: http://www.sketchup.com/ [3]: https://www.uhn.ca/TorontoRehab -[6]: http://www.lucent.com/ [7]: http://www.level3.com/ [8]: http://www.basecamphq.com [9]: http://www.37signals.com diff --git a/vi/documentation/success-stories/index.md b/vi/documentation/success-stories/index.md index 2ac23a78ef..d9b16d76f4 100644 --- a/vi/documentation/success-stories/index.md +++ b/vi/documentation/success-stories/index.md @@ -33,7 +33,7 @@ nó như thứ tiêu khiển. Trong trang này, bạn sẽ tìm thấy những v #### Viễn thông -* Ruby được sử dụng bên trong [Lucent][7] để phát triển các sản phảm viễn thông 3G. +* Ruby được sử dụng bên trong Lucent để phát triển các sản phảm viễn thông 3G. #### Quản lý hệ thống @@ -65,7 +65,6 @@ nó như thứ tiêu khiển. Trong trang này, bạn sẽ tìm thấy những v [2]: http://www.motorola.com [3]: http://www.sketchup.com/ [4]: https://www.uhn.ca/TorontoRehab -[7]: http://www.lucent.com/ [8]: http://www.level3.com/ [9]: http://www.basecamphq.com [10]: http://www.37signals.com diff --git a/zh_cn/documentation/success-stories/index.md b/zh_cn/documentation/success-stories/index.md index f5c8632f4b..51f76cc844 100644 --- a/zh_cn/documentation/success-stories/index.md +++ b/zh_cn/documentation/success-stories/index.md @@ -29,7 +29,7 @@ lang: zh_cn #### 电讯 -* [朗讯][7]一个3G无线电话产品中使用了 Ruby。 +* 朗讯一个3G无线电话产品中使用了 Ruby。 #### 系统管理 @@ -53,7 +53,6 @@ lang: zh_cn [2]: http://www.motorola.com [3]: http://www.sketchup.com/ [4]: https://www.uhn.ca/TorontoRehab -[7]: http://www.lucent.com/ [8]: http://www.level3.com/ [9]: http://www.basecamphq.com [10]: http://www.37signals.com diff --git a/zh_tw/documentation/success-stories/index.md b/zh_tw/documentation/success-stories/index.md index bc0673f82f..3b053af54a 100644 --- a/zh_tw/documentation/success-stories/index.md +++ b/zh_tw/documentation/success-stories/index.md @@ -27,7 +27,7 @@ lang: zh_tw #### 電信 -* Ruby 也被用在 [Lucent][7] 3G無線電信產品中。 +* Ruby 也被用在 Lucent 3G無線電信產品中。 #### 系統管理 @@ -47,7 +47,6 @@ lang: zh_tw [2]: http://www.motorola.com [3]: http://www.sketchup.com/ [4]: https://www.uhn.ca/TorontoRehab -[7]: http://www.lucent.com/ [8]: http://www.level3.com/ [9]: http://www.basecamphq.com [10]: http://www.37signals.com From 8da9be24d7a2c6fb905fcbe0fe9de6b7a0e81095 Mon Sep 17 00:00:00 2001 From: Julio Date: Mon, 21 Oct 2019 10:45:12 -0300 Subject: [PATCH 0002/1487] Translate Ruby 2.4.9 released (pt) --- .../_posts/2019-10-02-ruby-2-4-9-released.md | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 pt/news/_posts/2019-10-02-ruby-2-4-9-released.md diff --git a/pt/news/_posts/2019-10-02-ruby-2-4-9-released.md b/pt/news/_posts/2019-10-02-ruby-2-4-9-released.md new file mode 100644 index 0000000000..d58b736220 --- /dev/null +++ b/pt/news/_posts/2019-10-02-ruby-2-4-9-released.md @@ -0,0 +1,56 @@ +--- +layout: news_post +title: "Lançado Ruby 2.4.9" +author: "usa" +translator: "jcserracampos" +date: 2019-10-02 09:00:00 +0000 +lang: pt +--- + +Ruby 2.4.9 foi lançado. + +Esta versão é um reenpacotamento da 2.4.8 porque o tarball da versão +Ruby 2.4.8 anterior não instalava. +(Veja [[Bug #16197]](https://bugs.ruby-lang.org/issues/16197) em detalhes.) +Essencialmente, não existem mudanças exceto pelo número de versão entre 2.4.8 e 2.4.9. + +Ruby 2.4 está sob o estado de fase de manutenção de segurança, até +o fim de março de 2020. Depois dessa data, manutenção de Ruby 2.4 +será finalizada. Recomendamos que comece a planejar a migração para novas +versões de Ruby, como a 2.6 ou 2.5. + +## Download + +{% assign release = site.data.releases | where: "version", "2.4.9" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Comentário de Versão + +Obrigado a todas as pessoas que ajudaram com esta versão. From df01df65969e31fa4580e820ed0bab24f49b93db Mon Sep 17 00:00:00 2001 From: Julio Date: Tue, 22 Oct 2019 12:02:27 -0300 Subject: [PATCH 0003/1487] Translate CVE-2019-16201 (pt) --- ...ck-regexp-digestauth-dos-cve-2019-16201.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 pt/news/_posts/2019-10-01-webrick-regexp-digestauth-dos-cve-2019-16201.md diff --git a/pt/news/_posts/2019-10-01-webrick-regexp-digestauth-dos-cve-2019-16201.md b/pt/news/_posts/2019-10-01-webrick-regexp-digestauth-dos-cve-2019-16201.md new file mode 100644 index 0000000000..d005a7a743 --- /dev/null +++ b/pt/news/_posts/2019-10-01-webrick-regexp-digestauth-dos-cve-2019-16201.md @@ -0,0 +1,33 @@ +--- +layout: news_post +title: "CVE-2019-16201: Regular Expression Denial of Service vulnerability of WEBrick's Digest access authentication" +author: "mame" +translator: "jcserracampos" +date: 2019-10-01 11:00:00 +0000 +tags: security +lang: pt +--- + +Foi encontrada uma vulnerabilidade de negação de serviço de expressão regular no módulo de autenticação do WEBrick. Uma pessoa atacante pode explorar essa vulnerabilidade para causar uma negação de serviço efetiva contra um serviço WEBrick. + +[CVE-2019-16201](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-16201) foi designado para essa vulnerabilidade. + +Todas as pessoas usuárias de qualquer versão afetada devem atualizar assim que possível. + +## Versões Afetadas + +* Todas as versões Ruby 2.3 ou anteriores +* Ruby 2.4 series: Ruby 2.4.7 ou anteriores +* Ruby 2.5 series: Ruby 2.5.6 ou anteriores +* Ruby 2.6 series: Ruby 2.6.4 ou anteriores +* Ruby 2.7.0-preview1 +* antes do commit 36e057e26ef2104bc2349799d6c52d22bb1c7d03 + +## Reconhecimento + +Obrigado a [358](https://hackerone.com/358) por descobrir este problema. + +## Histórico + +* Originalmente publicado em 2019-10-01 11:00:00 (UTC) +* Traduzido para o português em 2019-10-21 11:00:00 (GMT-0300) From 3e4ce193432446c2a0610face701c2375ee8f0bd Mon Sep 17 00:00:00 2001 From: Fumiya Shibusawa Date: Tue, 7 Jan 2020 15:27:45 +0900 Subject: [PATCH 0004/1487] feat: add ja translation for community guideline page --- ja/conduct/index.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 ja/conduct/index.md diff --git a/ja/conduct/index.md b/ja/conduct/index.md new file mode 100644 index 0000000000..05de7bfc5b --- /dev/null +++ b/ja/conduct/index.md @@ -0,0 +1,15 @@ +--- +layout: page +title: "Rubyコミュニティの行動規範ガイドライン" +lang: ja +--- + +Ruby開発者のコミュニティにおける安全かつ生産的なコラボレーションのため、以下の行動規範ガイドラインを用意しています。なお、これらはPostgreSQLの行動規範のドラフトを参考にしています。Rubyに関係するコミュニティ(カンファレンスなど)などで行動規範をつくる際にここから目的に沿うものを取っていただいて構いません。 +{: .summary} + +このドキュメントは、Rubyコミュニティに貢献したいと思うすべての人々にとって安全で生産的かつ協力的で互いに敬意を払える場所を提供するためのものです。コミュニティでコミュニケーションをする場(メーリングリスト、パッチの提出、commitのコメントなど)などすべてで適用されます。 + + * 参加者は、自身とは異なる意見、考えにも寛容な態度を示します。 + * 参加者は個人に対する攻撃や誹謗中傷などを示す発言・行動がないことを保証します。 + * 他の参加者の言葉や行動を解釈する際、それらが常に善意に基づくものだという前提に立ちます。 + * 合理的に考えてそれがハラスメントだとみなされる振る舞いは許容しません。 From 8ae349b56f7387677ab8b9c5183bebf4d02ea2cd Mon Sep 17 00:00:00 2001 From: hachi8833 Date: Wed, 22 Jan 2020 12:35:17 +0900 Subject: [PATCH 0005/1487] Add en doc --- ...ional-and-keyword-arguments-in-ruby-3-0.md | 355 ++++++++++++++++++ 1 file changed, 355 insertions(+) create mode 100644 ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md diff --git a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md new file mode 100644 index 0000000000..44cd874cc1 --- /dev/null +++ b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -0,0 +1,355 @@ +--- +layout: news_post +title: "Separation of positional and keyword arguments in Ruby 3.0" +author: "mame" +translator: +date: 2019-12-12 12:00:00 +0000 +lang: en +--- + +This article explains the planned incompatibility of keyword arguments in Ruby 3.0 + +## tl;dr + +In Ruby 3.0, positional arguments and keyword arguments will be separated. Ruby 2.7 will warn for behaviors that will change in Ruby 3.0. If you see the following warnings, you need to update your code: + +* `Using the last argument as keyword parameters is deprecated`, or +* `Passing the keyword argument as the last hash parameter is deprecated`, or +* `Splitting the last argument into positional and keyword parameters is deprecated` + +In most cases, you can avoid the incompatibility by adding the _double splat_ operator. It explicitly specifies passing keyword arguments instead of a `Hash` object. Likewise, you may add braces `{}` to explicitly pass a `Hash` object, instead of keyword arguments. Read the section "Typical cases" below for more details. + +In Ruby 3, a method delegating all arguments must explicitly delegate keyword arguments in addition to positional arguments. If you want to keep the delegation behavior found in Ruby 2.7 and earlier, use `ruby2_keywords`. See the "Handling argument delegation" section below for more details. + +## Typical cases + +Here is the most typical case. You can use double splat operator (`**`) to pass keywords instead of a Hash. + +{% highlight ruby %} +# This method accepts only a keyword argument +def foo(k: 1) + p k +end + +h = { k: 42 } + +# This method call passes a positional Hash argument +# In Ruby 2.7: The Hash is automatically converted to a keyword argument +# In Ruby 3.0: This call raises an ArgumentError +foo(h) + # => demo.rb:11: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call + # demo.rb:2: warning: The called method `foo' is defined here + # 42 + +# If you want to keep the behavior in Ruby 3.0, use double splat +foo(**h) #=> 42 +{% endhighlight %} + +Here is another case. You can use braces (`{}`) to pass a Hash instead of keywords explicitly. + +{% highlight ruby %} +# This method accepts one positional argument and a keyword rest argument +def bar(h, **kwargs) + p h +end + +# This call passes only a keyword argument and no positional arguments +# In Ruby 2.7: The keyword is converted to a positional Hash argument +# In Ruby 3.0: This call raises an ArgumentError +bar(k: 42) + # => demo2.rb:9: warning: Passing the keyword argument as the last hash parameter is deprecated + # demo2.rb:2: warning: The called method `bar' is defined here + # {:k=>42} + +# If you want to keep the behavior in Ruby 3.0, write braces to make it an +# explicit Hash +bar({ k: 42 }) # => {:k=>42} +{% endhighlight %} + +## What is deprecated? + +In Ruby 2, keyword arguments can be treated as the last positional Hash argument and a last positional Hash argument can be treated as keyword arguments. + +Because the automatic conversion is sometimes too complex and troublesome as described in the final section. So it's now deprecated in Ruby 2.7 and will be removed in Ruby 3. In other words, keyword arguments will be completely separated from positional one in Ruby 3. So when you want to pass keyword arguments, you should always use `foo(k: expr)` or `foo(**expr)`. If you want to accept keyword arguments, in principle you should always use `def foo(k: default)` or `def foo(k:)` or `def foo(**kwargs)`. + +Note that Ruby 3.0 doesn't behave differently when calling a method which doesn't accept keyword arguments with keyword arguments. For instance, the following case is not going to be deprecated and will keep working in Ruby 3.0. The keyword arguments are still treated as a positional Hash argument. + +{% highlight ruby %} +def foo(kwargs = {}) + kwargs +end + +foo(k: 1) #=> {:k=>1} +{% endhighlight %} + +This is because this style is used very frequently, and there is no ambiguity in how the argument should be treated. Prohibiting this conversion would result in additional incompatibility for little benefit. + +However, this style is not recommended in new code, unless you are often passing a Hash as a positional argument, and are also using keyword arguments. Otherwise, use double splat: + +{% highlight ruby %} +def foo(**kwargs) + kwargs +end + +foo(k: 1) #=> {:k=>1} +{% endhighlight %} + +## Will my code break on Ruby 2.7? + +A short answer is "maybe not". + +The changes in Ruby 2.7 are designed as a migration path towards 3.0. While in principle, Ruby 2.7 only warns against behaviors that will change in Ruby 3, it includes some incompatible changes we consider to be minor. See the "Other minor changes" section for details. + +Except for the warnings and minor changes, Ruby 2.7 attempts to keep the compatibility with Ruby 2.6. So, your code will probably work on Ruby 2.7, though it may emit warnings. And by running it on Ruby 2.7, you can check if your code is ready for Ruby 3.0. + +If you want to disable the deprecation warnings, please use a command-line argument `-W:no-deprecated` or add `Warning[:deprecated] = false` to your code. + +## Handling argument delegation + +### Ruby 2.6 or prior + +In Ruby 2, you can write a delegation method by accepting a `*rest` argument and a `&block` argument, and passing the two to the target method. In this behavior, the keyword arguments are also implicitly handled by the automatic conversion between positional and keyword arguments. + +{% highlight ruby %} +def foo(*args, &block) + target(*args, &block) +end +{% endhighlight %} + +### Ruby 3 + +You need to explicitly delegate keyword arguments. + +{% highlight ruby %} +def foo(*args, **kwargs, &block) + target(*args, **kwargs, &block) +end +{% endhighlight %} + +Alternatively, if you do not need compatibility with Ruby 2.6 or prior and you don't alter any arguments, you can use the new delegation syntax (`...`) that is introduced in Ruby 2.7. + +{% highlight ruby %} +def foo(...) + target(...) +end +{% endhighlight %} + +### Ruby 2.7 + +In short: use `Module#ruby2_keywords` and delegate `*args, &block`. + +{% highlight ruby %} +ruby2_keywords def foo(*args, &block) + target(*args, &block) +end +{% endhighlight %} + +`ruby2_keywords` accepts keyword arguments as the last Hash argument, and passes it as keyword arguments when calling the other method. + +In fact, Ruby 2.7 allows the new style of delegation in many cases. However, there is a known corner case. See the next section. + +### A compatible delegation that works on Ruby 2.6, 2.7 and Ruby 3 + +In short: use `Module#ruby2_keywords` again. + +{% highlight ruby %} +ruby2_keywords def foo(*args, &block) + target(*args, &block) +end +{% endhighlight %} + +Unfortunately, we need to use the old-style delegation (i.e., no `**kwargs`) because Ruby 2.6 or prior does not handle the new delegation style correctly. This is one of the reasons of the keyword argument separation; the details are described in the final section. And `ruby2_keywords` allows you to run the old style even in Ruby 2.7 and 3.0. As there is no `ruby2_keywords` defined in 2.6 or prior, please use the [ruby2_keywords gem](https://rubygems.org/gems/ruby2_keywords) or define it yourself: + +{% highlight ruby %} +def ruby2_keywords(*) +end if RUBY_VERSION < "2.7" +{% endhighlight %} + +--- + +If your code doesn't have to run on Ruby 2.6 or older, you may try the new style in Ruby 2.7. In almost all cases, it works. Note that, however, there are unfortunate corner cases as follows: + +{% highlight ruby %} +def target(*args) + p args +end + +def foo(*args, **kwargs, &block) + target(*args, **kwargs, &block) +end + +foo({}) #=> Ruby 2.7: [] ({} is dropped) +foo({}, **{}) #=> Ruby 2.7: [{}] (You can pass {} by explicitly passing "no" keywords) +{% endhighlight %} + +An empty Hash argument is automatically converted and absorbed into `**kwargs`, and the delegation call removes the empty keyword hash, so no argument is passed to `target`. As far as we know, this is the only corner case. + +As noted in the last line, you can work around this issue by using `**{}`. + +If you really worry about the portability, use `ruby2_keywords`. (Acknowledge that Ruby 2.6 or before themselves have tons of corner cases in keyword arguments. :-) +`ruby2_keywords` might be removed in the future after Ruby 2.6 reaches end-of-life. At that point, we recommend to explicitly delegate keyword arguments (see Ruby 3 code above). + +## Other minor changes + +There are three minor changes about keyword arguments in Ruby 2.7. + +### 1. Non-Symbol keys are allowed in keyword arguments + +In Ruby 2.6 or before, only Symbol keys were allowed in keyword arguments. In Ruby 2.7, keyword arguments can use non-Symbol keys. + +{% highlight ruby %} +def foo(**kwargs) + kwargs +end +foo("key" => 42) + #=> Ruby 2.6 or before: ArgumentError: wrong number of arguments + #=> Ruby 2.7 or later: {"key"=>42} +{% endhighlight %} + +If a method accepts both optional and keyword arguments, the Hash object that has both Symbol keys and non-Symbol keys was split in two in Ruby 2.6. In Ruby 2.7, both are accepted as keywords because non-Symbol keys are allowed. + +{% highlight ruby %} +def bar(x=1, **kwargs) + p [x, kwargs] +end + +bar("key" => 42, :sym => 43) + #=> Ruby 2.6: [{"key"=>42}, {:sym=>43}] + #=> Ruby 2.7: [1, {"key"=>42, :sym=>43}] + +# Use braces to keep the behavior +bar({"key" => 42}, :sym => 43) + #=> Ruby 2.6 and 2.7: [{"key"=>42}, {:sym=>43}] +{% endhighlight %} + +Ruby 2.7 still splits hashes with a warning if passing a Hash or keyword arguments with both Symbol and non-Symbol keys to a method that accepts explicit keywords but no keyword rest argument (`**kwargs`). This behavior will be removed in Ruby 3, and an `ArgumentError` will be raised. + +{% highlight ruby %} +def bar(x=1, sym: nil) + p [x, sym] +end + +bar("key" => 42, :sym => 43) +# Ruby 2.6 and 2.7: => [{"key"=>42}, 43] +# Ruby 2.7: warning: Splitting the last argument into positional and keyword parameters is deprecated +# warning: The called method `bar' is defined here +# Ruby 3.0: ArgumentError +{% endhighlight %} + +### 2. Double splat with an empty hash (`**{}`) passes no arguments + +In Ruby 2.6 or before, passing `**empty_hash` passes an empty Hash as a positional argument. In Ruby 2.7 or later, it passes no arguments. + +{% highlight ruby %} +def foo(*args) + args +end + +empty_hash = {} +foo(**empty_hash) + #=> Ruby 2.6 or before: [{}] + #=> Ruby 2.7 or later: [] +{% endhighlight %} + +Note that `foo(**{})` passes nothing in both Ruby 2.6 and 2.7. In Ruby 2.6 and before, `**{}` is removed by the parser, and in Ruby 2.7 and above, it is treated the same as `**empty_hash`, allowing for an easy way to pass no keyword arguments to a method. + +In Ruby 2.7, when calling a method with an insufficient number of required positional arguments, `foo(**empty_hash)` passes an empty hash with a warning emitted, for compatibility with Ruby 2.6. This behavior will be removed in 3.0. + +{% highlight ruby %} +def foo(x) + x +end + +empty_hash = {} +foo(**empty_hash) + #=> Ruby 2.6 or before: {} + #=> Ruby 2.7: warning: Passing the keyword argument as the last hash parameter is deprecated + # warning: The called method `foo' is defined here + #=> Ruby 3.0: ArgumentError: wrong number of arguments +{% endhighlight %} + +### 3. The no-keyword-arguments syntax (`**nil`) is introduced + +You can use `**nil` in a method definition to explicitly mark the method accepts no keyword arguments. Calling such methods with keyword arguments will result in an `ArgumentError`. (This is actually a new feature, not an incompatibility) + +{% highlight ruby %} +def foo(*args, **nil) +end + +foo(k: 1) + #=> Ruby 2.7 or later: no keywords accepted (ArgumentError) +{% endhighlight %} + +This is useful to make it explicit that the method does not accept keyword arguments. Otherwise, the keywords are absorbed in the rest argument in the above example. If you extend a method to accept keyword arguments, the method may have incompatibility as follows: + +{% highlight ruby %} +# If a method accepts rest argument and no `**nil` +def foo(*args) + p args +end + +# Passing keywords are converted to a Hash object (even in Ruby 3.0) +foo(k: 1) #=> [{:k=>1}] + +# If the method is extended to accept a keyword +def foo(*args, mode: false) + p args +end + +# The existing call may break +foo(k: 1) #=> ArgumentError: unknown keyword k +{% endhighlight %} + +## Why we're deprecating the automatic conversion + +The automatic conversion initially appeared to be a good idea, and worked well in many cases. However, it had too many corner cases, and we have received many bug reports about the behavior. + +Automatic conversion does not work well when a method accepts optional positional arguments and keyword arguments. Some people expect the last Hash object to be treated as a positional argument, and others expect it to be converted to keyword arguments. + +Here is one of the most confusing cases: + +{% highlight ruby %} +def foo(x, **kwargs) + p [x, kwargs] +end + +def bar(x=1, **kwargs) + p [x, kwargs] +end + +foo({}) => [{}, {}] +bar({}) => [1, {}] + +bar({}, **{}) => expected: [{}, {}], actual: [1, {}] +{% endhighlight %} + +In Ruby 2, `foo({})` passes an empty hash as a normal argument (i.e., `{}` is assigned to `x`), while `bar({})` passes a keyword argument (i.e, `{}` is assigned to `kwargs`). So `any_method({})` is very ambiguous. + +You may think of `bar({}, **{})` to pass the empty hash to `x` explicitly. Surprisingly, it does not work as you expected; it still prints `[1, {}]` in Ruby 2.6. This is because `**{}` is ignored by the parser in Ruby 2.6, and the first argument `{}` is automatically converted to keywords (`**kwargs`). In this case, you need to call `bar({}, {})`, which is very weird. + +The same issues also apply to methods that accept rest and keyword arguments. This makes explicit delegation of keyword arguments not work. + +{% highlight ruby %} +def target(*args) + p args +end + +def foo(*args, **kwargs, &block) + target(*args, **kwargs, &block) +end + +foo() #=> Ruby 2.6 or before: [{}] + #=> Ruby 2.7 or later: [] +{% endhighlight %} + +`foo()` passes no arguments, but `target` receives an empty hash argument in Ruby 2.6. This is because the method `foo` delegates keywords (`**kwargs`) explicitly. When `foo()` is called, `args` is an empty Array, `kwargs` is an empty Hash, and `block` is `nil`. And then `target(*args, **kwargs, &block)` passes an empty Hash as an argument because `**kwargs` is automatically converted to a positional Hash argument. + +The automatic conversion not only confuses people but also makes the method less extensible. See [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) for more details about the reasons for the change in behavior, and why certain implementation choices were made. + +## Acknowledgment + +This article was kindly reviewed (or even co-authored) by Jeremy Evans and Benoit Daloze. + +## History + +* Updated 2019-12-25: In 2.7.0-rc2, the warning message was slightly changed, and an API to suppress the warnings was added. From a883bdda941814ffb08f6c1156453f8859655863 Mon Sep 17 00:00:00 2001 From: hachi8833 Date: Wed, 22 Jan 2020 12:35:47 +0900 Subject: [PATCH 0006/1487] Translate "Separation of positional and keyword arguments in Ruby 3.0" --- ...ional-and-keyword-arguments-in-ruby-3-0.md | 195 +++++++++--------- 1 file changed, 99 insertions(+), 96 deletions(-) diff --git a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md index 44cd874cc1..5e80e231d5 100644 --- a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md +++ b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -2,77 +2,81 @@ layout: news_post title: "Separation of positional and keyword arguments in Ruby 3.0" author: "mame" -translator: +translator: "hachi8833" date: 2019-12-12 12:00:00 +0000 -lang: en +lang: ja --- -This article explains the planned incompatibility of keyword arguments in Ruby 3.0 +本記事では、Ruby 3.0で予定されているキーワード引数の非互換性について解説します。 -## tl;dr +## 概要 -In Ruby 3.0, positional arguments and keyword arguments will be separated. Ruby 2.7 will warn for behaviors that will change in Ruby 3.0. If you see the following warnings, you need to update your code: +Ruby 3.0では、位置引数とキーワード引数が分離されます。Ruby 3.0で変更される振る舞いはRuby 2.7でwarningを表示します。以下のいずれかのwarningが表示される場合は、コードのアップデートが必要です。 * `Using the last argument as keyword parameters is deprecated`, or * `Passing the keyword argument as the last hash parameter is deprecated`, or * `Splitting the last argument into positional and keyword parameters is deprecated` -In most cases, you can avoid the incompatibility by adding the _double splat_ operator. It explicitly specifies passing keyword arguments instead of a `Hash` object. Likewise, you may add braces `{}` to explicitly pass a `Hash` object, instead of keyword arguments. Read the section "Typical cases" below for more details. +この非互換性は、double splat演算子(`**`)を追加することでほぼ回避できます。これにより、`Hash`オブジェクトではなくキーワード引数を渡すことが明示的に指定されます。同様に、キーワード引数ではなく`Hash`オブジェクトを明示的に渡したい場合は中かっこ(`{}`)を追加できます。詳しくは後述の「典型的なケース」をご覧ください。 -In Ruby 3, a method delegating all arguments must explicitly delegate keyword arguments in addition to positional arguments. If you want to keep the delegation behavior found in Ruby 2.7 and earlier, use `ruby2_keywords`. See the "Handling argument delegation" section below for more details. +Ruby 3では、すべての引数を委譲するメソッドで、位置引数の他に必ずキーワード引数も明示的に委譲しなければなりません。Ruby 2.7以前の委譲の振る舞いを変えたくない場合は、`ruby2_keywords`をお使いください。詳しくは後述の「引数の委譲の扱いについて」をご覧ください。 -## Typical cases +## よくあるケース -Here is the most typical case. You can use double splat operator (`**`) to pass keywords instead of a Hash. +以下はもっともよくあるケースです。Hashではなくキーワードを渡すのにdouble splat演算子(`**`)を使えます。 {% highlight ruby %} -# This method accepts only a keyword argument +# このメソッドはキーワード引数のみを受け取る def foo(k: 1) p k end h = { k: 42 } -# This method call passes a positional Hash argument -# In Ruby 2.7: The Hash is automatically converted to a keyword argument -# In Ruby 3.0: This call raises an ArgumentError +# このメソッド呼び出しは位置引数としてHashを渡している +# Ruby 2.7: このHashは自動でキーワード引数に変換される +# Ruby 3.0: この呼び出しはArgumentErrorになる foo(h) # => demo.rb:11: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call # demo.rb:2: warning: The called method `foo' is defined here # 42 -# If you want to keep the behavior in Ruby 3.0, use double splat +# この振る舞いをRuby 3.0で変えたくない場合はdouble splatを用いる foo(**h) #=> 42 {% endhighlight %} -Here is another case. You can use braces (`{}`) to pass a Hash instead of keywords explicitly. +別の例: キーワード引数ではなくHashを明示的に渡す場合は中かっこ(`{}`)を使います。 {% highlight ruby %} -# This method accepts one positional argument and a keyword rest argument +# このメソッドは位置引数を1個、残りはキーワード引数を受け取る def bar(h, **kwargs) p h end -# This call passes only a keyword argument and no positional arguments -# In Ruby 2.7: The keyword is converted to a positional Hash argument -# In Ruby 3.0: This call raises an ArgumentError +# この呼び出しではキーワード引数のみが渡され、位置引数は渡されない +# Ruby 2.7: このキーワード引数は自動でHash引数に変換される +# Ruby 3.0: この呼び出しはArgumentErrorになる bar(k: 42) # => demo2.rb:9: warning: Passing the keyword argument as the last hash parameter is deprecated # demo2.rb:2: warning: The called method `bar' is defined here # {:k=>42} -# If you want to keep the behavior in Ruby 3.0, write braces to make it an -# explicit Hash +# この振る舞いをRuby 3.0で変えたくない場合は +# 中かっこで明示的にHashにする bar({ k: 42 }) # => {:k=>42} {% endhighlight %} -## What is deprecated? +## どの動作が非推奨になるか -In Ruby 2, keyword arguments can be treated as the last positional Hash argument and a last positional Hash argument can be treated as keyword arguments. +Ruby 2では、キーワード引数が末尾のハッシュ位置引数として扱われることがあります。また、末尾のハッシュ引数がキーワード引数として扱われることもあります。 -Because the automatic conversion is sometimes too complex and troublesome as described in the final section. So it's now deprecated in Ruby 2.7 and will be removed in Ruby 3. In other words, keyword arguments will be completely separated from positional one in Ruby 3. So when you want to pass keyword arguments, you should always use `foo(k: expr)` or `foo(**expr)`. If you want to accept keyword arguments, in principle you should always use `def foo(k: default)` or `def foo(k:)` or `def foo(**kwargs)`. +この自動変換は場合によっては複雑になりすぎてしまい、本記事末尾で後述するようにトラブルの原因になることがあります。そのため、この自動変換をRuby 2.7で非推奨とし、Ruby 3.0で廃止する予定です。言い換えると、Ruby 3.0のキーワード引数は位置引数と完全に分離されることになります。つまり、キーワード引数を渡したい場合は、常に`foo(k: expr)`または`foo(**expr)`の形にすべきです。(メソッド定義で)キーワード引数を受け取りたい場合は、原則として常に以下のいずれかの形にすべきです。 -Note that Ruby 3.0 doesn't behave differently when calling a method which doesn't accept keyword arguments with keyword arguments. For instance, the following case is not going to be deprecated and will keep working in Ruby 3.0. The keyword arguments are still treated as a positional Hash argument. +* `def foo(k: default)` +* `def foo(k:)` +* `def foo(**kwargs)` + +なお、キーワード引数を受け取らないメソッドを呼び出すときにキーワード引数を渡した場合の振る舞いは、Ruby 3.0でも変わらない点にご注意ください。たとえば、以下のケースは非推奨にはならず、Ruby 3.0でも引き続き動作します(このキーワード引数は引き続きHash位置引数として扱われます)。 {% highlight ruby %} def foo(kwargs = {}) @@ -82,9 +86,9 @@ end foo(k: 1) #=> {:k=>1} {% endhighlight %} -This is because this style is used very frequently, and there is no ambiguity in how the argument should be treated. Prohibiting this conversion would result in additional incompatibility for little benefit. +変わらない理由は、このスタイルが非常によく用いられていることと、この呼び出し方法では引数の扱いに曖昧な点がないためです。この振る舞いまで禁止してしまうと、得られるメリットが少ないうえに非互換性がさらに増えてしまいます。 -However, this style is not recommended in new code, unless you are often passing a Hash as a positional argument, and are also using keyword arguments. Otherwise, use double splat: +ただし今後新しいコードを書く場合、このスタイルはおすすめできません(Hashを位置引数として渡す頻度が高く、かつキーワード引数も使う場合を除く)。代わりに、次のようにdouble splat(`**`)をお使いください。 {% highlight ruby %} def foo(**kwargs) @@ -94,21 +98,21 @@ end foo(k: 1) #=> {:k=>1} {% endhighlight %} -## Will my code break on Ruby 2.7? +## Q: 自分のコードはRuby 2.7で動かなくなりますか? -A short answer is "maybe not". +手短かに言うと「壊れない可能性はあります」。 -The changes in Ruby 2.7 are designed as a migration path towards 3.0. While in principle, Ruby 2.7 only warns against behaviors that will change in Ruby 3, it includes some incompatible changes we consider to be minor. See the "Other minor changes" section for details. +Ruby 2.7におけるこの変更は、3.0への移行パスとして設計されています。あくまで原則としてですが、Ruby 2.7ではRuby 3.0で変更される振る舞いについてwarningを出すにとどめており、warningの中には私たちが微細とみなしている変更点も若干含まれます。詳しくは後述の「その他の微細な変更点」をご覧ください。 -Except for the warnings and minor changes, Ruby 2.7 attempts to keep the compatibility with Ruby 2.6. So, your code will probably work on Ruby 2.7, though it may emit warnings. And by running it on Ruby 2.7, you can check if your code is ready for Ruby 3.0. +Ruby 2.7では、warningが表示される点と微細な変更点以外を除いてRuby 2.6との互換性を保とうとしています。つまり、あなたのコードはRuby 2.7でもおそらく動作しますが、warningが表示される可能性はあります。あなたのコードをRuby 2.7で実行すれば、Ruby 3.0の準備ができているかどうかをチェックできます。 -If you want to disable the deprecation warnings, please use a command-line argument `-W:no-deprecated` or add `Warning[:deprecated] = false` to your code. +非推奨のwarningを無効にしたい場合は、コマンドライン引数`-W:no-deprecated`を使うか、コードに`Warning[:deprecated] = false`を追加します。 -## Handling argument delegation +## 引数の委譲の扱いについて -### Ruby 2.6 or prior +### Ruby 2.6以前の場合 -In Ruby 2, you can write a delegation method by accepting a `*rest` argument and a `&block` argument, and passing the two to the target method. In this behavior, the keyword arguments are also implicitly handled by the automatic conversion between positional and keyword arguments. +Ruby 2では、以下のように1個の`*rest`引数と1個の`&block`引数を受け付けて、この2つの引数を委譲先メソッド(以下の`target`)に渡すことで委譲メソッドを書けます。この振る舞いでは、(1つ以上の)キーワード引数も「位置引数<=>キーワード引数の自動変換」によって暗黙的に扱われます。 {% highlight ruby %} def foo(*args, &block) @@ -116,9 +120,9 @@ def foo(*args, &block) end {% endhighlight %} -### Ruby 3 +### Ruby 3の場合 -You need to explicitly delegate keyword arguments. +以下のようにキーワード引数を明示的に委譲する必要があります。 {% highlight ruby %} def foo(*args, **kwargs, &block) @@ -126,7 +130,7 @@ def foo(*args, **kwargs, &block) end {% endhighlight %} -Alternatively, if you do not need compatibility with Ruby 2.6 or prior and you don't alter any arguments, you can use the new delegation syntax (`...`) that is introduced in Ruby 2.7. +別の方法として、Ruby 2.6以前との互換性を考慮する必要がなく、かつ引数を一切改変しないのであれば、以下のようにRuby 2.7で新しく導入される委譲構文(`...`)を利用できます。 {% highlight ruby %} def foo(...) @@ -134,9 +138,9 @@ def foo(...) end {% endhighlight %} -### Ruby 2.7 +### Ruby 2.7の場合 -In short: use `Module#ruby2_keywords` and delegate `*args, &block`. +手短かに言うと、以下のように`Module#ruby2_keywords`を用い、`*args, &block`を委譲します。 {% highlight ruby %} ruby2_keywords def foo(*args, &block) @@ -144,13 +148,13 @@ ruby2_keywords def foo(*args, &block) end {% endhighlight %} -`ruby2_keywords` accepts keyword arguments as the last Hash argument, and passes it as keyword arguments when calling the other method. +`ruby2_keywords`を指定すると、キーワード引数を末尾のHash引数として受け取れるようになり、他のメソッドを呼び出すときにそれをキーワード引数として渡せます。 -In fact, Ruby 2.7 allows the new style of delegation in many cases. However, there is a known corner case. See the next section. +実際、Ruby 2.7では多くの場面でこの新しい委譲のスタイルを利用できます。ただし1つ既知のエッジケースがあります。次をご覧ください。 -### A compatible delegation that works on Ruby 2.6, 2.7 and Ruby 3 +### Ruby 2.6 / 2.7 / 3で互換性のある委譲スタイル -In short: use `Module#ruby2_keywords` again. +手短かに言うと、ここも「`Module#ruby2_keywords`を使う」となります。 {% highlight ruby %} ruby2_keywords def foo(*args, &block) @@ -158,16 +162,16 @@ ruby2_keywords def foo(*args, &block) end {% endhighlight %} -Unfortunately, we need to use the old-style delegation (i.e., no `**kwargs`) because Ruby 2.6 or prior does not handle the new delegation style correctly. This is one of the reasons of the keyword argument separation; the details are described in the final section. And `ruby2_keywords` allows you to run the old style even in Ruby 2.7 and 3.0. As there is no `ruby2_keywords` defined in 2.6 or prior, please use the [ruby2_keywords gem](https://rubygems.org/gems/ruby2_keywords) or define it yourself: +残念ながら、Ruby 2.6以前では新しい委譲スタイルを正しく扱えないため、旧来の委譲スタイル(`**kwargs`を使わないなど)を使う必要があります。これは、キーワード引数を分離した理由のひとつでもあります(詳しくは本記事末尾をご覧ください)。`ruby2_keywords`を用いれば、Ruby 2.7や3.0でも旧来の委譲スタイルを引き続き利用できます。2.6以前のRubyでは`ruby2_keywords`が定義されていないので、[ruby2_keywords](https://rubygems.org/gems/ruby2_keywords) gemを使うか、以下を手動で定義します。 {% highlight ruby %} def ruby2_keywords(*) end if RUBY_VERSION < "2.7" {% endhighlight %} ---- +* * * * * -If your code doesn't have to run on Ruby 2.6 or older, you may try the new style in Ruby 2.7. In almost all cases, it works. Note that, however, there are unfortunate corner cases as follows: +自分のコードがRuby 2.6以前で動かなくても構わないのであれば、Ruby 2.7で新しいスタイルを試してもよいでしょう。ほぼほぼ間違いなく動作しますが、以下のようなエッジケースを運悪く踏むこともあります。 {% highlight ruby %} def target(*args) @@ -178,35 +182,34 @@ def foo(*args, **kwargs, &block) target(*args, **kwargs, &block) end -foo({}) #=> Ruby 2.7: [] ({} is dropped) -foo({}, **{}) #=> Ruby 2.7: [{}] (You can pass {} by explicitly passing "no" keywords) +foo({}) #=> Ruby 2.7: [] ({}を含んでいない) +foo({}, **{}) #=> Ruby 2.7: [{}] ({}を渡せば、キーワード引数が「ない」ことを明示できる) {% endhighlight %} -An empty Hash argument is automatically converted and absorbed into `**kwargs`, and the delegation call removes the empty keyword hash, so no argument is passed to `target`. As far as we know, this is the only corner case. +上のコードでは、空のHash引数が自動的に変換されて`**kwargs`に吸い込まれ、この空のキーワードハッシュは委譲の呼び出しで削除されます。このため、`targe`には引数がまったく渡されなくなります。私たちが把握している範囲では、これが唯一のエッジケースです。 -As noted in the last line, you can work around this issue by using `**{}`. +上のコードの最下部に書いたように、`**{}`を渡すことでこの問題を回避できます。 -If you really worry about the portability, use `ruby2_keywords`. (Acknowledge that Ruby 2.6 or before themselves have tons of corner cases in keyword arguments. :-) -`ruby2_keywords` might be removed in the future after Ruby 2.6 reaches end-of-life. At that point, we recommend to explicitly delegate keyword arguments (see Ruby 3 code above). +移植性がどうしても不安な場合は`ruby2_keywords`をお使いください(Ruby 2.6以前ではキーワード引数周りで膨大なエッジケースが存在していることを知っておいてください)。`ruby2_keywords`は、今後Ruby 2.6が役目を終えたときに削除される可能性があります。現時点で私たちがおすすめできるのは、キーワード引数を明示的に委譲することです(上述のRuby 3向けのコードを参照)。 -## Other minor changes +## その他の微細な変更点 -There are three minor changes about keyword arguments in Ruby 2.7. +Ruby 2.7のキーワード引数では、この他に以下の3つのマイナーチェンジが行われています。 -### 1. Non-Symbol keys are allowed in keyword arguments +### 1\. キーワード引数で非シンボルキーを利用できるようになった -In Ruby 2.6 or before, only Symbol keys were allowed in keyword arguments. In Ruby 2.7, keyword arguments can use non-Symbol keys. +Ruby 2.6以前のキーワード引数では、シンボル形式のキーしか利用できませんでした。Ruby 2.7のキーワード引数では、以下のようにシンボル形式でないキーを利用できるようになります。 {% highlight ruby %} def foo(**kwargs) kwargs end foo("key" => 42) - #=> Ruby 2.6 or before: ArgumentError: wrong number of arguments - #=> Ruby 2.7 or later: {"key"=>42} + #=> Ruby 2.6以前: ArgumentError: wrong number of arguments + #=> Ruby 2.7以降: {"key"=>42} {% endhighlight %} -If a method accepts both optional and keyword arguments, the Hash object that has both Symbol keys and non-Symbol keys was split in two in Ruby 2.6. In Ruby 2.7, both are accepted as keywords because non-Symbol keys are allowed. +あるメソッドがオプション引数とキーワード引数を両方とも受け付ける場合、Ruby 2.6では以下のようにシンボル形式のキーと非シンボルキーを両方持つHashオブジェクトが2つに分割されていました。Ruby 2.7では非シンボルキーを利用できるので、どちらも受け取れます。 {% highlight ruby %} def bar(x=1, **kwargs) @@ -217,12 +220,12 @@ bar("key" => 42, :sym => 43) #=> Ruby 2.6: [{"key"=>42}, {:sym=>43}] #=> Ruby 2.7: [1, {"key"=>42, :sym=>43}] -# Use braces to keep the behavior +# 振る舞いを変えたくない場合は中かっこ{}を使う bar({"key" => 42}, :sym => 43) #=> Ruby 2.6 and 2.7: [{"key"=>42}, {:sym=>43}] {% endhighlight %} -Ruby 2.7 still splits hashes with a warning if passing a Hash or keyword arguments with both Symbol and non-Symbol keys to a method that accepts explicit keywords but no keyword rest argument (`**kwargs`). This behavior will be removed in Ruby 3, and an `ArgumentError` will be raised. +Ruby 2.7では、キーワード引数を明示的に受け付けるがキーワードrest引数(`**kwargs`)を受け取らないメソッドに対して、シンボル形式のキーと非シンボルキーが両方混じったHashやキーワード引数を渡すと、引き続きハッシュを分割して警告を表示します。この振る舞いはRuby 3で廃止されて`ArgumentError`にする予定です。 {% highlight ruby %} def bar(x=1, sym: nil) @@ -230,15 +233,15 @@ def bar(x=1, sym: nil) end bar("key" => 42, :sym => 43) -# Ruby 2.6 and 2.7: => [{"key"=>42}, 43] +# Ruby 2.6と2.7: => [{"key"=>42}, 43] # Ruby 2.7: warning: Splitting the last argument into positional and keyword parameters is deprecated # warning: The called method `bar' is defined here # Ruby 3.0: ArgumentError {% endhighlight %} -### 2. Double splat with an empty hash (`**{}`) passes no arguments +### 2\. double splatを付けた空ハッシュ(`**{}`)で引数を渡さないようになった -In Ruby 2.6 or before, passing `**empty_hash` passes an empty Hash as a positional argument. In Ruby 2.7 or later, it passes no arguments. +Ruby 2.6以前は、`**empty_hash`を渡すと位置引数に空のハッシュが渡されました(`[{}]`)。Ruby 2.7以降では引数を渡さなくなります。 {% highlight ruby %} def foo(*args) @@ -247,13 +250,13 @@ end empty_hash = {} foo(**empty_hash) - #=> Ruby 2.6 or before: [{}] - #=> Ruby 2.7 or later: [] + #=> Ruby 2.6以前: [{}] + #=> Ruby 2.7以降: [] {% endhighlight %} -Note that `foo(**{})` passes nothing in both Ruby 2.6 and 2.7. In Ruby 2.6 and before, `**{}` is removed by the parser, and in Ruby 2.7 and above, it is treated the same as `**empty_hash`, allowing for an easy way to pass no keyword arguments to a method. +なお、`foo(**{})`はRuby 2.6以前とRuby 2.7のどちらの場合も引数を渡さず、`**{}`がパーサーによって削除される点にご注意ください。また、Ruby 2.7以降ではどちらも`**empty_hash`として同じに扱われるので、メソッドにキーワード引数を渡さないようにする指定が楽に行なえます。 -In Ruby 2.7, when calling a method with an insufficient number of required positional arguments, `foo(**empty_hash)` passes an empty hash with a warning emitted, for compatibility with Ruby 2.6. This behavior will be removed in 3.0. +Ruby 2.7では、あるメソッド呼び出しで必須とされる位置引数の個数が不足している場合、Ruby 2.6との互換性を保つために`foo(**empty_hash)`は空のハッシュを渡してwarningを表示します。この振る舞いはRuby 3.0で廃止されます。 {% highlight ruby %} def foo(x) @@ -262,51 +265,51 @@ end empty_hash = {} foo(**empty_hash) - #=> Ruby 2.6 or before: {} + #=> Ruby 2.6以前: {} #=> Ruby 2.7: warning: Passing the keyword argument as the last hash parameter is deprecated # warning: The called method `foo' is defined here #=> Ruby 3.0: ArgumentError: wrong number of arguments {% endhighlight %} -### 3. The no-keyword-arguments syntax (`**nil`) is introduced +### 3\. キーワード引数を受け取らないことを表す構文(`**nil`)が導入される -You can use `**nil` in a method definition to explicitly mark the method accepts no keyword arguments. Calling such methods with keyword arguments will result in an `ArgumentError`. (This is actually a new feature, not an incompatibility) +メソッド定義で`**nil`を用いることで、そのメソッドがキーワード引数を受け取らないことを明示的に示せるようになります。このメソッドを呼び出すときにキーワード引数を渡すと`ArgumentError`が表示されます(これは非互換性ではなく、事実上新機能です)。 {% highlight ruby %} def foo(*args, **nil) end foo(k: 1) - #=> Ruby 2.7 or later: no keywords accepted (ArgumentError) + #=> Ruby 2.7以降: no keywords accepted (ArgumentError) {% endhighlight %} -This is useful to make it explicit that the method does not accept keyword arguments. Otherwise, the keywords are absorbed in the rest argument in the above example. If you extend a method to accept keyword arguments, the method may have incompatibility as follows: +この新構文は、メソッドがキーワード引数を受け取らないことを明示的に指定するのに有用です。これを使わない場合、キーワード引数は上述の例の他の引数に吸い込まれます。メソッドを拡張してキーワード引数を受け取るようにする場合、以下のような非互換性が発生する可能性があります。 {% highlight ruby %} -# If a method accepts rest argument and no `**nil` +# メソッドは残りの引数を受け取るが、`**nil`はない状態 def foo(*args) p args end -# Passing keywords are converted to a Hash object (even in Ruby 3.0) +# キーワード引数はHashオブジェクトに変換される(Ruby 3.0でも同じ) foo(k: 1) #=> [{:k=>1}] -# If the method is extended to accept a keyword +# メソッドがキーワード引数を受け取るよう拡張した場合 def foo(*args, mode: false) p args end -# The existing call may break +# 以下の呼び出しが壊れる可能性がある foo(k: 1) #=> ArgumentError: unknown keyword k {% endhighlight %} -## Why we're deprecating the automatic conversion +## 自動変換を非推奨に変える理由 -The automatic conversion initially appeared to be a good idea, and worked well in many cases. However, it had too many corner cases, and we have received many bug reports about the behavior. +当初、自動変換はうまいアイデアに思われていて、多くの場合問題なく機能していました。しかし、エッジケースがあまりにも多く、これまでこの振る舞いに関するバグレポートを山のように受け取りました。 -Automatic conversion does not work well when a method accepts optional positional arguments and keyword arguments. Some people expect the last Hash object to be treated as a positional argument, and others expect it to be converted to keyword arguments. +自動変換は、オプションの位置引数とキーワード引数をどちらも受け取るメソッドではうまく動きません。末尾のHashオブジェクトを位置引数として扱うことを期待する人々もいれば、末尾のHashオブジェクトをキーワード引数として扱うことを期待する人々もいました。 -Here is one of the most confusing cases: +最も混乱を呼ぶケースのひとつを以下に示します。 {% highlight ruby %} def foo(x, **kwargs) @@ -317,17 +320,17 @@ def bar(x=1, **kwargs) p [x, kwargs] end -foo({}) => [{}, {}] -bar({}) => [1, {}] +foo({}) #=> [{}, {}] +bar({}) #=> [1, {}] -bar({}, **{}) => expected: [{}, {}], actual: [1, {}] +bar({}, **{}) #=> 期待は: [{}, {}]だが実際はl: [1, {}] {% endhighlight %} -In Ruby 2, `foo({})` passes an empty hash as a normal argument (i.e., `{}` is assigned to `x`), while `bar({})` passes a keyword argument (i.e, `{}` is assigned to `kwargs`). So `any_method({})` is very ambiguous. +Ruby 2の場合、`foo({})`は空のハッシュを通常の引数として1つ渡しますが(`x`に`{}`が代入されるなど)、`bar({})`はキーワード引数を1つ渡します(`kwargs`に`{}`が代入されるなど)。つまり、`any_method({})`は極めてあいまいになります。 -You may think of `bar({}, **{})` to pass the empty hash to `x` explicitly. Surprisingly, it does not work as you expected; it still prints `[1, {}]` in Ruby 2.6. This is because `**{}` is ignored by the parser in Ruby 2.6, and the first argument `{}` is automatically converted to keywords (`**kwargs`). In this case, you need to call `bar({}, {})`, which is very weird. +「`bar({}, **{})`は`x`に明示的に空のハッシュを渡すのでは?」と考える人もいるかもしれませんが、驚いたことに、この期待は裏切られます。Ruby 2.6では`[1, {}]`が出力されるのです。理由は、`**{}`がRuby 2.6のパーサーで無視されるのと、1番目の引数`{}`が自動的にキーワード引数(`**kwargs`)に変換されるためです。この場合`bar({}, {})`という形で呼び出す必要がありますが、これではあまりに見苦しくなります。 -The same issues also apply to methods that accept rest and keyword arguments. This makes explicit delegation of keyword arguments not work. +同じ問題は、残りの引数とキーワード引数を受け取るメソッドにも当てはまります。そのせいで、以下のようなキーワード引数の明示的な委譲は動作しません。 {% highlight ruby %} def target(*args) @@ -338,18 +341,18 @@ def foo(*args, **kwargs, &block) target(*args, **kwargs, &block) end -foo() #=> Ruby 2.6 or before: [{}] - #=> Ruby 2.7 or later: [] +foo() #=> Ruby 2.6以前: [{}] + #=> Ruby 2.7以降: [] {% endhighlight %} -`foo()` passes no arguments, but `target` receives an empty hash argument in Ruby 2.6. This is because the method `foo` delegates keywords (`**kwargs`) explicitly. When `foo()` is called, `args` is an empty Array, `kwargs` is an empty Hash, and `block` is `nil`. And then `target(*args, **kwargs, &block)` passes an empty Hash as an argument because `**kwargs` is automatically converted to a positional Hash argument. +`foo()`には引数がありませんが、Ruby 2.6では空のハッシュ引数が`target`に渡されます。理由は、メソッド`foo`が明示的にキーワード(`**kwargs`)を委譲しているためです。`foo()`が呼び出されると、`args`は空のArrayになり、`kwargs`は空のHashになります。そして`target(*args, **kwargs, &block)`は空のHashを引数として1つ渡します。理由は、`**kwargs`が自動的にHash位置引数に変換されるためです。 -The automatic conversion not only confuses people but also makes the method less extensible. See [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) for more details about the reasons for the change in behavior, and why certain implementation choices were made. +自動変換は開発者を混乱させるのみならず、メソッドの拡張性も弱めてしまいます。振る舞いが変更された理由や、特定の実装が選択された理由について詳しくは[Feature #14183](https://bugs.ruby-lang.org/issues/14183)をご覧ください。 -## Acknowledgment +## 謝辞 -This article was kindly reviewed (or even co-authored) by Jeremy Evans and Benoit Daloze. +本記事はJeremy EvansとBenoit Dalozeによる丁寧なレビュー(共著と言ってもよいくらいです)をいただきました。 -## History +## 更新履歴 -* Updated 2019-12-25: In 2.7.0-rc2, the warning message was slightly changed, and an API to suppress the warnings was added. +* 更新 2019-12-25: 2.7.0-rc2でwarningメッセージが若干変更され、warning抑制APIが追加された。 From 14e04bc34672d0e27ba23212213843b764d3ad73 Mon Sep 17 00:00:00 2001 From: hachi8833 Date: Thu, 30 Jan 2020 16:49:40 +0900 Subject: [PATCH 0007/1487] Fix untranslated lines --- ...ation-of-positional-and-keyword-arguments-in-ruby-3-0.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md index 5e80e231d5..b9aec21a12 100644 --- a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md +++ b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -1,6 +1,6 @@ --- layout: news_post -title: "Separation of positional and keyword arguments in Ruby 3.0" +title: "Ruby 3.0における位置引数とキーワード引数の分離について" author: "mame" translator: "hachi8833" date: 2019-12-12 12:00:00 +0000 @@ -13,8 +13,8 @@ lang: ja Ruby 3.0では、位置引数とキーワード引数が分離されます。Ruby 3.0で変更される振る舞いはRuby 2.7でwarningを表示します。以下のいずれかのwarningが表示される場合は、コードのアップデートが必要です。 -* `Using the last argument as keyword parameters is deprecated`, or -* `Passing the keyword argument as the last hash parameter is deprecated`, or +* `Using the last argument as keyword parameters is deprecated` +* `Passing the keyword argument as the last hash parameter is deprecated` * `Splitting the last argument into positional and keyword parameters is deprecated` この非互換性は、double splat演算子(`**`)を追加することでほぼ回避できます。これにより、`Hash`オブジェクトではなくキーワード引数を渡すことが明示的に指定されます。同様に、キーワード引数ではなく`Hash`オブジェクトを明示的に渡したい場合は中かっこ(`{}`)を追加できます。詳しくは後述の「典型的なケース」をご覧ください。 From 3ed7cfbb5d3077b56490e3efe3508dedb467b897 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Thu, 27 Feb 2020 18:23:53 +0900 Subject: [PATCH 0008/1487] Change links to snapshot (en,ja) https://bugs.ruby-lang.org/issues/16630 --- _data/downloads.yml | 26 +++++++++++++++++++++++--- en/downloads/index.md | 6 +++--- ja/downloads/index.md | 6 +++--- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/_data/downloads.yml b/_data/downloads.yml index 0ca05a0fef..d45a86143d 100644 --- a/_data/downloads.yml +++ b/_data/downloads.yml @@ -28,9 +28,29 @@ stable_snapshot: gz: https://cache.ruby-lang.org/pub/ruby/stable-snapshot.tar.gz zip: https://cache.ruby-lang.org/pub/ruby/stable-snapshot.zip +stable_snapshots: + + - branch: ruby_2_7 + url: + gz: https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-ruby_2_7.tar.gz + xz: https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-ruby_2_7.tar.xz + zip: https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-ruby_2_7.zip + + - branch: ruby_2_6 + url: + gz: https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-ruby_2_6.tar.gz + xz: https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-ruby_2_6.tar.xz + zip: https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-ruby_2_6.zip + + - branch: ruby_2_5 + url: + gz: https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-ruby_2_5.tar.gz + xz: https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-ruby_2_5.tar.xz + zip: https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-ruby_2_5.zip + nightly_snapshot: url: - bz2: https://cache.ruby-lang.org/pub/ruby/snapshot.tar.bz2 - gz: https://cache.ruby-lang.org/pub/ruby/snapshot.tar.gz - zip: https://cache.ruby-lang.org/pub/ruby/snapshot.zip + gz: https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-master.tar.gz + xz: https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-master.tar.xz + zip: https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-master.zip diff --git a/en/downloads/index.md b/en/downloads/index.md index 0cc0a44517..a373ef4175 100644 --- a/en/downloads/index.md +++ b/en/downloads/index.md @@ -56,9 +56,9 @@ one of the third party tools mentioned above. They may help you. sha256: {{ release.sha256.gz }}{% endfor %} {% endif %} -* **Snapshots:** - * [Stable Snapshot]({{ site.data.downloads.stable_snapshot.url.gz }}): - This is a tarball of the latest snapshot of the current stable branch. +* **Snapshots:**{% for snapshot in site.data.downloads.stable_snapshots %} + * [Stable Snapshot of {{ snapshot.branch }} branch]({{ snapshot.url.gz }}): + This is a tarball of the latest snapshot of the current `{{ snapshot.branch }}` branch.{% endfor %} * [Nightly Snapshot]({{ site.data.downloads.nightly_snapshot.url.gz }}): This is a tarball of whatever is in Git, made nightly. This may contain bugs or other issues, use at your own risk! diff --git a/ja/downloads/index.md b/ja/downloads/index.md index 1edeec8841..0681e4d508 100644 --- a/ja/downloads/index.md +++ b/ja/downloads/index.md @@ -50,9 +50,9 @@ lang: ja sha256: {{ release.sha256.gz }}{% endfor %} {% endif %} -* **スナップショット:** - * [安定版のスナップショット]({{ site.data.downloads.stable_snapshot.url.gz }}): - 最も新しい現在の安定版ブランチのスナップショットのtarballです。 +* **スナップショット:**{% for snapshot in site.data.downloads.stable_snapshots %} + * [{{ snapshot.branch }}ブランチの安定版スナップショット]({{ snapshot.url.gz }}): + 現在の{{ snapshot.branch }}ブランチのスナップショットのtarballです。{% endfor %} * [ナイトリースナップショット]({{ site.data.downloads.nightly_snapshot.url.gz }}): 毎晩Gitから作成しているtarballです。 バグやその他の問題があるかもしれません。利用する場合は自己責任でお願いします! From 7a4ce3f0fdfeac8e5f747e4ecea93b5ce3d1210b Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Thu, 27 Feb 2020 18:24:38 +0900 Subject: [PATCH 0009/1487] Remove stable_snapshot and use newest stable branch (other languages) - Remove stable_snapshot from `_data/downloads.yml` - Use `stable_snapshots[0]` instead in other languages (I recommend to update translations) - And update `ja/dev/index.md` https://bugs.ruby-lang.org/issues/16630 --- _data/downloads.yml | 11 ++++------- bg/downloads/index.md | 2 +- de/downloads/index.md | 2 +- es/downloads/index.md | 2 +- fr/downloads/index.md | 2 +- id/downloads/index.md | 2 +- it/downloads/index.md | 2 +- ja/dev/index.md | 8 +++++--- ko/downloads/index.md | 2 +- pl/downloads/index.md | 2 +- pt/downloads/index.md | 2 +- ru/downloads/index.md | 2 +- tr/downloads/index.md | 2 +- vi/downloads/index.md | 2 +- zh_cn/downloads/index.md | 2 +- zh_tw/downloads/index.md | 2 +- 16 files changed, 23 insertions(+), 24 deletions(-) diff --git a/_data/downloads.yml b/_data/downloads.yml index d45a86143d..7c389c3b7b 100644 --- a/_data/downloads.yml +++ b/_data/downloads.yml @@ -21,13 +21,6 @@ eol: - 2.3.8 -stable_snapshot: - - url: - bz2: https://cache.ruby-lang.org/pub/ruby/stable-snapshot.tar.bz2 - gz: https://cache.ruby-lang.org/pub/ruby/stable-snapshot.tar.gz - zip: https://cache.ruby-lang.org/pub/ruby/stable-snapshot.zip - stable_snapshots: - branch: ruby_2_7 @@ -35,18 +28,21 @@ stable_snapshots: gz: https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-ruby_2_7.tar.gz xz: https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-ruby_2_7.tar.xz zip: https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-ruby_2_7.zip + version: '2.7' - branch: ruby_2_6 url: gz: https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-ruby_2_6.tar.gz xz: https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-ruby_2_6.tar.xz zip: https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-ruby_2_6.zip + version: '2.6' - branch: ruby_2_5 url: gz: https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-ruby_2_5.tar.gz xz: https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-ruby_2_5.tar.xz zip: https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-ruby_2_5.zip + version: '2.5' nightly_snapshot: @@ -54,3 +50,4 @@ nightly_snapshot: gz: https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-master.tar.gz xz: https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-master.tar.xz zip: https://cache.ruby-lang.org/pub/ruby/snapshot/snapshot-master.zip + version: '2.8' diff --git a/bg/downloads/index.md b/bg/downloads/index.md index 1cde850bc1..f95a45fde8 100644 --- a/bg/downloads/index.md +++ b/bg/downloads/index.md @@ -54,7 +54,7 @@ Ruby може да бъде инсталиран и от изходен код {% endif %} * **Snapshots:** - * [Stable Snapshot]({{ site.data.downloads.stable_snapshot.url.gz }}): + * [Stable Snapshot]({{ site.data.downloads.stable_snapshots[0].url.gz }}): Това е архвирано копие на последната стабилна версия. * [Nightly Snapshot]({{ site.data.downloads.nightly_snapshot.url.gz }}): Това е архивирано копие на последната версия в Git хранилището. diff --git a/de/downloads/index.md b/de/downloads/index.md index 26a1db74e6..6a377266f8 100644 --- a/de/downloads/index.md +++ b/de/downloads/index.md @@ -53,7 +53,7 @@ vielleicht zu einem der oben erwähnten Drittanbieter-Werkzeuge greifen. {% endif %} * **Snapshots:** - * [Stable Snapshot]({{ site.data.downloads.stable_snapshot.url.gz }}): + * [Stable Snapshot]({{ site.data.downloads.stable_snapshots[0].url.gz }}): Hierbei handelt es sich um den neuesten Snapshot des stabilen Zweiges. * [Nightly Snapshot]({{ site.data.downloads.nightly_snapshot.url.gz }}): Hierbei handelt es sich um eine Kopie der Git von letzter Nacht. diff --git a/es/downloads/index.md b/es/downloads/index.md index ebbf40068e..af869e0109 100644 --- a/es/downloads/index.md +++ b/es/downloads/index.md @@ -39,7 +39,7 @@ de ayuda. Ruby {{ site.data.downloads.stable[0] }} * **Snapshots:** - * [Stable Snapshot]({{ site.data.downloads.stable_snapshot.url.gz }}): + * [Stable Snapshot]({{ site.data.downloads.stable_snapshots[0].url.gz }}): Este es el tarball del último snapshot del branch de la versión actual estable. * [Nightly Snapshot]({{ site.data.downloads.nightly_snapshot.url.gz }}): Este es el tarball de lo que exista en Git, hecho diariamente. diff --git a/fr/downloads/index.md b/fr/downloads/index.md index 12eb15ac78..83105ee22d 100644 --- a/fr/downloads/index.md +++ b/fr/downloads/index.md @@ -61,7 +61,7 @@ peut-être vous aider. {% endif %} * **Snapshots:** - * [Stable Snapshot]({{ site.data.downloads.stable_snapshot.url.gz }}): + * [Stable Snapshot]({{ site.data.downloads.stable_snapshots[0].url.gz }}): Archive de la dernière version publiée à partir de la branche stable courante. * [Nightly Snapshot]({{ site.data.downloads.nightly_snapshot.url.gz }}): Archive construite chaque nuit à partir du code le plus récent présent sur Git. diff --git a/id/downloads/index.md b/id/downloads/index.md index b24a5ab8d3..f6a74f4e74 100644 --- a/id/downloads/index.md +++ b/id/downloads/index.md @@ -57,7 +57,7 @@ salah satu kakas bantu pihak ketiga yang telah disebutkan sebelumnya. Itu mungki {% endif %} * **Snapshots:** - * [Stable Snapshot]({{ site.data.downloads.stable_snapshot.url.gz }}): + * [Stable Snapshot]({{ site.data.downloads.stable_snapshots[0].url.gz }}): Ini adalah *tarball* dari *snapshot branch* yang stabil saat ini. * [Nightly Snapshot]({{ site.data.downloads.nightly_snapshot.url.gz }}): Ini adalah *tarball* dari apapun yang ada di Git, *nightly*. diff --git a/it/downloads/index.md b/it/downloads/index.md index 6151d107c9..7fd5c99197 100644 --- a/it/downloads/index.md +++ b/it/downloads/index.md @@ -46,7 +46,7 @@ esserti di aiuto. Ruby {{ site.data.downloads.stable[0] }} * **Snapshots:** - * [Stable Snapshot]({{ site.data.downloads.stable_snapshot.url.gz }}): + * [Stable Snapshot]({{ site.data.downloads.stable_snapshots[0].url.gz }}): Questo è il tarball dell'ultimo snapshot del branch stabile corrente. * [Nightly Snapshot]({{ site.data.downloads.nightly_snapshot.url.gz }}): Questo è il tarball di ciò che c’è in Git, generato giornalmente. diff --git a/ja/dev/index.md b/ja/dev/index.md index 17ca73c181..f33422bc0e 100644 --- a/ja/dev/index.md +++ b/ja/dev/index.md @@ -27,8 +27,10 @@ Rubyの不具合や機能追加の要望などは[Redmine(問題追跡システ 開発中のソースコードを取得できます。 詳しくは[リポジトリガイド](/ja/documentation/repository-guide)のページを参照してください。 -また、毎日、日本時間の午前4時頃に、開発版系列(現在はRuby 2.7)および安定版系列(現在はRuby -2.6)のソースコードのスナップショットを作成しています。 それぞれ、以下のリンクからダウンロードできます。 +また、毎日、日本時間の午後10時頃に、開発版系列(現在はRuby +{{ site.data.downloads.nightly_snapshot.version }})および安定版系列(現在はRuby +{{ site.data.downloads.stable_snapshots[0].version }})のソースコードのスナップショットを作成しています。 +それぞれ、以下のリンクからダウンロードできます。 * [開発版スナップショット][3] * [安定版スナップショット][4] @@ -50,4 +52,4 @@ Posted by usa on 13 Aug 2008 [1]: https://bugs.ruby-lang.org/projects/ruby/wiki [2]: https://bugs.ruby-lang.org/ [3]: {{ site.data.downloads.nightly_snapshot.url.gz }} -[4]: {{ site.data.downloads.stable_snapshot.url.gz }} +[4]: {{ site.data.downloads.stable_snapshots[0].url.gz }} diff --git a/ko/downloads/index.md b/ko/downloads/index.md index 6aebb4273f..f86aa68de6 100644 --- a/ko/downloads/index.md +++ b/ko/downloads/index.md @@ -56,7 +56,7 @@ lang: ko {% endif %} * **스냅숏:** - * [안정 스냅숏]({{ site.data.downloads.stable_snapshot.url.gz }}): + * [안정 스냅숏]({{ site.data.downloads.stable_snapshots[0].url.gz }}): 안정 브랜치의 최신 스냅숏을 tarball로 압축한 것입니다. * [나이틀리 스냅숏]({{ site.data.downloads.nightly_snapshot.url.gz }}): 나이틀리로 제작된 Git 상의 모든 것을 tarball로 압축한 것입니다. diff --git a/pl/downloads/index.md b/pl/downloads/index.md index 7efe00758f..ad9d40467d 100644 --- a/pl/downloads/index.md +++ b/pl/downloads/index.md @@ -42,7 +42,7 @@ skorzystanie z narzędzi osób trzecich wspomnianych powyżej. Mogą ci pomóc. Ruby {{ site.data.downloads.stable[0] }} * **Migawki:** - * [Stabilna migawka]({{ site.data.downloads.stable_snapshot.url.gz }}): + * [Stabilna migawka]({{ site.data.downloads.stable_snapshots[0].url.gz }}): To jest tarball ostatniej migawki stabilnej obecnego stabilnego brancha. * [Nocna migawka]({{ site.data.downloads.nightly_snapshot.url.gz }}): To jest tarball tego co jest w Git, przygotowany diff --git a/pt/downloads/index.md b/pt/downloads/index.md index f6b0638597..748a5b6c98 100644 --- a/pt/downloads/index.md +++ b/pt/downloads/index.md @@ -53,7 +53,7 @@ mencionadas acima. Elas podem te ajudar. {% endif %} * **Snapshots:** - * [Snapshot Estável]({{ site.data.downloads.stable_snapshot.url.gz }}): + * [Snapshot Estável]({{ site.data.downloads.stable_snapshots[0].url.gz }}): Este é um arquivo compactado com o snapshot mais recente do branch estável. * [Nightly Snapshot]({{ site.data.downloads.nightly_snapshot.url.gz }}): Este é um arquivo compactado do que está no Git, criado todas as noites. diff --git a/ru/downloads/index.md b/ru/downloads/index.md index 358229b661..f3f3aa9a61 100644 --- a/ru/downloads/index.md +++ b/ru/downloads/index.md @@ -58,7 +58,7 @@ lang: ru {% endif %} * **Слепки:** - * [Стабильный слепок]({{ site.data.downloads.stable_snapshot.url.gz }}): + * [Стабильный слепок]({{ site.data.downloads.stable_snapshots[0].url.gz }}): Это архив свежайшего слепка текущей стабильной ветки. * [Nightly-слепок]({{ site.data.downloads.nightly_snapshot.url.gz }}): Это архив того, что есть в Git, сделанный ночью. diff --git a/tr/downloads/index.md b/tr/downloads/index.md index c868d087b6..62a4923969 100644 --- a/tr/downloads/index.md +++ b/tr/downloads/index.md @@ -69,7 +69,7 @@ Bunlar size yardımcı olabilir. {% endif %} * **Anlıklar:** - * [Kararlı Anlık]({{ site.data.downloads.stable_snapshot.url.gz }}): + * [Kararlı Anlık]({{ site.data.downloads.stable_snapshots[0].url.gz }}): Bu, şu anki kararlı dalın son anlığının bir tar arşividir. [Gecelik Anlık]({{ site.data.downloads.nightly_snapshot.url.gz }}): Bu, Git'de her ne varsa onun bir tar arşividir, gecelik olarak yapılır. diff --git a/vi/downloads/index.md b/vi/downloads/index.md index 200414e0a1..b44436758b 100644 --- a/vi/downloads/index.md +++ b/vi/downloads/index.md @@ -52,7 +52,7 @@ dụng một trong những công cụ của bên thứ ba đã được đề c {% endif %} * **Snapshots:** - * [Stable Snapshot]({{ site.data.downloads.stable_snapshot.url.gz }}): + * [Stable Snapshot]({{ site.data.downloads.stable_snapshots[0].url.gz }}): Đây là một tarball của snapshot mới nhất của nhánh ổn định hiện hành. * [Nightly Snapshot]({{ site.data.downloads.nightly_snapshot.url.gz }}): Đây là một tarball của mã mới nhất hiện hữu trong Git. Gói này được diff --git a/zh_cn/downloads/index.md b/zh_cn/downloads/index.md index 5bd5354950..cee54a4d00 100644 --- a/zh_cn/downloads/index.md +++ b/zh_cn/downloads/index.md @@ -49,7 +49,7 @@ lang: zh_cn {% endif %} * **快照:** - * [稳定版快照]({{ site.data.downloads.stable_snapshot.url.gz }}):当前稳定版 tarball 的最新快照 + * [稳定版快照]({{ site.data.downloads.stable_snapshots[0].url.gz }}):当前稳定版 tarball 的最新快照 * [每日构建版快照]({{ site.data.downloads.nightly_snapshot.url.gz }}):这是 Git 上的 tarball,每晚构建。可能有问题或 bug,谨慎使用! 更多有关特定发行版本、特别是老旧版本的资讯,请参阅[版本页面][releases]。 diff --git a/zh_tw/downloads/index.md b/zh_tw/downloads/index.md index 17d6579257..c17907cf7d 100644 --- a/zh_tw/downloads/index.md +++ b/zh_tw/downloads/index.md @@ -49,7 +49,7 @@ lang: zh_tw {% endif %} * **快照:** - * [穩定版快照]({{ site.data.downloads.stable_snapshot.url.gz }}): + * [穩定版快照]({{ site.data.downloads.stable_snapshots[0].url.gz }}): 這是當前穩定版本分支的 tarball 的最新快照; * [最新版本]({{ site.data.downloads.nightly_snapshot.url.gz }}): 這是 Git 上的 tarball,每晚更新。 From b1e143910af1d8329f4304548197e5d4348b9d88 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Tue, 31 Mar 2020 22:58:12 +0900 Subject: [PATCH 0010/1487] Japanese translation of en/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md --- ...-heap-exposure-in-socket-cve-2020-10933.md | 2 +- ...-heap-exposure-in-socket-cve-2020-10933.md | 33 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 ja/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md diff --git a/en/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md b/en/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md index 4c8a1abb2f..df0f091436 100644 --- a/en/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md +++ b/en/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md @@ -30,4 +30,4 @@ Thanks to Samuel Williams for discovering this issue. ## History -* Originally published at 2020-03-31 15:00:00 (UTC) +* Originally published at 2020-03-31 12:00:00 (UTC) diff --git a/ja/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md b/ja/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md new file mode 100644 index 0000000000..09db750ad0 --- /dev/null +++ b/ja/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md @@ -0,0 +1,33 @@ +--- +layout: news_post +title: "CVE-2020-10933: socketライブラリのヒープ暴露脆弱性について" +author: "mame" +translator: +date: 2020-03-31 12:00:00 +0000 +lang: ja +--- + +socketライブラリにヒープ暴露の脆弱性が発見されました。 +この脆弱性は [CVE-2020-10933](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10933) として登録されています。 +ユーザのみなさんにはJSON gemを更新することを強くおすすめします。 + +## 詳細 + +`BasicSocket#recv_nonblock` や `BasicSocket#read_nonblock` をサイズやバッファ引数を指定して起動すると、これらのメソッドはまずバッファを指定サイズにリサイズします。操作がブロックする場合には、データを一切コピーせずにリターンします。その結果、バッファ文字列はヒープの中の任意のデータを含むことになります。これにより、インタプリタの中の機密データを暴露してしまうかもしれません。 + +この問題はLinuxでのみ悪用されます。この問題はRuby 2.5.0からあります。2.4系列は脆弱ではありません。 + +## Affected versions + +* Ruby 2.5 系列: 2.5.7 およびそれ以前のバージョン +* Ruby 2.6 系列: 2.6.5 およびそれ以前のバージョン +* Ruby 2.7 系列: 2.7.0 +* commit 61b7f86248bd121be2e83768be71ef289e8e5b90 より前の開発版 + +## Credits + +この脆弱性情報は、Samuel Williams 氏によって報告されました。 + +## History + +* 2020-03-31 21:00:00 (JST) 初版 From bfba155b9fcc484533e04992248111342e1fa9d3 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Thu, 2 Apr 2020 13:47:37 +0900 Subject: [PATCH 0011/1487] Apply suggestions from code review Co-Authored-By: Juanito Fatas Co-Authored-By: Alexander Ilyin --- .../2020-03-31-heap-exposure-in-socket-cve-2020-10933.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ja/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md b/ja/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md index 09db750ad0..a62ce558d8 100644 --- a/ja/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md +++ b/ja/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md @@ -2,14 +2,15 @@ layout: news_post title: "CVE-2020-10933: socketライブラリのヒープ暴露脆弱性について" author: "mame" -translator: +translator: "mame" date: 2020-03-31 12:00:00 +0000 +tags: security lang: ja --- socketライブラリにヒープ暴露の脆弱性が発見されました。 この脆弱性は [CVE-2020-10933](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10933) として登録されています。 -ユーザのみなさんにはJSON gemを更新することを強くおすすめします。 +ユーザのみなさんにはRubyを更新することを強くおすすめします。 ## 詳細 From bc89c1fa015e5cec67828626bd5102ae0e665427 Mon Sep 17 00:00:00 2001 From: ismailarilik Date: Wed, 1 Apr 2020 12:01:59 +0300 Subject: [PATCH 0012/1487] Translate "Ruby 2.7.1 Released" post (tr) --- .../_posts/2020-03-31-ruby-2-7-1-released.md | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 tr/news/_posts/2020-03-31-ruby-2-7-1-released.md diff --git a/tr/news/_posts/2020-03-31-ruby-2-7-1-released.md b/tr/news/_posts/2020-03-31-ruby-2-7-1-released.md new file mode 100644 index 0000000000..4bd0837869 --- /dev/null +++ b/tr/news/_posts/2020-03-31-ruby-2-7-1-released.md @@ -0,0 +1,55 @@ +--- +layout: news_post +title: "Ruby 2.7.1 Yayınlandı" +author: "naruse" +translator: "ismailarilik" +date: 2020-03-31 12:00:00 +0000 +lang: tr +--- + +Ruby 2.7.1 yayınlandı. + +Bu yayın güvenlik düzeltmeleri içermektedir. +Ayrıntılar için lütfen aşağıdaki konuları inceleyin. + +* [CVE-2020-10663: JSON'da Güvensiz Nesne Oluşturma Zaafiyeti (Ek düzeltme)]({% link tr/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10933: Soket kütüphanesinde heap teşhir zaafiyeti]({% link tr/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) + +Ayrıntılar için [işleme logları](https://github.com/ruby/ruby/compare/v2_7_0...v2_7_1)na bakın. + +## İndirin + +{% assign release = site.data.releases | where: "version", "2.7.1" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Yayın Yorumu + +Birçok işleyici, geliştirici ve hata bildirileri sağlayan kullanıcı bu yayını yapmamızda bize yardım etti. +Katkıları için onlara teşekkür ederiz. From ff19bb895fd7b49c354081d8461cb9fa63c13e46 Mon Sep 17 00:00:00 2001 From: ismailarilik Date: Wed, 1 Apr 2020 11:57:59 +0300 Subject: [PATCH 0013/1487] Translate "Ruby 2.6.6 Released" post (tr) --- .../_posts/2020-03-31-ruby-2-6-6-released.md | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 tr/news/_posts/2020-03-31-ruby-2-6-6-released.md diff --git a/tr/news/_posts/2020-03-31-ruby-2-6-6-released.md b/tr/news/_posts/2020-03-31-ruby-2-6-6-released.md new file mode 100644 index 0000000000..3e116a4ec9 --- /dev/null +++ b/tr/news/_posts/2020-03-31-ruby-2-6-6-released.md @@ -0,0 +1,55 @@ +--- +layout: news_post +title: "Ruby 2.6.6 Yayınlandı" +author: "nagachika" +translator: "ismailarilik" +date: 2020-03-31 12:00:00 +0000 +lang: tr +--- + +Ruby 2.6.6 yayınlandı. + +Bu yayın güvenlik düzeltmeleri içermektedir. +Ayrıntılar için lütfen aşağıdaki konuları inceleyin. + +* [CVE-2020-16255: CVE-2020-10663: JSON'da Güvensiz Nesne Oluşturma Zaafiyeti (Ek düzeltme)]({% link tr/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10933: Soket kütüphanesinde heap teşhir zaafiyeti]({% link tr/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) + +Ayrıntılar için [işleme logları](https://github.com/ruby/ruby/compare/v2_6_5...v2_6_6)na bakın. + +## İndirin + +{% assign release = site.data.releases | where: "version", "2.6.6" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Yayın Yorumu + +Birçok işleyici, geliştirici ve hata bildirileri sağlayan birçok kullanıcı bu yayını yapmamızda bize yardım etti. +Katkıları için onlara teşekkür ederiz. From ca08d451fd12b93a8a1aa9d217aa257b86d2ab83 Mon Sep 17 00:00:00 2001 From: ismailarilik Date: Wed, 1 Apr 2020 11:52:52 +0300 Subject: [PATCH 0014/1487] Translate "Ruby 2.5.8 Released" post (tr) --- .../_posts/2020-03-31-ruby-2-5-8-released.md | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 tr/news/_posts/2020-03-31-ruby-2-5-8-released.md diff --git a/tr/news/_posts/2020-03-31-ruby-2-5-8-released.md b/tr/news/_posts/2020-03-31-ruby-2-5-8-released.md new file mode 100644 index 0000000000..e33bee18de --- /dev/null +++ b/tr/news/_posts/2020-03-31-ruby-2-5-8-released.md @@ -0,0 +1,54 @@ +--- +layout: news_post +title: "Ruby 2.5.8 Yayınlandı" +author: "usa" +translator: "ismailarilik" +date: 2020-03-31 12:00:00 +0000 +lang: tr +--- + +Ruby 2.5.8 yayınlandı. + +Bu yayın güvenlik düzeltmeleri içermektedir. +Ayrıntılar için lütfen aşağıdaki konuları inceleyin. + +* [CVE-2020-10663: JSON'da Güvensiz Nesne Oluşturma Zaafiyeti (Ek düzeltme)]({% link tr/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10933: Soket kütüphanesinde heap teşhir zaafiyeti]({% link tr/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) + +Ayrıntılar için [işleme logları](https://github.com/ruby/ruby/compare/v2_5_7...v2_5_8)na bakın. + +## İndirin + +{% assign release = site.data.releases | where: "version", "2.5.8" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Yayın Yorumu + +Bu yayında bize yardım eden herkese teşekkür ederiz, özellikle zaafiyeti bildirenlere. From 596893dbbf6099fd2067d811e9e78062012b9af0 Mon Sep 17 00:00:00 2001 From: ismailarilik Date: Wed, 1 Apr 2020 11:47:43 +0300 Subject: [PATCH 0015/1487] Translate "Ruby 2.4.10 Released" post (tr) --- .../_posts/2020-03-31-ruby-2-4-10-released.md | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 tr/news/_posts/2020-03-31-ruby-2-4-10-released.md diff --git a/tr/news/_posts/2020-03-31-ruby-2-4-10-released.md b/tr/news/_posts/2020-03-31-ruby-2-4-10-released.md new file mode 100644 index 0000000000..1e02cfcaf2 --- /dev/null +++ b/tr/news/_posts/2020-03-31-ruby-2-4-10-released.md @@ -0,0 +1,56 @@ +--- +layout: news_post +title: "Ruby 2.4.10 Yayınlandı" +author: "usa" +translator: "ismailarilik" +date: 2020-03-31 12:00:00 +0000 +lang: tr +--- + +Ruby 2.4.10 yayınlandı. + +Bu yayın bir güvenlik düzeltmesi içermektedir. +Ayrıntılar için lütfen aşağıdaki konuları inceleyin. + +* [CVE-2020-10663: JSON'da Güvensiz Nesne Oluşturma Zaafiyeti (Ek düzeltme)]({% link tr/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) + +Ruby 2.4 artık güvenlik sürdürmesi sürecinde, Mart 2020'ye kadar. +Bu tarihten sonra Ruby 2.4'ün sürdürülmesi sona erecek. +Yani bu sürüm, Ruby 2.4 serisinin son sürümü olacaktır. +Ruby'yi daha yeni sürümlere hemen yükseltmenizi şiddetle tavsiye ederiz, 2.7, 2.6 ya da 2.5 gibi. + +## İndirin + +{% assign release = site.data.releases | where: "version", "2.4.10" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Yayın Yorumu + +Bu yayında bize yardım eden herkese teşekkür ederiz, özellikle zaafiyeti bildirenlere. From 846d03845575d2e147b2b6b7f68c7ace79a75975 Mon Sep 17 00:00:00 2001 From: ismailarilik Date: Wed, 1 Apr 2020 11:33:23 +0300 Subject: [PATCH 0016/1487] Translate CVE-2020-10933 post (tr) --- ...-heap-exposure-in-socket-cve-2020-10933.md | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 tr/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md diff --git a/tr/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md b/tr/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md new file mode 100644 index 0000000000..d933b38021 --- /dev/null +++ b/tr/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md @@ -0,0 +1,38 @@ +--- +layout: news_post +title: "CVE-2020-10933: Soket kütüphanesinde heap teşhir zaafiyeti" +author: "mame" +translator: "ismailarilik" +date: 2020-03-31 12:00:00 +0000 +tags: security +lang: tr +--- + +Soket kütüphanesinde bir heap teşhir zaafiyeti keşfedilmiştir. +Bu zaafiyet [CVE-2020-10933](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10933) CVE belirtecine atanmıştır. +Ruby'yi yükseltmenizi şiddetle tavsiye ederiz. + +## Ayrıntılar + +`BasicSocket#recv_nonblock` ve `BasicSocket#read_nonblock`, size ve buffer argümanları ile çağrıldıklarında, bu metodlar buffer'ı belirtilen büyüklüğe göre yeniden boyutlandırırlar. +Operasyonun blokladığı durumlarda, bu metodlar hiçbir veri kopyalamadan dönerler. +Böylece buffer karakter dizisi heap'ten rasgele veriler içerebilecek duruma gelir. +Bu, yorumlayıcıdan muhtemel hassas bir veriyi teşhir edebilir. + +Bu zaafiyet sadece Linux'te kullanılabilir. +Bu mesele Ruby 2.5.0'dan itibaren vardır; 2.4 serisinde yoktur. + +## Etkilenen sürümler + +* Ruby 2.5 serisi: 2.5.7 ve öncesi +* Ruby 2.6 serisi: 2.6.5 ve öncesi +* Ruby 2.7 serisi: 2.7.0 +* 61b7f86248bd121be2e83768be71ef289e8e5b90 master revizyonu öncesi + +## Teşekkürler + +Samuel Williams'a bu meseleyi keşfettiği için teşekkür ederiz. + +## Geçmiş + +* Orijinal olarak 31.03.2020 tarihinde saat 15:00:00 (UTC)'te yayınlanmıştır. From a0652e9219f46b9e65166baed905016274307cf6 Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Fri, 3 Apr 2020 10:14:56 +0300 Subject: [PATCH 0017/1487] Translate CVE-2020-10933 post (ru) (#2413) * Translate CVE-2020-10933 post (ru) * Fix timestamp in CVE-2020-10933 post (ru) --- ...-heap-exposure-in-socket-cve-2020-10933.md | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 ru/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md diff --git a/ru/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md b/ru/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md new file mode 100644 index 0000000000..f04297af84 --- /dev/null +++ b/ru/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md @@ -0,0 +1,34 @@ +--- +layout: news_post +title: "CVE-2020-10933: Уязвимость воздействия кучи в библиотеке сокетов" +author: "mame" +translator: "aleksandrilyin" +date: 2020-03-31 12:00:00 +0000 +tags: security +lang: ru +--- + +В библиотеке сокетов была обнаружена уязвимость воздействия кучи. +Этой уязвимости назначен CVE идентификатор [CVE-2020-10933](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10933). +Мы строго рекомендуем обновить Ruby. + +## Детали + +Когда `BasicSocket#recv_nonblock` и `BasicSocket#read_nonblock` вызываются с параметрами size и buffer, они первоначально изменяют буфер до указанного размера. В тех случаях, когда операция блокируется, они возвращаются без копирования каких-либо данных. Таким образом, строка буфера теперь будет включать произвольные данные из кучи. Это может привести к появлению потенциально конфиденциальных данных от интерпретатора. + +Эта проблема может быть использована только в Linux. Эта проблема была начиная с Ruby 2.5.0; серия 2.4 не является уязвимой. + +## Затронутые версии + +* Серия Ruby 2.5: 2.5.7 и ранее +* Серия Ruby 2.6: 2.6.5 и ранее +* Серия Ruby 2.7: 2.7.0 +* до master ревизии 61b7f86248bd121be2e83768be71ef289e8e5b90 + +## Благодарности + +Спасибо Samuel Williams за обнаружение этой проблемы. + +## История + +* Оригинал опубликован 2020-03-31 12:00:00 (UTC) From 93c2e4c136fe68d50e3ccf39d5d944372a8bf170 Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Sat, 4 Apr 2020 16:52:56 +0300 Subject: [PATCH 0018/1487] Translate "Ruby 2.7.1 Released" post (ru) (#2419) --- .../_posts/2020-03-31-ruby-2-7-1-released.md | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 ru/news/_posts/2020-03-31-ruby-2-7-1-released.md diff --git a/ru/news/_posts/2020-03-31-ruby-2-7-1-released.md b/ru/news/_posts/2020-03-31-ruby-2-7-1-released.md new file mode 100644 index 0000000000..78f35ce6fe --- /dev/null +++ b/ru/news/_posts/2020-03-31-ruby-2-7-1-released.md @@ -0,0 +1,55 @@ +--- +layout: news_post +title: "Вышел Ruby 2.7.1" +author: "naruse" +translator: "aleksandrilyin" +date: 2020-03-31 12:00:00 +0000 +lang: ru +--- + +Вышел Ruby 2.7.1. + +Этот релиз включает исправления безопасности. +Пожалуйста, ознакомьтесь с пунктами ниже для подробностей. + +* [CVE-2020-10663: Уязвимость небезопасного создания объекта в JSON (дополнительное исправление)]({% link ru/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10933: Уязвимость воздействия кучи в библиотеке сокетов]({% link ru/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) + +Смотрите [историю коммитов](https://github.com/ruby/ruby/compare/v2_7_0...v2_7_1) для подробностей. + +## Скачать + +{% assign release = site.data.releases | where: "version", "2.7.1" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Комментарий к релизу + +Многие коммитеры, разработчики и пользователи, которые слали баг-репорты, помогли нам сделать этот релиз. +Спасибо за их участие. From 1970111e9f0617821090618d2dbeacfe97f2bd61 Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Sat, 4 Apr 2020 16:54:04 +0300 Subject: [PATCH 0019/1487] Translate "Ruby 2.5.8 Released" post (ru) (#2417) --- .../_posts/2020-03-31-ruby-2-5-8-released.md | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 ru/news/_posts/2020-03-31-ruby-2-5-8-released.md diff --git a/ru/news/_posts/2020-03-31-ruby-2-5-8-released.md b/ru/news/_posts/2020-03-31-ruby-2-5-8-released.md new file mode 100644 index 0000000000..d4c5655d65 --- /dev/null +++ b/ru/news/_posts/2020-03-31-ruby-2-5-8-released.md @@ -0,0 +1,54 @@ +--- +layout: news_post +title: "Вышел Ruby 2.5.8" +author: "usa" +translator: "aleksandrilyin" +date: 2020-03-31 12:00:00 +0000 +lang: ru +--- + +Вышел Ruby 2.5.8. + +Этот релиз включает исправления безопасности. +Пожалуйста, ознакомьтесь с пунктами ниже для подробностей. + +* [CVE-2020-10663: Уязвимость небезопасного создания объекта в JSON (дополнительное исправление)]({% link ru/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10933: Уязвимость воздействия кучи в библиотеке сокетов]({% link ru/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) + +Смотрите [историю коммитов](https://github.com/ruby/ruby/compare/v2_5_7...v2_5_8) для подробностей. + +## Скачать + +{% assign release = site.data.releases | where: "version", "2.5.8" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Комментарий к релизу + +Спасибо всем, кто помог с этим релизом, особенно тем, кто выявлял уязвимости. From 1bad3b32eaaa9e09070156044ef373cfcbe461ea Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Sat, 4 Apr 2020 16:54:45 +0300 Subject: [PATCH 0020/1487] Translate "Ruby 2.6.6 Released" post (ru) (#2418) --- .../_posts/2020-03-31-ruby-2-6-6-released.md | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 ru/news/_posts/2020-03-31-ruby-2-6-6-released.md diff --git a/ru/news/_posts/2020-03-31-ruby-2-6-6-released.md b/ru/news/_posts/2020-03-31-ruby-2-6-6-released.md new file mode 100644 index 0000000000..cbacbb30f0 --- /dev/null +++ b/ru/news/_posts/2020-03-31-ruby-2-6-6-released.md @@ -0,0 +1,55 @@ +--- +layout: news_post +title: "Вышел Ruby 2.6.6" +author: "nagachika" +translator: "aleksandrilyin" +date: 2020-03-31 12:00:00 +0000 +lang: ru +--- + +Вышел Ruby 2.6.6. + +Этот релиз включает исправления безопасности. +Пожалуйста, ознакомьтесь с пунктами ниже для подробностей. + +* [CVE-2020-10663: Уязвимость небезопасного создания объекта в JSON (дополнительное исправление)]({% link ru/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10933: Уязвимость воздействия кучи в библиотеке сокетов]({% link ru/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) + +Смотрите [историю коммитов](https://github.com/ruby/ruby/compare/v2_6_5...v2_6_6) для подробностей. + +## Скачать + +{% assign release = site.data.releases | where: "version", "2.6.6" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Комментарий к релизу + +Многие коммитеры, разработчики и пользователи, которые слали баг-репорты, помогли нам сделать этот релиз. +Спасибо за их участие. From def8c08f135f52459b9c954e5e171c86bfe818ec Mon Sep 17 00:00:00 2001 From: "U.Nakamura" Date: Sun, 5 Apr 2020 21:22:06 +0900 Subject: [PATCH 0021/1487] Support of Ruby 2.4 has ended --- ...020-04-05-support-of-ruby-2-4-has-ended.md | 46 +++++++++++++++++++ ...020-04-05-support-of-ruby-2-4-has-ended.md | 36 +++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 en/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md create mode 100644 ja/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md diff --git a/en/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md b/en/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md new file mode 100644 index 0000000000..51918d8f7e --- /dev/null +++ b/en/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md @@ -0,0 +1,46 @@ +--- +layout: news_post +title: "Support of Ruby 2.4 has ended" +author: "usa" +translator: +date: 2020-04-05 12:00:00 +0000 +lang: en +--- + +We announce that all support of the Ruby 2.4 series has ended. + +From the end of March of the last year, the support of the Ruby 2.4 series +was in the security maintenance phase. +Now, after one year has passed, this phase has ended. +Therefore, at March 31, 2020, all support of the Ruby 2.4 series has ended. +Bug and security fixes from more recent Ruby versions will no longer be +backported to 2.4, and no further patch release of 2.4 will be released. +We released Ruby 2.4.10 at March 31, 2020, but it was to give users a little +time to move to newer versions. +We highly recommend that you upgrade to newer versions of Ruby as soon as +possible. + + +## About currently supported Ruby versions + +### Ruby 2.7 series + +Currently in normal maintenance phase. +We will backport bug fixes and release with the fixes whenever necessary. +And, if a critical security issue is found, we will release an urgent fix +for it. + +### Ruby 2.6 series + +Currently in normal maintenance phase. +We will backport bug fixes and release with the fixes whenever necessary. +And, if a critical security issue is found, we will release an urgent fix +for it. + +### Ruby 2.5 series + +Currently in security maintenance phase. +We will never backport any bug fixes to 2.2 except security fixes. +If a critical security issue is found, we will release an urgent fix for it. +We are planning to end the support of the Ruby 2.2 series at the end of +March 2021. diff --git a/ja/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md b/ja/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md new file mode 100644 index 0000000000..991e0cf8f1 --- /dev/null +++ b/ja/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md @@ -0,0 +1,36 @@ +--- +layout: news_post +title: "Ruby 2.4 公式サポート終了" +author: "usa" +translator: +date: 2020-04-05 21:00:00 +0900 +lang: ja +--- + +Ruby 2.4 系列の公式サポート期間が終了したことをお知らせします。 + +昨年 4 月から 1 年間、Ruby 2.4 系列はセキュリティメンテナンス期間に入っていましたが、予告していた通り、1 年が経過しましたので、2020 年 3 月 31 日をもって、公式サポートを終了します。 +以後、単なるバグの修正はもちろん、セキュリティ上の問題が発見された場合も、Ruby 2.4 系列については新たなリリースは行われません。 +2020 年 3 月 31 日に、Ruby 2.4 系列での最後のリリースとなる 2.4.10 がリリースされていますが、これは、ユーザーの皆さんがより新しいバージョン系列へと移行するための猶予を確保するためのものです。 +現在、Ruby 2.4 系列を使用中のユーザーは、速やかに、より新しいバージョン系列へと移行されるようお願いします。 + +## 現在サポートされているバージョン系列について + +### Ruby 2.7 系列 + +現在、通常メンテナンス期間中です。 +随時、累積バグ修正を含むリリースが行われていく予定です。 +また、重大なセキュリティ上の問題が発見された場合、対応した緊急リリースが行われる予定です。 + +### Ruby 2.6 系列 + +現在、通常メンテナンス期間中です。 +随時、累積バグ修正を含むリリースが行われていく予定です。 +また、重大なセキュリティ上の問題が発見された場合、対応した緊急リリースが行われる予定です。 + +### Ruby 2.5 系列 + +現在、セキュリティメンテナンス期間中です。 +通常のバグについては修正は行われません。 +重大なセキュリティ上の問題が発見された場合、対応した緊急リリースが行われる予定です。 +2021 年 3 月末で公式サポートを終了する予定となっています。 From 1a42996c77530f66bd56271b79e34d1880c0ef76 Mon Sep 17 00:00:00 2001 From: "U.Nakamura" Date: Sun, 5 Apr 2020 21:55:07 +0900 Subject: [PATCH 0022/1487] Our timezone is really +0900, but test complained to it --- ja/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ja/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md b/ja/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md index 991e0cf8f1..75af5bf876 100644 --- a/ja/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md +++ b/ja/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md @@ -3,7 +3,7 @@ layout: news_post title: "Ruby 2.4 公式サポート終了" author: "usa" translator: -date: 2020-04-05 21:00:00 +0900 +date: 2020-04-05 12:00:00 +0000 lang: ja --- From 187c93a7c47bf7049ece905e176b875f26baae55 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Wed, 1 Apr 2020 12:56:34 +0200 Subject: [PATCH 0023/1487] Move Ruby 2.4 to EOL https://www.ruby-lang.org/en/news/2020/03/31/ruby-2-4-10-released/ --- _data/branches.yml | 6 +++--- _data/downloads.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/_data/branches.yml b/_data/branches.yml index fbc3a7fe79..6bd57c1980 100644 --- a/_data/branches.yml +++ b/_data/branches.yml @@ -19,12 +19,12 @@ eol_date: - name: 2.5 - status: normal maintenance + status: security maintenance date: 2017-12-25 - eol_date: + eol_date: 2021-03-31 - name: 2.4 - status: security maintenance + status: eol date: 2016-12-25 eol_date: 2020-03-31 diff --git a/_data/downloads.yml b/_data/downloads.yml index 5a56b54c18..1d80013913 100644 --- a/_data/downloads.yml +++ b/_data/downloads.yml @@ -9,16 +9,16 @@ stable: - 2.7.1 - 2.6.6 - - 2.5.8 # optional security_maintenance: - - 2.4.10 + - 2.5.8 # optional eol: + - 2.4.10 - 2.3.8 stable_snapshot: From a01b16b43453dbfa1def51860631bb154068597a Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Sun, 5 Apr 2020 18:51:12 +0300 Subject: [PATCH 0024/1487] Translate "Ruby 2.4.10 Released" post (ru) (#2416) * Translate "Ruby 2.4.10 Released" post (ru) * Improve translation in "Ruby 2.4.10 Released" post (ru) --- .../_posts/2020-03-31-ruby-2-4-10-released.md | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 ru/news/_posts/2020-03-31-ruby-2-4-10-released.md diff --git a/ru/news/_posts/2020-03-31-ruby-2-4-10-released.md b/ru/news/_posts/2020-03-31-ruby-2-4-10-released.md new file mode 100644 index 0000000000..4910cb1f04 --- /dev/null +++ b/ru/news/_posts/2020-03-31-ruby-2-4-10-released.md @@ -0,0 +1,55 @@ +--- +layout: news_post +title: "Вышел Ruby 2.4.10" +author: "usa" +translator: "aleksandrilyin" +date: 2020-03-31 12:00:00 +0000 +lang: ru +--- + +Вышел Ruby 2.4.10. + +Этот релиз включает исправление безопасности. Пожалуйста, ознакомьтесь с пунктом ниже для подробностей. + +* [CVE-2020-10663: Уязвимость небезопасного создания объекта в JSON (дополнительное исправление)]({% link ru/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) + +Ruby 2.4 теперь находится на стадии поддержки безопасности до конца марта 2020 года. +После этой даты поддержка Ruby 2.4 будет остановлена. +Таким образом, этот релиз станет последним в серии Ruby 2.4. +Мы рекомендуем вам немедленно обновить Ruby до более новых версий, таких как 2.7, 2.6 или 2.5. + +## Скачать + +{% assign release = site.data.releases | where: "version", "2.4.10" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Комментарий к релизу + +Спасибо всем, кто помог с этим релизом, особенно тем, кто выявлял уязвимости. From 9340d4e37038cba42568cd48d5754eef44592825 Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Mon, 6 Apr 2020 22:37:54 +0700 Subject: [PATCH 0025/1487] Add rubybib.org link to sidebar (id) --- _data/locales/id.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_data/locales/id.yml b/_data/locales/id.yml index 0f1a217d89..ad15a6890e 100644 --- a/_data/locales/id.yml +++ b/_data/locales/id.yml @@ -43,6 +43,9 @@ sidebar: url: /id/documentation/ # books: # text: Buku-buku + rubybib: + text: Penelitian Akademis + url: https://rubybib.org/ libraries: text: Pustaka url: /id/libraries/ From 414b907a2864e8cdd13a24415aad6d1b1ecb5dd1 Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Sat, 4 Apr 2020 09:27:48 +0300 Subject: [PATCH 0026/1487] Fix CVE-2020-10663 name in latest news posts (en, tr) --- en/news/_posts/2020-03-31-ruby-2-4-10-released.md | 2 +- en/news/_posts/2020-03-31-ruby-2-5-8-released.md | 2 +- en/news/_posts/2020-03-31-ruby-2-6-6-released.md | 2 +- en/news/_posts/2020-03-31-ruby-2-7-1-released.md | 2 +- tr/news/_posts/2020-03-31-ruby-2-6-6-released.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/en/news/_posts/2020-03-31-ruby-2-4-10-released.md b/en/news/_posts/2020-03-31-ruby-2-4-10-released.md index 1e43e9baef..42127a38ae 100644 --- a/en/news/_posts/2020-03-31-ruby-2-4-10-released.md +++ b/en/news/_posts/2020-03-31-ruby-2-4-10-released.md @@ -11,7 +11,7 @@ Ruby 2.4.10 has been released. This release includes a security fix. Please check the topics below for details. -* [CVE-2020-16255: Unsafe Object Creation Vulnerability in JSON (Additional fix)]({% link en/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10663: Unsafe Object Creation Vulnerability in JSON (Additional fix)]({% link en/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) Ruby 2.4 is now under the state of the security maintenance phase, until the end of March of 2020. After that date, maintenance of Ruby 2.4 will be ended. diff --git a/en/news/_posts/2020-03-31-ruby-2-5-8-released.md b/en/news/_posts/2020-03-31-ruby-2-5-8-released.md index 7f725d4490..03c904db71 100644 --- a/en/news/_posts/2020-03-31-ruby-2-5-8-released.md +++ b/en/news/_posts/2020-03-31-ruby-2-5-8-released.md @@ -12,7 +12,7 @@ Ruby 2.5.8 has been released. This release includes security fixes. Please check the topics below for details. -* [CVE-2020-16255: Unsafe Object Creation Vulnerability in JSON (Additional fix)]({% link en/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10663: Unsafe Object Creation Vulnerability in JSON (Additional fix)]({% link en/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) * [CVE-2020-10933: Heap exposure vulnerability in the socket library]({% link en/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) See the [commit logs](https://github.com/ruby/ruby/compare/v2_5_7...v2_5_8) for details. diff --git a/en/news/_posts/2020-03-31-ruby-2-6-6-released.md b/en/news/_posts/2020-03-31-ruby-2-6-6-released.md index 5d575baf0b..c8ebce0e79 100644 --- a/en/news/_posts/2020-03-31-ruby-2-6-6-released.md +++ b/en/news/_posts/2020-03-31-ruby-2-6-6-released.md @@ -12,7 +12,7 @@ Ruby 2.6.6 has been released. This release includes security fixes. Please check the topics below for details. -* [CVE-2020-16255: Unsafe Object Creation Vulnerability in JSON (Additional fix)]({% link en/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10663: Unsafe Object Creation Vulnerability in JSON (Additional fix)]({% link en/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) * [CVE-2020-10933: Heap exposure vulnerability in the socket library]({% link en/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) See the [commit logs](https://github.com/ruby/ruby/compare/v2_6_5...v2_6_6) for details. diff --git a/en/news/_posts/2020-03-31-ruby-2-7-1-released.md b/en/news/_posts/2020-03-31-ruby-2-7-1-released.md index 7e0899d11b..0fb4aeb9ba 100644 --- a/en/news/_posts/2020-03-31-ruby-2-7-1-released.md +++ b/en/news/_posts/2020-03-31-ruby-2-7-1-released.md @@ -12,7 +12,7 @@ Ruby 2.7.1 has been released. This release includes security fixes. Please check the topics below for details. -* [CVE-2020-16255: Unsafe Object Creation Vulnerability in JSON (Additional fix)]({% link en/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10663: Unsafe Object Creation Vulnerability in JSON (Additional fix)]({% link en/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) * [CVE-2020-10933: Heap exposure vulnerability in the socket library]({% link en/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) See the [commit logs](https://github.com/ruby/ruby/compare/v2_7_0...v2_7_1) for details. diff --git a/tr/news/_posts/2020-03-31-ruby-2-6-6-released.md b/tr/news/_posts/2020-03-31-ruby-2-6-6-released.md index 3e116a4ec9..de8a228caf 100644 --- a/tr/news/_posts/2020-03-31-ruby-2-6-6-released.md +++ b/tr/news/_posts/2020-03-31-ruby-2-6-6-released.md @@ -12,7 +12,7 @@ Ruby 2.6.6 yayınlandı. Bu yayın güvenlik düzeltmeleri içermektedir. Ayrıntılar için lütfen aşağıdaki konuları inceleyin. -* [CVE-2020-16255: CVE-2020-10663: JSON'da Güvensiz Nesne Oluşturma Zaafiyeti (Ek düzeltme)]({% link tr/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10663: JSON'da Güvensiz Nesne Oluşturma Zaafiyeti (Ek düzeltme)]({% link tr/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) * [CVE-2020-10933: Soket kütüphanesinde heap teşhir zaafiyeti]({% link tr/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) Ayrıntılar için [işleme logları](https://github.com/ruby/ruby/compare/v2_6_5...v2_6_6)na bakın. From 3b1144f7297126b9725c9e83517b47302fd79659 Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Fri, 3 Apr 2020 05:55:29 +0300 Subject: [PATCH 0027/1487] Fix timestamp in CVE-2020-10933 post (tr, zh_tw) --- .../_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md | 2 +- .../_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tr/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md b/tr/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md index d933b38021..428b6ffa54 100644 --- a/tr/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md +++ b/tr/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md @@ -35,4 +35,4 @@ Samuel Williams'a bu meseleyi keşfettiği için teşekkür ederiz. ## Geçmiş -* Orijinal olarak 31.03.2020 tarihinde saat 15:00:00 (UTC)'te yayınlanmıştır. +* Orijinal olarak 31.03.2020 tarihinde saat 12:00:00 (UTC)'te yayınlanmıştır. diff --git a/zh_tw/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md b/zh_tw/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md index 442f3c8b10..5a1a8ca96a 100644 --- a/zh_tw/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md +++ b/zh_tw/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md @@ -29,4 +29,4 @@ socket 函式庫存在記憶體堆疊資料洩漏風險。此風險的 CVE 識 ## 歷史 -* 最初發佈於 2020-03-31 15:00:00 (UTC) +* 最初發佈於 2020-03-31 12:00:00 (UTC) From c83b6eee831b847c39aa0f0f76397a6d0a2eb9be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20Ar=C4=B1l=C4=B1k?= Date: Fri, 3 Apr 2020 15:06:43 +0300 Subject: [PATCH 0028/1487] Update suffix --- .../_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tr/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md b/tr/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md index 428b6ffa54..b2ffe5f084 100644 --- a/tr/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md +++ b/tr/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md @@ -35,4 +35,4 @@ Samuel Williams'a bu meseleyi keşfettiği için teşekkür ederiz. ## Geçmiş -* Orijinal olarak 31.03.2020 tarihinde saat 12:00:00 (UTC)'te yayınlanmıştır. +* Orijinal olarak 31.03.2020 tarihinde saat 12:00:00 (UTC)'de yayınlanmıştır. From 853f158b2ad247ace90907737fb3d6e62d1af91a Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Thu, 9 Apr 2020 01:42:57 +0900 Subject: [PATCH 0029/1487] Update ko/downloads/index.md Co-Authored-By: Chayoung You --- ko/downloads/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ko/downloads/index.md b/ko/downloads/index.md index f86aa68de6..8b89491b09 100644 --- a/ko/downloads/index.md +++ b/ko/downloads/index.md @@ -55,7 +55,7 @@ lang: ko sha256: {{ release.sha256.gz }}{% endfor %} {% endif %} -* **스냅숏:** +* **스냅숏:**{% for snapshot in site.data.downloads.stable_snapshots %} * [안정 스냅숏]({{ site.data.downloads.stable_snapshots[0].url.gz }}): 안정 브랜치의 최신 스냅숏을 tarball로 압축한 것입니다. * [나이틀리 스냅숏]({{ site.data.downloads.nightly_snapshot.url.gz }}): From dae33933dbedbeb0281edbe94ebeab50e36a2e46 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Thu, 9 Apr 2020 01:43:06 +0900 Subject: [PATCH 0030/1487] Update ko/downloads/index.md Co-Authored-By: Chayoung You --- ko/downloads/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ko/downloads/index.md b/ko/downloads/index.md index 8b89491b09..bc51a953ae 100644 --- a/ko/downloads/index.md +++ b/ko/downloads/index.md @@ -56,8 +56,8 @@ lang: ko {% endif %} * **스냅숏:**{% for snapshot in site.data.downloads.stable_snapshots %} - * [안정 스냅숏]({{ site.data.downloads.stable_snapshots[0].url.gz }}): - 안정 브랜치의 최신 스냅숏을 tarball로 압축한 것입니다. + * [{{ snapshot.branch }} 브랜치의 안정 스냅숏]({{ snapshot.url.gz }}): + `{{ snapshot.branch }}` 브랜치의 최신 스냅숏을 tarball로 압축한 것입니다.{% endfor %} * [나이틀리 스냅숏]({{ site.data.downloads.nightly_snapshot.url.gz }}): 나이틀리로 제작된 Git 상의 모든 것을 tarball로 압축한 것입니다. 본 스냅숏은 버그 혹은 기타 이슈를 포함하고 있을 수 있으니 주의하여 From 2243468215875b2dab5ccdd3e688899a434d2e4b Mon Sep 17 00:00:00 2001 From: Shia Date: Thu, 9 Apr 2020 10:55:02 +0900 Subject: [PATCH 0031/1487] Add rubybib to sidebar (#2424) https://github.com/ruby/www.ruby-lang.org/blob/c83b6eee831b847c39aa0f0f76397a6d0a2eb9be/_data/locales/en.yml#L47-L49 --- _data/locales/ko.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_data/locales/ko.yml b/_data/locales/ko.yml index d7fa61d9cd..a48b810c21 100644 --- a/_data/locales/ko.yml +++ b/_data/locales/ko.yml @@ -43,6 +43,9 @@ sidebar: url: /ko/documentation/ # books: # text: 책 + rubybib: + text: 학술 연구 + url: https://rubybib.org/ libraries: text: 라이브러리 url: /ko/libraries/ From 6e63c0083aa17b11155ac547da224d121539e94e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20T=C3=A1mara=20Pati=C3=B1o?= Date: Thu, 9 Apr 2020 18:00:07 -0400 Subject: [PATCH 0032/1487] Translate CVE-2020-10633 post (es) (#2422) * Translate CVE-2020-10933 post (es) * Update es/news/_posts/2020-03-19-json-dos-cve-2020-10663.md Co-Authored-By: Alexander Ilyin Co-authored-by: Alexander Ilyin --- .../2020-03-19-json-dos-cve-2020-10663.md | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 es/news/_posts/2020-03-19-json-dos-cve-2020-10663.md diff --git a/es/news/_posts/2020-03-19-json-dos-cve-2020-10663.md b/es/news/_posts/2020-03-19-json-dos-cve-2020-10663.md new file mode 100644 index 0000000000..02db27a664 --- /dev/null +++ b/es/news/_posts/2020-03-19-json-dos-cve-2020-10663.md @@ -0,0 +1,53 @@ +--- +layout: news_post +title: "CVE-2020-10663: Vulnerabilidad de Creación Insegura de Objetos en JSON (Corrección adicional)" +author: "mame" +translator: "vtamara" +date: 2020-03-19 13:00:00 +0000 +tags: security +lang: es +--- + +Hay una vulnerabilidad en la creación insegura de objetos en la gema json +distribuida con Ruby. A esta vulnerabilidad se le ha asignado el +identificador CVE [CVE-2020-10663](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10663). +Recomendamos enfáticamente actualizar la gema json. + +## Detalles + +Cuando se reconocen ciertos documentos JSON, la gema json (incluyendo la +que se distribuye con Ruby) puede obligarse a crear objetos arbitrarios +en el sistema. + +Este es el mismo problema del [CVE-2013-0269](https://www.ruby-lang.org/en/news/2013/02/22/json-dos-cve-2013-0269/). +La corrección anterior estuvo incompleta, pues tuvo en cuenta +`JSON.parse(datos_usuario)`, pero no tuvo en cuenta otros estilos de +reconocimiento JSON incluyendo `JSON(datos_usuario)` y +`JSON.parse(datos_usuario, nil)`. + +Ver detalles en [CVE-2013-0269](https://www.ruby-lang.org/en/news/2013/02/22/json-dos-cve-2013-0269/). +Note que el problema podía explotarse para causar un Denegación de Servicio +al crear muchos objetos Symbol que no podían ser recolectados por +el recolector de basura, pero ese tipo de ataque ya no es viable +porque los objetos Symbol ahora puede ser procesados por el recolector +de basura. +Sin embargo, la posibilidad de crear objetos arbitrarios puede +tener graves consecuencias de seguridad dependiendo del código de la +aplicación. + +Por favor actualice la gem json a la verisón 2.3.0 o posterior. Para +actualizar puede usar `gem update json`. +Si está usando bundler, por favro añada `gem "json", ">= 2.3.0"` a +sus `Gemfile`. + +## Versiones afectadas + +* gem JSON 2.2.0 y previas + +## Creditos + +Agradecemos a Jeremy Evans por descubrir este problema. + +## Historia + +* Publicado originalmente el 2020-03-19 13:00:00 (UTC) From 881af8d02bf2d99259c80a23e2536d7b15457537 Mon Sep 17 00:00:00 2001 From: usa Date: Fri, 10 Apr 2020 13:19:37 +0900 Subject: [PATCH 0033/1487] Update en/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md Co-Authored-By: Hiroshi SHIBATA --- en/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md b/en/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md index 51918d8f7e..f4193ef75f 100644 --- a/en/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md +++ b/en/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md @@ -40,7 +40,7 @@ for it. ### Ruby 2.5 series Currently in security maintenance phase. -We will never backport any bug fixes to 2.2 except security fixes. +We will never backport any bug fixes to 2.5 except security fixes. If a critical security issue is found, we will release an urgent fix for it. We are planning to end the support of the Ruby 2.2 series at the end of March 2021. From a22affb1714c3d8ccacef342130a3209c17ab702 Mon Sep 17 00:00:00 2001 From: usa Date: Fri, 10 Apr 2020 13:20:54 +0900 Subject: [PATCH 0034/1487] Update 2020-04-05-support-of-ruby-2-4-has-ended.md --- en/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md b/en/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md index f4193ef75f..4ab60debc9 100644 --- a/en/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md +++ b/en/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md @@ -42,5 +42,5 @@ for it. Currently in security maintenance phase. We will never backport any bug fixes to 2.5 except security fixes. If a critical security issue is found, we will release an urgent fix for it. -We are planning to end the support of the Ruby 2.2 series at the end of +We are planning to end the support of the Ruby 2.4 series at the end of March 2021. From 43a2d6855e1c7964727f197eb0327e6408db2dcb Mon Sep 17 00:00:00 2001 From: usa Date: Fri, 10 Apr 2020 13:22:28 +0900 Subject: [PATCH 0035/1487] Update 2020-04-05-support-of-ruby-2-4-has-ended.md --- en/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md b/en/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md index 4ab60debc9..754271ef6f 100644 --- a/en/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md +++ b/en/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md @@ -42,5 +42,5 @@ for it. Currently in security maintenance phase. We will never backport any bug fixes to 2.5 except security fixes. If a critical security issue is found, we will release an urgent fix for it. -We are planning to end the support of the Ruby 2.4 series at the end of +We are planning to end the support of the Ruby 2.5 series at the end of March 2021. From 9dc89d043caa3dce9afa2b8e09326b92090de917 Mon Sep 17 00:00:00 2001 From: Ismail Arilik Date: Sun, 12 Apr 2020 18:02:46 +0300 Subject: [PATCH 0036/1487] Translate Ruby 2.4 support ended post (tr) --- ...020-04-05-support-of-ruby-2-4-has-ended.md | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 tr/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md diff --git a/tr/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md b/tr/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md new file mode 100644 index 0000000000..e2ea691cbc --- /dev/null +++ b/tr/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md @@ -0,0 +1,39 @@ +--- +layout: news_post +title: "Ruby 2.4 desteği sona erdi" +author: "usa" +translator: "ismailarilik" +date: 2020-04-05 12:00:00 +0000 +lang: tr +--- + +Ruby 2.4 serisi için tüm desteğin sona erdiğini duyururuz. + +Geçen senenin Mart ayı sonundan itibaren Ruby 2.4 serisi için destek güvenlik sürdürmesi aşamasındaydı. +Şimdi, bir sene geçtikten sonra, bu aşama sona erdi. +Bu sebeple 31 Mart 2020'de Ruby 2.4 serisi için tüm destek sona erdi. +Daha yeni Ruby sürümlerinin hata ve güvenlik düzeltmeleri artık 2.4'e entegre edilmeyecek ve 2.4'ün yama sürümleri artık yayınlanmayacaktır. +Ruby 2.4.10'u 31 Mart 2020'de yayınladık, fakat bu, kullanıcılara daha yeni sürümlere geçmek için biraz zaman vermek içindi. +Ruby'nin daha yeni sürümlerine mümkün olan en kısa zamanda geçmenizi şiddetle tavsiye ederiz. + + +## Şu anda desteklenen Ruby sürümleri hakkında + +### Ruby 2.7 serisi + +Şu an normal sürdürme aşamasında. +Hata düzeltmelerini entegre edeceğiz ve ne zaman gerekirse düzeltmeler ile yayınlama yapacağız. +Ve, eğer kritik bir sorun bulunursa, bu sorun için acil bir düzeltme yayınlayacağız. + +### Ruby 2.6 serisi + +Şu an normal sürdürme aşamasında. +Hata düzeltmelerini entegre edeceğiz ve ne zaman gerekirse düzeltmeler ile yayınlama yapacağız. +Ve, eğer kritik bir sorun bulunursa, bu sorun için acil bir düzeltme yayınlayacağız. + +### Ruby 2.5 serisi + +Şu an güvenlik sürdürmesi aşamasında. +Güvenlik düzeltmeleri dışında hiçbir hata düzeltmesini 2.5'e entegre etmeyeceğiz. +Eğer kritik bir sorun bulunursa, bu sorun için acil bir düzeltme yayınlayacağız. +Ruby 2.5 serisi için desteği Mart 2021'in sonunda sona erdirmeyi planlıyoruz. From 4db6ca8c2f2470b5023bf258c204e2caddc96f98 Mon Sep 17 00:00:00 2001 From: Tommaso Barbato Date: Mon, 13 Apr 2020 11:50:10 +0200 Subject: [PATCH 0037/1487] Use unquoted value for date elements --- _data/releases.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_data/releases.yml b/_data/releases.yml index 3ba746cecd..6e7152c8d2 100644 --- a/_data/releases.yml +++ b/_data/releases.yml @@ -22,7 +22,7 @@ # 2.7 series - version: 2.7.1 - date: '2020-03-31' + date: 2020-03-31 post: "/en/news/2020/03/31/ruby-2-7-1-released/" url: bz2: https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.1.tar.bz2 @@ -209,7 +209,7 @@ # 2.6 series - version: 2.6.6 - date: '2020-03-31' + date: 2020-03-31 post: "/en/news/2020/03/31/ruby-2-6-6-released/" url: bz2: https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.6.tar.bz2 @@ -409,7 +409,7 @@ # 2.5 series - version: 2.5.8 - date: '2020-03-31' + date: 2020-03-31 post: "/en/news/2020/03/31/ruby-2-5-8-released/" url: bz2: https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.8.tar.bz2 @@ -595,7 +595,7 @@ # 2.4 series - version: 2.4.10 - date: '2020-03-31' + date: 2020-03-31 post: "/en/news/2020/03/31/ruby-2-4-10-released/" url: bz2: https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.10.tar.bz2 From a492907cbfa5cfa765866d18a64b47ab792e0b9b Mon Sep 17 00:00:00 2001 From: Delton Ding Date: Tue, 14 Apr 2020 19:26:05 +0900 Subject: [PATCH 0038/1487] Fix typos in news (zh_cn) (#2428) --- zh_cn/news/_posts/2019-10-01-ruby-2-6-5-released.md | 2 +- zh_cn/news/_posts/2019-10-02-ruby-2-4-9-released.md | 2 +- zh_cn/news/_posts/2019-10-22-ruby-2-7-0-preview2-released.md | 2 +- zh_cn/news/_posts/2019-11-23-ruby-2-7-0-preview3-released.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/zh_cn/news/_posts/2019-10-01-ruby-2-6-5-released.md b/zh_cn/news/_posts/2019-10-01-ruby-2-6-5-released.md index 9b7a18a6fb..ed31ff6b2d 100644 --- a/zh_cn/news/_posts/2019-10-01-ruby-2-6-5-released.md +++ b/zh_cn/news/_posts/2019-10-01-ruby-2-6-5-released.md @@ -1,6 +1,6 @@ --- layout: news_post -title: "Ruby 2.6.5 發佈" +title: "Ruby 2.6.5 已发布" author: "nagachika" translator: Delton Ding date: 2019-10-01 11:00:00 +0000 diff --git a/zh_cn/news/_posts/2019-10-02-ruby-2-4-9-released.md b/zh_cn/news/_posts/2019-10-02-ruby-2-4-9-released.md index 96fada0c73..b208a0e123 100644 --- a/zh_cn/news/_posts/2019-10-02-ruby-2-4-9-released.md +++ b/zh_cn/news/_posts/2019-10-02-ruby-2-4-9-released.md @@ -1,6 +1,6 @@ --- layout: news_post -title: "Ruby 2.4.9 發佈" +title: "Ruby 2.4.9 已发布" author: "usa" translator: Delton Ding date: 2019-10-02 09:00:00 +0000 diff --git a/zh_cn/news/_posts/2019-10-22-ruby-2-7-0-preview2-released.md b/zh_cn/news/_posts/2019-10-22-ruby-2-7-0-preview2-released.md index 1cd4716bc7..477913fff5 100644 --- a/zh_cn/news/_posts/2019-10-22-ruby-2-7-0-preview2-released.md +++ b/zh_cn/news/_posts/2019-10-22-ruby-2-7-0-preview2-released.md @@ -183,7 +183,7 @@ end * 更新 Unicode 至 12.1.0 版本,新增对于新年号「令和」 U+32FF 的支持。[[功能 #15195]](https://bugs.ruby-lang.org/issues/15195) -* `Date.jisx0301`、`Date#jisx0301` 和 `Date.parse` 展示支持新的日本年号作为非正式的扩展功能,直到新的 JIS X 0301 发布。[[功能 #15742]](https://bugs.ruby-lang.org/issues/15742) +* `Date.jisx0301`、`Date#jisx0301` 和 `Date.parse` 暂时支持新的日本年号作为非正式的扩展功能,直到新的 JIS X 0301 发布。[[功能 #15742]](https://bugs.ruby-lang.org/issues/15742) * 编译器需要支持 C99 [[杂项 #15347]](https://bugs.ruby-lang.org/issues/15347) *关于我们使用方言的具体信息请查阅: diff --git a/zh_cn/news/_posts/2019-11-23-ruby-2-7-0-preview3-released.md b/zh_cn/news/_posts/2019-11-23-ruby-2-7-0-preview3-released.md index d240378ec7..10a37dfa3b 100644 --- a/zh_cn/news/_posts/2019-11-23-ruby-2-7-0-preview3-released.md +++ b/zh_cn/news/_posts/2019-11-23-ruby-2-7-0-preview3-released.md @@ -225,7 +225,7 @@ end * 更新 Unicode 至 12.1.0 版本,新增对于新年号「令和」 U+32FF 的支持。[[功能 #15195]](https://bugs.ruby-lang.org/issues/15195) -* `Date.jisx0301`、`Date#jisx0301` 和 `Date.parse` 展示支持新的日本年号作为非正式的扩展功能,直到新的 JIS X 0301 发布。[[功能 #15742]](https://bugs.ruby-lang.org/issues/15742) +* `Date.jisx0301`、`Date#jisx0301` 和 `Date.parse` 暂时支持新的日本年号作为非正式的扩展功能,直到新的 JIS X 0301 发布。[[功能 #15742]](https://bugs.ruby-lang.org/issues/15742) * 编译器需要支持 C99 [[杂项 #15347]](https://bugs.ruby-lang.org/issues/15347) *关于我们使用方言的具体信息请查阅: From a056dc8325244f8adb40d73a95bfa8695027e0f5 Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Tue, 14 Apr 2020 21:46:35 +0300 Subject: [PATCH 0039/1487] Change link to snapshot (ru) (#2429) PR: #2379 --- ru/downloads/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ru/downloads/index.md b/ru/downloads/index.md index 3300b36b1f..6def50d4e9 100644 --- a/ru/downloads/index.md +++ b/ru/downloads/index.md @@ -57,9 +57,9 @@ lang: ru sha256: {{ release.sha256.gz }}{% endfor %} {% endif %} -* **Слепки:** - * [Стабильный слепок]({{ site.data.downloads.stable_snapshots[0].url.gz }}): - Это архив свежайшего слепка текущей стабильной ветки. +* **Слепки:**{% for snapshot in site.data.downloads.stable_snapshots %} + * [Стабильный слепок ветки {{ snapshot.branch }}]({{ snapshot.url.gz }}): + Это архив свежайшего слепка текущей ветки `{{ snapshot.branch }}`.{% endfor %} * [Nightly-слепок]({{ site.data.downloads.nightly_snapshot.url.gz }}): Это архив того, что есть в Git, сделанный ночью. Может содержать баги и прочие ошибки, используйте его на свой страх и риск. From e1ea8afe6b7f7d9c91c127d0b8e8f868a5882cae Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Tue, 14 Apr 2020 21:47:11 +0300 Subject: [PATCH 0040/1487] Translate Ruby 2.4 support ended post (ru) (#2430) --- ...020-04-05-support-of-ruby-2-4-has-ended.md | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 ru/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md diff --git a/ru/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md b/ru/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md new file mode 100644 index 0000000000..b4fbcc893b --- /dev/null +++ b/ru/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md @@ -0,0 +1,49 @@ +--- +layout: news_post +title: "Закончилась поддержка Ruby 2.4" +author: "usa" +translator: "aleksandrilyin" +date: 2020-04-05 12:00:00 +0000 +lang: ru +--- + +Мы объявляем, что вся поддержка серии Ruby 2.4 закончилась. + +С конца марта прошлого года поддержка серии Ruby 2.4 находилась на стадии +поддержки безопасности. +Теперь, спустя год, эта стадия закончилась. +Поэтому 31 марта 2020 года вся поддержка серии Ruby 2.4 закончилась. +Исправления ошибок и безопасности из последних версий Ruby больше не будут +перенесены в 2.4, и никакой другой релиз патча 2.4 не будет выпущен. +Мы выпустили Ruby 2.4.10 31 марта 2020 года, но это дало пользователям +немного времени для перехода на более новые версии. +Мы крайне рекомендуем вам как можно скорее перейти на более новые версии +Ruby. + + +## О поддерживаемых в данный момент версиях Ruby + +### Серия Ruby 2.7 + +Сейчас на обычной стадии поддержки. +Мы будем применять исправления ошибок и выпускать релизы с исправлениями, +когда это необходимо. +А, если будет обнаружена критическая проблема безопасности, мы выпустим +срочное исправление для неё. + +### Серия Ruby 2.6 + +Сейчас на обычной стадии поддержки. +Мы будем применять исправления ошибок и выпускать релизы с исправлениями, +когда это необходимо. +А, если будет обнаружена критическая проблема безопасности, мы выпустим +срочное исправление для неё. + +### Серия Ruby 2.5 + +Сейчас на стадии поддержки безопасности. +Мы никогда не будем переносить какие-либо исправления ошибок в 2.5, кроме +исправлений безопасности. +Если будет обнаружена критическая проблема безопасности, мы выпустим +срочное исправление для неё. +Мы планируем прекратить поддержку серии Ruby 2.5 в конце марта 2021 года. From 2b33bed09ded934ae107d4033d198bc485a0ed63 Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Tue, 14 Apr 2020 21:47:35 +0300 Subject: [PATCH 0041/1487] Fix grammar typo on Downloads page (ru) (#2431) --- ru/downloads/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ru/downloads/index.md b/ru/downloads/index.md index 6def50d4e9..ddbf0c5e37 100644 --- a/ru/downloads/index.md +++ b/ru/downloads/index.md @@ -70,8 +70,8 @@ lang: ru Информацию о текущем состоянии поддержки различных веток Ruby можно найти на [странице ветвей][branches]. -За информацией про Ruby-репозитории Subversion и Git, пожалуйста, -посмотрите страницу о [ядре Ruby](/ru/community/ruby-core/). +Информацию про Ruby-репозитории Subversion и Git, пожалуйста, +посмотрите на странице о [ядре Ruby](/ru/community/ruby-core/). Исходный код Ruby доступен по всему миру на нескольких [зеркальных сайтах][mirrors]. From 2d5c97f79bb10e358a1fe9f66877dee86ceb48a5 Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Thu, 16 Apr 2020 07:57:37 +0300 Subject: [PATCH 0042/1487] Translate "Credits" word in CVE-2020-10663 post (zh_tw) --- zh_tw/news/_posts/2020-03-19-json-dos-cve-2020-10663.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zh_tw/news/_posts/2020-03-19-json-dos-cve-2020-10663.md b/zh_tw/news/_posts/2020-03-19-json-dos-cve-2020-10663.md index a08e10214f..d3afba0a5a 100644 --- a/zh_tw/news/_posts/2020-03-19-json-dos-cve-2020-10663.md +++ b/zh_tw/news/_posts/2020-03-19-json-dos-cve-2020-10663.md @@ -24,7 +24,7 @@ json gem(包含 Ruby 內建的版本)在解析 JSON 文件時,系統可以 * JSON gem 2.2.0 及先前版本 -## Credits +## 致謝 感謝 Jeremy Evans 回報此問題 From 118718dfdba6c113f042411dcf66931a12f94a8c Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Mon, 20 Apr 2020 12:41:29 +0900 Subject: [PATCH 0043/1487] Add link to docs.ruby-lang.org/ja/2.7.0/ --- ja/documentation/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ja/documentation/index.md b/ja/documentation/index.md index 15f531c10d..39ebbf7bdf 100644 --- a/ja/documentation/index.md +++ b/ja/documentation/index.md @@ -15,6 +15,7 @@ Rubyでプログラミングする際に役立つドキュメントを紹介し また、現在有志の手により[リファレンスマニュアルの整備][rurema-wiki]が進行中です。 成果物を[<URL:https://docs.ruby-lang.org/ja/>][doc-r-l-o]から閲覧できます。 +* [Rubyリファレンスマニュアル Ruby 2.7.0版][man-270] * [Rubyリファレンスマニュアル Ruby 2.6.0版][man-260] * [Rubyリファレンスマニュアル Ruby 2.5.0版][man-250] * [Rubyリファレンスマニュアル Ruby 2.4.0版][man-240] @@ -122,6 +123,7 @@ Posted by Shugo Maeda on 26 May 2006 [man-240]: https://docs.ruby-lang.org/ja/2.4.0/doc/index.html [man-250]: https://docs.ruby-lang.org/ja/2.5.0/doc/index.html [man-260]: https://docs.ruby-lang.org/ja/2.6.0/doc/index.html +[man-270]: https://docs.ruby-lang.org/ja/2.7.0/doc/index.html [man-search]: https://docs.ruby-lang.org/ja/search/ [man-xz]: https://cache.ruby-lang.org/pub/ruby/doc/ruby-refm-1.9.3-dynamic-20120829.tar.xz [man-gz]: https://cache.ruby-lang.org/pub/ruby/doc/ruby-refm-1.9.3-dynamic-20120829.tar.gz From afe87ea3c240193fcfd2199f71d56d16e185bd80 Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Thu, 23 Apr 2020 10:28:12 +0300 Subject: [PATCH 0044/1487] Translate subtitles in last news posts (ja) --- ja/news/_posts/2019-05-30-ruby-2-7-0-preview1-released.md | 2 +- ja/news/_posts/2019-10-22-ruby-2-7-0-preview2-released.md | 2 +- ja/news/_posts/2019-11-23-ruby-2-7-0-preview3-released.md | 2 +- ja/news/_posts/2019-12-17-ruby-2-7-0-rc1-released.md | 2 +- ja/news/_posts/2019-12-21-ruby-2-7-0-rc2-released.md | 2 +- ja/news/_posts/2019-12-25-ruby-2-7-0-released.md | 2 +- ja/news/_posts/2020-03-19-json-dos-cve-2020-10663.md | 4 ++-- .../2020-03-31-heap-exposure-in-socket-cve-2020-10933.md | 6 +++--- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ja/news/_posts/2019-05-30-ruby-2-7-0-preview1-released.md b/ja/news/_posts/2019-05-30-ruby-2-7-0-preview1-released.md index a9d2567a56..66b94e73b5 100644 --- a/ja/news/_posts/2019-05-30-ruby-2-7-0-preview1-released.md +++ b/ja/news/_posts/2019-05-30-ruby-2-7-0-preview1-released.md @@ -93,7 +93,7 @@ Ruby に添付されている REPL (Read-Eval-Print-Loop) である `irb` で、 Ruby 2.7 でプログラミングをお楽しみください! -## Download +## ダウンロード * diff --git a/ja/news/_posts/2019-10-22-ruby-2-7-0-preview2-released.md b/ja/news/_posts/2019-10-22-ruby-2-7-0-preview2-released.md index 69fad8faa8..ed13e7a853 100644 --- a/ja/news/_posts/2019-10-22-ruby-2-7-0-preview2-released.md +++ b/ja/news/_posts/2019-10-22-ruby-2-7-0-preview2-released.md @@ -191,7 +191,7 @@ Ruby に添付されている REPL (Read-Eval-Print-Loop) である `irb` で、 Ruby 2.7 で楽しいプログラミングを! -## Download +## ダウンロード * diff --git a/ja/news/_posts/2019-11-23-ruby-2-7-0-preview3-released.md b/ja/news/_posts/2019-11-23-ruby-2-7-0-preview3-released.md index f90479b4d1..f2907b2fbf 100644 --- a/ja/news/_posts/2019-11-23-ruby-2-7-0-preview3-released.md +++ b/ja/news/_posts/2019-11-23-ruby-2-7-0-preview3-released.md @@ -222,7 +222,7 @@ Ruby に添付されている REPL (Read-Eval-Print-Loop) である `irb` で、 Ruby 2.7 で楽しいプログラミングを! -## Download +## ダウンロード {% assign release = site.data.releases | where: "version", "2.7.0-preview3" | first %} diff --git a/ja/news/_posts/2019-12-17-ruby-2-7-0-rc1-released.md b/ja/news/_posts/2019-12-17-ruby-2-7-0-rc1-released.md index 232d8923a3..af1d3b0078 100644 --- a/ja/news/_posts/2019-12-17-ruby-2-7-0-rc1-released.md +++ b/ja/news/_posts/2019-12-17-ruby-2-7-0-rc1-released.md @@ -227,7 +227,7 @@ Ruby に添付されている REPL (Read-Eval-Print-Loop) である `irb` で、 Ruby 2.7 で楽しいプログラミングを! -## Download +## ダウンロード * <{{ release.url.bz2 }}> diff --git a/ja/news/_posts/2019-12-21-ruby-2-7-0-rc2-released.md b/ja/news/_posts/2019-12-21-ruby-2-7-0-rc2-released.md index 4f44f47865..d81ffeeb17 100644 --- a/ja/news/_posts/2019-12-21-ruby-2-7-0-rc2-released.md +++ b/ja/news/_posts/2019-12-21-ruby-2-7-0-rc2-released.md @@ -226,7 +226,7 @@ Ruby 2.7では`GC.compact` というメソッドを導入し、ヒープをコ Ruby 2.7 で楽しいプログラミングを! -## Download +## ダウンロード * <{{ release.url.bz2 }}> diff --git a/ja/news/_posts/2019-12-25-ruby-2-7-0-released.md b/ja/news/_posts/2019-12-25-ruby-2-7-0-released.md index afc4be0f13..7ae9a13dd6 100644 --- a/ja/news/_posts/2019-12-25-ruby-2-7-0-released.md +++ b/ja/news/_posts/2019-12-25-ruby-2-7-0-released.md @@ -246,7 +246,7 @@ Ruby 2.7では`GC.compact` というメソッドを導入し、ヒープをコ メリークリスマス、よいお年を、そして Ruby 2.7 で楽しいプログラミングを! -## Download +## ダウンロード * <{{ release.url.bz2 }}> diff --git a/ja/news/_posts/2020-03-19-json-dos-cve-2020-10663.md b/ja/news/_posts/2020-03-19-json-dos-cve-2020-10663.md index 7a265e4f8c..e928755853 100644 --- a/ja/news/_posts/2020-03-19-json-dos-cve-2020-10663.md +++ b/ja/news/_posts/2020-03-19-json-dos-cve-2020-10663.md @@ -29,10 +29,10 @@ json gemを2.3.0かそれ以降にしてください。`gem update json`でア * JSON gem 2.2.0 およびそれ以前のバージョン -## Credits +## クレジット この問題を発見したJeremy Evansに感謝します。 -## History +## 更新履歴 * 2020-03-19 22:00:00 (JST) 初版 diff --git a/ja/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md b/ja/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md index a62ce558d8..6bbab4ea68 100644 --- a/ja/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md +++ b/ja/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md @@ -18,17 +18,17 @@ socketライブラリにヒープ暴露の脆弱性が発見されました。 この問題はLinuxでのみ悪用されます。この問題はRuby 2.5.0からあります。2.4系列は脆弱ではありません。 -## Affected versions +## 影響を受けるバージョン * Ruby 2.5 系列: 2.5.7 およびそれ以前のバージョン * Ruby 2.6 系列: 2.6.5 およびそれ以前のバージョン * Ruby 2.7 系列: 2.7.0 * commit 61b7f86248bd121be2e83768be71ef289e8e5b90 より前の開発版 -## Credits +## クレジット この脆弱性情報は、Samuel Williams 氏によって報告されました。 -## History +## 更新履歴 * 2020-03-31 21:00:00 (JST) 初版 From b4a2762cd391595dc0e9ee0e039d23fcc195ec20 Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Sun, 26 Apr 2020 13:57:40 +0700 Subject: [PATCH 0045/1487] Translate separation of positional and keyword arguments in Ruby 3.0 (id) (#2380) --- ...ional-and-keyword-arguments-in-ruby-3-0.md | 473 ++++++++++++++++++ 1 file changed, 473 insertions(+) create mode 100644 id/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md diff --git a/id/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/id/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md new file mode 100644 index 0000000000..10353e4739 --- /dev/null +++ b/id/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -0,0 +1,473 @@ +--- +layout: news_post +title: "Pemisahan *positional* dan *keyword argument* pada Ruby 3.0" +author: "mame" +translator: "meisyal" +date: 2019-12-12 12:00:00 +0000 +lang: id +--- + +Artikel ini menjelaskan rencana *incompatibility* dari *keyword argument* +pada Ruby 3.0 + +## tl;dr + +Pada Ruby 3.0, *positional* dan *keyword argument* akan dipisahkan. Ruby 2.7 +akan memberi peringatan terhadap perilaku yang akan berubah pada Ruby 3.0. +Jika Anda melihat peringatan di bawah ini maka Anda perlu untuk memperbarui +kode Anda: + +* `Menggunakan *argument* terakhir sebagai parameter *argument* sudah usang`, atau +* `Melewatkan *keyword argument* sebagai parameter *hash* terakhir juga sudah usang`, atau +* `Memisahkan *argument* terakhir ke *positional* dan *keyword argument* juga sudah usang` + +Pada kebanyakan kasus, Anda dapat menghindari *compatibility* ini dengan +menambahkan operator _double splat_. Operator ini secara langsung melewatkan +*keyword argument* ketimbang sebuah objek `Hash`. Begitu juga, Anda mungkin +menambahkan tanda kurung kurawal `{}` untuk secara langsung melewatkan sebuah +objek `Hash` ketimbang *keyword argument*. Baca bagian "Kasus Khusus" di +bawah ini untuk lebih detail. + +Pada Ruby 3, sebuah *method* yang mendelegasikan semua *argument* harus secara +langsung mendelegasikan *keyword argument* dan *positional argument*. Jika +Anda ingin tetap menggunakan perilaku delegasi yang ditemukan pada Ruby 2.7 +dan sebelumnya, gunakan `ruby2_keywords`. Lihat bagian "Menangani delegasi +argument" untuk lebih detail. + +## Kasus Khusus +{: #typical-cases } + +Berikut adalah kasus yang paling khas. Anda dapat menggunakan operator *double +splat* (`**`) untuk melewatkan *keyword* daripada sebuah *Hash*. + +{% highlight ruby %} +# Method ini hanya menerima sebuah keyword argument +def foo(k: 1) + p k +end + +h = { k: 42 } + +# Pemanggilan method ini melewatkan sebuah positional Hash argument +# Pada Ruby 2.7: Hash secara otomatis diubah menjadi sebuah keyword argument +# Pada Ruby 3.0: Pemanggilan ini menyebabkan ArgumentError +foo(h) + # => demo.rb:11: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call + # demo.rb:2: warning: The called method `foo' is defined here + # 42 + +# Jika Anda ingin tetap menggunakan perilaku sebelumnya pada Ruby 3.0, gunakan double splat +foo(**h) #=> 42 +{% endhighlight %} + +Ini adalah kasus lainnya. Anda dapat menggunakan tanda kurung kurawal (`{}`) +untuk melewatkan sebuah objek *Hash* ketimbang *keyword* secara langsung. + +{% highlight ruby %} +# Method ini menerima satu positional argument dan sebuah keyword rest argument +def bar(h, **kwargs) + p h +end + +# Pemanggilan ini hanya melewatkan sebuah keyword argument tanpa positional argument +# Pada Ruby 2.7: keyword diubah ke sebuah positional Hash argument +# Pada Ruby 3.0: Pemanggilan ini menyebabkan ArgumentError +bar(k: 42) + # => demo2.rb:9: warning: Passing the keyword argument as the last hash parameter is deprecated + # demo2.rb:2: warning: The called method `bar' is defined here + # {:k=>42} + +# Jika Anda ingin tetap menggunakan perilaku sebelumnya pada Ruby 3.0, gunakan +# tanda kurung kurawal untuk mengubahnya menjadi sebuah explicit Hash +bar({ k: 42 }) # => {:k=>42} +{% endhighlight %} + +## Apa yang sudah usang? +{: #what-is-deprecated} + +Pada Ruby 2, *keyword argument* dapat dianggap sebagai *positional Hash argument* +terakhir dan sebuah *positional Hash argument* terakhir dapat dianggap sebagai +*keyword argument*. + +Karena pengubahan otomatis tersebut, kadang-kadang hal ini sangat kompleks dan +sulit seperti yang dideskripsikan pada bagian terakhir. Sehingga, sekarang +perilaku tersebut sudah usang pada Ruby 2.7 dan akan dihilangkan pada Ruby 3. +Dengan kata lain, *keyword argument* akan dipisahkan seluruhnya dari +*positional*-nya pada Ruby 3. Ketika Anda ingin melewatkan *keyword argument*, +Anda seharusnya selalu menggunakan `foo(k: expr)` atau `foo(**expr)`. Jika +Anda ingin menerima *keyword argument*, pada dasarnya Anda harus selalu +menggunakan `def foo(k: default)` atau `def foo(k:)` atau `def foo(**kwargs)`. + +Ingat bahwa Ruby 3.0 tidak membedakan perilaku ketika memanggil sebuah *method* +yang tidak menerima *keyword argument* dengan *method* yang menerima +*keyword argument*. Sebagai contoh, kasus berikut ini tidak akan usang dan +akan tetap berjalan pada Ruby 3.0. *Keyword argument* tetap dianggap sebagai +sebuah *positional Hash argument*. + +{% highlight ruby %} +def foo(kwargs = {}) + kwargs +end + +foo(k: 1) #=> {:k=>1} +{% endhighlight %} + +Hal ini karena gaya di atas sangat sering digunakan dan tidak ada ambiguitas +saat bagaimana *argument* seharusnya diperlakukan. Melarang pengubahan ini +akan menyebabkan *incompatibility* tambahan untuk manfaat yang sedikit. + +Namun demikian, gaya ini tidak direkomendasikan pada kode baru, kecuali anda +sering melewatkan sebuah *Hash* sebagai sebuah *positional argument* dan juga +menggunakan *keyword argument*. Jika tidak, gunakan *double splat*: + +{% highlight ruby %} +def foo(**kwargs) + kwargs +end + +foo(k: 1) #=> {:k=>1} +{% endhighlight %} + +## Akankah kode saya tidak berjalan pada Ruby 2.7? +{: #break-on-ruby-2-7 } + +Jawaban singkatnya adalah "mungkin tidak". + +Perubahan pada Ruby 2.7 didesain sebagai sebuah migrasi menuju 3.0. Pada +dasarnya, Ruby 2.7 hanya memperingatkan perilaku yang akan berubah pada Ruby 3, +ini termasuk beberapa perubahan *incompatible* yang kami pertimbangkan sangat +kecil. Lihat bagian "Perubahan kecil lainnya" untuk detail. + +Kecuali untuk peringatan dan perubahan kecil, Ruby 2.7 mencoba untuk tetap +*compatible* dengan Ruby 2.6. Sehingga, kode Anda mungkin akan berjalan pada +Ruby 2.7, walaupun mungkin mengeluarkan peringatan. Dengan menjalankannya pada +Ruby 2.7, Anda dapat mengecek jika kode Anda siap untuk Ruby 3.0. + +Jika Anda ingin mematikan peringatan *deprecation*, mohon gunakan *command-line +argument* `-W:no-deprecated` atau menambahkan `Warning[:deprecated] = false` +pada kode Anda. + +## Menangani delegasi argument +{: #delegation } + +### Ruby 2.6 dan sebelumnya +{: #delegation-ruby-2-6-or-prior } + +Pada Ruby 2, Anda dapat menulis sebuah *method* delegasi dengan menerima sebuah +*argument* `*rest` dan `&block` dan melewatkan keduanya ke *method* tujuan. +*Keyword argument* pada perilaku ini secara tidak langsung ditangani oleh +pengubahan otomatis antara *positional* dan *keyword argument*. + +{% highlight ruby %} +def foo(*args, &block) + target(*args, &block) +end +{% endhighlight %} + +### Ruby 3 +{: #delegation-ruby-3 } + +Anda butuh mendelegasikan *keyword argument* secara langsung. + +{% highlight ruby %} +def foo(*args, **kwargs, &block) + target(*args, **kwargs, &block) +end +{% endhighlight %} + +Kalau tidak, jika anda tidak membutuhkan *compatibility* dengan Ruby 2.6 atau +sebelumnya dan Anda tidak mengubah *argument* apapun, Anda dapat menggunakan +sintaks delegasi baru (`...`) yang dikenalkan pada Ruby 2.7. + +{% highlight ruby %} +def foo(...) + target(...) +end +{% endhighlight %} + +### Ruby 2.7 +{: #delegation-ruby-2-7 } + +Secara singkat: gunakan `Module#ruby2_keywords` dan delegasikan `*args, &block`. + +{% highlight ruby %} +ruby2_keywords def foo(*args, &block) + target(*args, &block) +end +{% endhighlight %} + +`ruby2_keywords` menerima *keyword argument* sebagai *Hash argument* terakhir +dan melewatkannya sebagai *keyword argument* ketika memanggil *method* lain. + +Faktanya, Ruby 2.7 memperbolehkan gaya baru delegasi pada kebanyakan kasus. +Namun, ada sebuah *corner case* yang diketahui. Lihat pada bagian berikutnya. + +### Sebuah compatible delegation yang berjalan pada Ruby 2.6, 2.7, dan 3 +{: #a-compatible-delegation } + +Secara singkat: menggunakan `Module#ruby2_keywords` lagi. + +{% highlight ruby %} +ruby2_keywords def foo(*args, &block) + target(*args, &block) +end +{% endhighlight %} + +Sayangnya, kami perlu untuk menggunakan delegasi gaya lama (seperti, tanpa +`**kwargs`) karena Ruby 2.6 dan sebelumnya tidak dapat menangani gaya delegasi +baru dengan benar. Ini adalah satu alasan dari pemisahan *keyword argument*; +detail dijelaskan di bagian akhir. `ruby2_keywords` memperbolehkan Anda untuk +menjalankan gaya lama walaupun pada Ruby 2.7 dan 3.0. Karena tidak ada +`ruby2_keywords` pada 2.6 atau sebelumnya, mohon gunakan +[ruby2_keywords gem](https://rubygems.org/gems/ruby2_keywords) atau definisikan +sendiri: + +{% highlight ruby %} +def ruby2_keywords(*) +end if RUBY_VERSION < "2.7" +{% endhighlight %} + +--- + +Jika kode Anda tidak harus berjalan pada Ruby 2.6 atau sebelumnya, Anda bisa +mencoba gaya baru pada Ruby 2.7. Pada kebanyakan kasusu, ini berjalan. Catat +bahwa masih ada *corner case* berikut: + +{% highlight ruby %} +def target(*args) + p args +end + +def foo(*args, **kwargs, &block) + target(*args, **kwargs, &block) +end + +foo({}) #=> Ruby 2.7: [] ({} dibuang) +foo({}, **{}) #=> Ruby 2.7: [{}] (Anda dapat melewatkan {} dengan secara langsung melewatkan tanpa keyword) +{% endhighlight %} + +Sebuah *Hash argument* kosong secara otomatis diubah dan diserap menjadi +`**kwargs` dan pemanggilan delegasi menghilangkan *keyword hash* kosong, +sehinggan tanpa argument dilewatkan ke `target`. Sejauh yang kami tahu, +*corner case* hanya ini. + +Seperti yang tertulis di baris terakhir, Anda dapat menyelesaikan masalah ini +dengan menggunakan `**{}`. + +Jika Anda sangat khawatir terkait *portability*, gunakan `ruby2_keywords`. +(Diakui bahwa Ruby 2.6 dan sebelumnya memiliki banyak *corner case* pada +*keyword argument*. :-) `ruby2_keywords` ke depan mungkin dihilangkan setelah +masa Ruby 2.6 berakhir. Pada saat tersebut, kami merekomendasikan untuk secara +langsung mendelegasikan *keyword argument* (lihat kode Ruby 3 di atas). + +## Perubahan kecil lainnya +{: #other-minor-changes } + +Ada tiga perubahan kecil terkait *keyword argument* pada Ruby 2.7. + +### 1. Non-symbol key diperbolehkan pada keyword argument +{: #other-minor-changes-non-symbol-keys } + +Pada Ruby 2.6 dan sebelumnya, hanya *Symbol key* yang diperbolehkan pada +*keyword argument*. *Keyword argument* dapat menggunakan *non-Symbol key* pada +Ruby 2.7. + +{% highlight ruby %} +def foo(**kwargs) + kwargs +end +foo("key" => 42) + #=> Ruby 2.6 dan sebelumnya: ArgumentError: wrong number of arguments + #=> Ruby 2.7 dan setelahnya: {"key"=>42} +{% endhighlight %} + +Jika sebuah *method* menerima baik *optional* maupun *keyword argument*, objek +*Hash* yang memiliki *Symbol* dan *non-Symbol* key dipisah menjadi dua pada +Ruby 2.6. Pada Ruby 2.7, keduanya diterima sebagai *keyword* karena *non-Symbol +key* diperbolehkan. + +{% highlight ruby %} +def bar(x=1, **kwargs) + p [x, kwargs] +end + +bar("key" => 42, :sym => 43) + #=> Ruby 2.6: [{"key"=>42}, {:sym=>43}] + #=> Ruby 2.7: [1, {"key"=>42, :sym=>43}] + +# Gunakan tanda kurung kurawal untuk menjaga perilaku +bar({"key" => 42}, :sym => 43) + #=> Ruby 2.6 and 2.7: [{"key"=>42}, {:sym=>43}] +{% endhighlight %} + +Ruby 2.7 masih memisahkan *hash* dengan sebuah peringatan jika sebuah *Hash* +atau *keyword argument* dengan *Symbol* dan *non-Symbol key* ke sebuah *method* +yang menerima *keyword* secara langsung, tetapi tidak ada *keyword rest argument* +(`**kwargs`). Perilaku ini akan dihilangkan pada Ruby 3 dan `ArgumentError` +akan muncul. + +{% highlight ruby %} +def bar(x=1, sym: nil) + p [x, sym] +end + +bar("key" => 42, :sym => 43) +# Ruby 2.6 and 2.7: => [{"key"=>42}, 43] +# Ruby 2.7: warning: Splitting the last argument into positional and keyword parameters is deprecated +# warning: The called method `bar' is defined here +# Ruby 3.0: ArgumentError +{% endhighlight %} + +### 2. Double splat dengan sebuah hash kosong (`**{}`) melewati tanpa argument +{: #other-minot-changes-empty-hash } + +Ruby 2.6 dan sebelumnya melewatkan `**empty_hash` ke sebuah *Hash* kosong +sebagai sebuah *positional argument*. Ruby 2.7 dan setelahnya akan melewatkan +tanpa *argument*. + +{% highlight ruby %} +def foo(*args) + args +end + +empty_hash = {} +foo(**empty_hash) + #=> Ruby 2.6 dan sebelumnya: [{}] + #=> Ruby 2.7 dan setelahnya: [] +{% endhighlight %} + +Catat bahwa `foo(**{})` tidak melewatkan apapun baik di Ruby 2.6 maupun Ruby 2.7. +Pada Ruby 2.6 dan sebelumnya, `**{}` dihilangkan oleh *parser*. Hal ini berlaku +sama seperti `**empty_hash` pada Ruby 2.7 dan setelahnya, memperbolehkan untuk +jalan mudah melewatkan tanpa *keyword argument* ke sebuah *method*. + +Ketika memanggil sebuah *method* dengan jumlah *required positional argument* +yang kurang pada Ruby 2.7, `foo(**empty_hash)` melewatkan sebuah *hash* kosong +dengan sebuah peringatan untuk *compatible* dengan Ruby 2.6. Perilaku ini akan +dihilangkan pada Ruby 3.0. + +{% highlight ruby %} +def foo(x) + x +end + +empty_hash = {} +foo(**empty_hash) + #=> Ruby 2.6 dan sebelumnya: {} + #=> Ruby 2.7: warning: Passing the keyword argument as the last hash parameter is deprecated + # warning: The called method `foo' is defined here + #=> Ruby 3.0: ArgumentError: wrong number of arguments +{% endhighlight %} + +### 3. Sintaks no-keyword-argument (`**nil`) diperkenalkan +{: #other-minor-changes-double-splat-nil } + +Anda dapat menggunakan `**nil` pada sebuah definisi *method* untuk menandakan +secara langsung bahwa *method* menerima tanpa *keyword argument*. Pemanggilan +seperti ini dengan *keyword argument* akan menghasilkan `ArgumentError`. +(Ini sebenarnya adalah fitur baru, bukan *compatibility*). + +{% highlight ruby %} +def foo(*args, **nil) +end + +foo(k: 1) + #=> Ruby 2.7 dan setelahnya: no keywords accepted (ArgumentError) +{% endhighlight %} + +Ini berguna untuk menandakan secara langsung jika *method* tidak dapat menerima +*keyword argument*. Jika tidak, *keyword* akan diserap pada *rest argument* +sesuai contoh di atas. Jika Anda memperluas sebuah *method* untuk menerima +*keyword argument*, *method* mungkin memiliki *incompatibility* berikut: + +{% highlight ruby %} +# Jika sebuah method menerima rest argument dan tanpa `**nil` +def foo(*args) + p args +end + +# Keyword yang dilewatkan diubah menjadi sebuah objek Hash (walaupun di Ruby 3.0) +foo(k: 1) #=> [{:k=>1}] + +# Jika method diperluas untuk menerima sebuah keyword +def foo(*args, mode: false) + p args +end + +# Pemanggilan yang sudah ada mungkin tidak berjalan +foo(k: 1) #=> ArgumentError: unknown keyword k +{% endhighlight %} + +## Mengapa kami membuat usang konversi otomatis +{: #why-deprecated } + +Konversi otomatis pada mulanya muncul sebagai sebuah ide bagus dan bekerja +dengan baik di banyak kasus. Namun, hal ini memiliki banyak *corner case* dan +kami telah menerima banyak laporan *bug* terhadap perilaku tersebut. + +Konversi otomatis tidak bekerja dengan baik ketika sebuah *method* menerima +*optional positional argument* dan *keyword argument*. Beberapa orang +mengharapkan objek *Hash* terakhir dianggap sebagai sebuah *positional argument* +dan lainnya mengharapkan diubah menjadi *keyword argument*. + +Berikut adalah salah satu kasus yang sangat membingungkan: + +{% highlight ruby %} +def foo(x, **kwargs) + p [x, kwargs] +end + +def bar(x=1, **kwargs) + p [x, kwargs] +end + +foo({}) => [{}, {}] +bar({}) => [1, {}] + +bar({}, **{}) => expected: [{}, {}], actual: [1, {}] +{% endhighlight %} + +Pada Ruby 2, `foo({})` melewatkan sebuah *hash* kosong sebagai *normal argument* +(contoh, `{}` ditetapkan sebagai `x`), sementara `bar({})` melewatkan sebuah +*keyword argument* (contoh, `{}` ditetapkan sebagai `kwargs`). Sehingga, +`any_method({})` sangat ambigu. + +Masalah yang sama juga berlaku pada *method* yang menerima *rest* dan *keyword +argument*. Ini membuat delegasi langsung *keyword argument* tidak berjalan + +{% highlight ruby %} +def target(*args) + p args +end + +def foo(*args, **kwargs, &block) + target(*args, **kwargs, &block) +end + +foo() #=> Ruby 2.6 dan sebelumnya: [{}] + #=> Ruby 2.7 dan setelahnya: [] +{% endhighlight %} + +`foo()` melewatkan tanpa *argument*, tetapi *target* menerima sebuah *hash +argument* kosong pada Ruby 2.6. Hal ini karena *method* `foo` mendelegasikan +*keyword* (`kwargs`) secara langsung. Ketika `foo()` dipanggil, `args` adalah +sebuah *Array* kosong, `kwargs` adalah sebuah *Hash* kosong, dan `block` +adalah `nil`. Kemudian, `target(*args, **kwargs, &block)` melewatkan sebuah +*Hash* kosong sebagai *argument* karena `**kwargs` secara otomatis diubah +ke sebuah *positional Hash argument*. + +Konversi otomatis tidak hanya membingungkan orang akan tetapi membuat *method* +kurang *extensible*. Lihat +[[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) untuk lebih detail +terkait alasan perubahan perilaku ini dan mengapa pilihan implementasi ini +dibuat. + +## Rujukan + +Artikel ini telah diperiksa (atau bahkan *co-authored*) oleh Jeremy Evans dan +Benoit Daloze. + +## Riwayat + +* Diperbarui 2019-12-25: Pada 2.7.0-rc2, pesan peringatan sedikit diubah dan +sebuah API untuk membenamkan peringatan telah ditambahkan. From 190fe087167d2b100979f0ae5ed0a126f58b9664 Mon Sep 17 00:00:00 2001 From: ishanray Date: Sun, 26 Apr 2020 20:04:00 -0400 Subject: [PATCH 0046/1487] Update FAQ (en) (#2439) --- en/documentation/faq/2/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/documentation/faq/2/index.md b/en/documentation/faq/2/index.md index eda470ace3..c1efec2c51 100644 --- a/en/documentation/faq/2/index.md +++ b/en/documentation/faq/2/index.md @@ -63,7 +63,7 @@ the other direction---everything is an object. If the user doesn't grok objects yet, they can just pretend that `def` is a function definition and still get useful work done. -Ruby's OO purity provides a number features that Python lacks or is still +Ruby's OO purity provides a number of features that Python lacks or is still working toward: a unified type/class hierarchy, metaclasses, the ability to subclass everything, and uniform method invocation (none of this `len()` is a function but `items()` is a method rubbish). Ruby, like Smalltalk, only From 2160d4157edb7c6e462a3039a51b7677a8cbaafb Mon Sep 17 00:00:00 2001 From: 088Pause <088haizi@gmail.com> Date: Mon, 27 Apr 2020 10:24:17 +0800 Subject: [PATCH 0047/1487] Translate support-of-ruby-2-4-has-ended news (zh-cn) (#2440) Co-authored-by: JiangHaohao <088pause@gmail.com> --- ...020-04-05-support-of-ruby-2-4-has-ended.md | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 zh_cn/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md diff --git a/zh_cn/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md b/zh_cn/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md new file mode 100644 index 0000000000..dd0ea70351 --- /dev/null +++ b/zh_cn/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md @@ -0,0 +1,26 @@ +--- +layout: news_post +title: "终止支持 Ruby 2.4" +author: "usa" +translator: "江浩浩" +date: 2020-04-05 12:00:00 +0000 +lang: zh_cn +--- + +我们宣布,对 Ruby 2.4 系列的支持全部结束。 + +自去年 3 月底开始,Ruby 2.4 系列进入安全维护阶段。一年过去了,这个阶段告一段落。因此,自 2020 年 3 月 31 日起,对 Ruby 2.4 系列的支持全部结束。来自 Ruby 较新版本的缺陷和安全修正不再移植到 2.4 系列,也不再发布 2.4 的补丁版本。我们于 2020 年 3 月 31 日发布了 Ruby 2.4.10,但这是出于给用户一点时间来迁移到更新的版本。我们强烈建议你尽快升级到更新的版本。 + +## 关于目前支持的 Ruby 版本 + +### Ruby 2.7 系列 + +目前处于常规维护阶段。必要时,我们会移植缺陷修正,发布新版。如果发现严重安全问题,我们会发布紧急修正版。 + +### Ruby 2.6 系列 + +目前处于常规维护阶段。必要时,我们会移植缺陷修正,发布新版。如果发现严重安全问题,我们会发布紧急修正版。 + +### Ruby 2.5 系列 + +目前处于安全维护阶段。除了安全修正之外,不再把缺陷修正移植到 2.5 系列。如果发现严重安全问题,我们会发布紧急修正版。我们对 Ruby 2.5 系列的支持计划在 2021 年 3 月底结束。 From 003044b488cc44f0cda1ee8f2d44785d2ebf3553 Mon Sep 17 00:00:00 2001 From: "k.wakitani" Date: Wed, 29 Apr 2020 11:07:16 +0900 Subject: [PATCH 0048/1487] Translate 2.4.10, 2.5.8, 2.6.6 & 2.7.1 posts (ja) --- .../_posts/2020-03-31-ruby-2-4-10-released.md | 56 +++++++++++++++++++ .../_posts/2020-03-31-ruby-2-5-8-released.md | 53 ++++++++++++++++++ .../_posts/2020-03-31-ruby-2-6-6-released.md | 53 ++++++++++++++++++ .../_posts/2020-03-31-ruby-2-7-1-released.md | 53 ++++++++++++++++++ 4 files changed, 215 insertions(+) create mode 100644 ja/news/_posts/2020-03-31-ruby-2-4-10-released.md create mode 100644 ja/news/_posts/2020-03-31-ruby-2-5-8-released.md create mode 100644 ja/news/_posts/2020-03-31-ruby-2-6-6-released.md create mode 100644 ja/news/_posts/2020-03-31-ruby-2-7-1-released.md diff --git a/ja/news/_posts/2020-03-31-ruby-2-4-10-released.md b/ja/news/_posts/2020-03-31-ruby-2-4-10-released.md new file mode 100644 index 0000000000..02c996ab27 --- /dev/null +++ b/ja/news/_posts/2020-03-31-ruby-2-4-10-released.md @@ -0,0 +1,56 @@ +--- +layout: news_post +title: "Ruby 2.4.10 リリース" +author: "usa" +translator: "wktk" +date: 2020-03-31 12:00:00 +0000 +lang: ja +--- + +Ruby 2.4.10 がリリースされました。 + +このリリースには以下の脆弱性修正が含まれています。 + +* [CVE-2020-10663: JSON における安全でないオブジェクトの生成の脆弱性について(追加の修正)]({% link ja/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) + +Ruby 2.4 系列は、現在、セキュリティメンテナンスフェーズにあります。 +このフェーズ中は、重大なセキュリティ上の問題への対応のみが行われます。 +現在の予定では、2020 年 3 月末頃を目処に、2.4 系列のセキュリティメンテナンスならびに公式サポートは終了する見込みです。 +従って、以後 2.4 系列からの新たな公式リリースは行われません。 +現在 2.4 系列を利用しているユーザーの皆さんは、なるべく早く、2.7 系列等のより新しいバージョン系列の Ruby への移行を行ってください。 + +## ダウンロード + +{% assign release = site.data.releases | where: "version", "2.4.10" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## リリースコメント + +リリースに協力してくれた皆様、また、脆弱性情報を報告してくれた皆様に感謝します。 diff --git a/ja/news/_posts/2020-03-31-ruby-2-5-8-released.md b/ja/news/_posts/2020-03-31-ruby-2-5-8-released.md new file mode 100644 index 0000000000..39314fa069 --- /dev/null +++ b/ja/news/_posts/2020-03-31-ruby-2-5-8-released.md @@ -0,0 +1,53 @@ +--- +layout: news_post +title: "Ruby 2.5.8 リリース" +author: "usa" +translator: "wktk" +date: 2020-03-31 12:00:00 +0000 +lang: ja +--- + +Ruby 2.5.8 がリリースされました。 + +このリリースには以下の脆弱性修正が含まれています。 + +* [CVE-2020-10663: JSON における安全でないオブジェクトの生成の脆弱性について(追加の修正)]({% link ja/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10933: socketライブラリのヒープ暴露脆弱性について]({% link ja/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) + +詳細は [commit log](https://github.com/ruby/ruby/compare/v2_5_7...v2_5_8) を参照してください。 + +## ダウンロード + +{% assign release = site.data.releases | where: "version", "2.5.8" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## リリースコメント + +リリースに協力してくれた皆様、また、脆弱性情報を報告してくれた皆様に感謝します。 diff --git a/ja/news/_posts/2020-03-31-ruby-2-6-6-released.md b/ja/news/_posts/2020-03-31-ruby-2-6-6-released.md new file mode 100644 index 0000000000..01e866605c --- /dev/null +++ b/ja/news/_posts/2020-03-31-ruby-2-6-6-released.md @@ -0,0 +1,53 @@ +--- +layout: news_post +title: "Ruby 2.6.6 リリース" +author: "nagachika" +translator: "wktk" +date: 2020-03-31 12:00:00 +0000 +lang: ja +--- + +Ruby 2.6.6 がリリースされました。 + +このリリースには以下の脆弱性修正が含まれています。 + +* [CVE-2020-10663: JSON における安全でないオブジェクトの生成の脆弱性について(追加の修正)]({% link ja/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10933: socketライブラリのヒープ暴露脆弱性について]({% link ja/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) + +詳細は [commit log](https://github.com/ruby/ruby/compare/v2_6_5...v2_6_6) を参照してください。 + +## ダウンロード + +{% assign release = site.data.releases | where: "version", "2.6.6" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## リリースコメント + +このリリースにあたり、多くのコミッター、開発者、バグ報告をしてくれたユーザーの皆様に感謝を申し上げます。 diff --git a/ja/news/_posts/2020-03-31-ruby-2-7-1-released.md b/ja/news/_posts/2020-03-31-ruby-2-7-1-released.md new file mode 100644 index 0000000000..271dcdbde1 --- /dev/null +++ b/ja/news/_posts/2020-03-31-ruby-2-7-1-released.md @@ -0,0 +1,53 @@ +--- +layout: news_post +title: "Ruby 2.7.1 リリース" +author: "naruse" +translator: "wktk" +date: 2020-03-31 12:00:00 +0000 +lang: ja +--- + +Ruby 2.7.1 がリリースされました。 + +このリリースには以下の脆弱性修正が含まれています。 + +* [CVE-2020-10663: JSON における安全でないオブジェクトの生成の脆弱性について(追加の修正)]({% link ja/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10933: socketライブラリのヒープ暴露脆弱性について]({% link ja/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) + +詳細は [commit log](https://github.com/ruby/ruby/compare/v2_7_0...v2_7_1) を参照してください。 + +## ダウンロード + +{% assign release = site.data.releases | where: "version", "2.7.1" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## リリースコメント + +このリリースにあたり、多くのコミッター、開発者、バグ報告をしてくれたユーザーの皆様に感謝を申し上げます。 From ee6082bb6a03c48322c4ffbdddb9a6fc8d760ac4 Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Wed, 29 Apr 2020 09:16:37 +0300 Subject: [PATCH 0049/1487] Fix syntax highlighted code blocks in lists (de, es) --- ...2019-10-22-ruby-2-7-0-preview2-released.md | 48 +++++++++---------- ...2019-11-23-ruby-2-7-0-preview3-released.md | 48 +++++++++---------- .../2019-12-17-ruby-2-7-0-rc1-released.md | 4 +- .../2019-12-21-ruby-2-7-0-rc2-released.md | 4 +- .../_posts/2019-12-25-ruby-2-7-0-released.md | 4 +- ...2019-10-22-ruby-2-7-0-preview2-released.md | 12 +++-- ...2019-11-23-ruby-2-7-0-preview3-released.md | 12 +++-- .../2019-12-17-ruby-2-7-0-rc1-released.md | 12 +++-- .../2019-12-21-ruby-2-7-0-rc2-released.md | 12 +++-- .../_posts/2019-12-25-ruby-2-7-0-released.md | 12 +++-- 10 files changed, 94 insertions(+), 74 deletions(-) diff --git a/de/news/_posts/2019-10-22-ruby-2-7-0-preview2-released.md b/de/news/_posts/2019-10-22-ruby-2-7-0-preview2-released.md index f214ed0ff9..a934d442a6 100644 --- a/de/news/_posts/2019-10-22-ruby-2-7-0-preview2-released.md +++ b/de/news/_posts/2019-10-22-ruby-2-7-0-preview2-released.md @@ -44,13 +44,13 @@ Programmiersprache Ruby eingeführt. [#14912](https://bugs.ruby-lang.org/issues/ Ein Musterabgleich untersucht das übergebene Objekt und weist seinen Wert dann zu, wenn er auf ein bestimmtes Muster passt. -{% highlight ruby %} +```ruby case JSON.parse('{...}', symbolize_names: true) in {name: "Alice", children: [{name: "Bob", age: age}]} p age ... end -{% endhighlight %} +``` Weitere Details können Sie der Präsentation [Musterabgleiche - Neue Funktion in Ruby 2.7](https://speakerdeck.com/k_tsj/pattern-matching-new-feature-in-ruby-2-dot-7) entnehmen. @@ -89,12 +89,12 @@ werden. [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) vermieden und das korrekte Verhalten in Ruby 3 sichergestellt werden. - {% highlight ruby %} + ```ruby def foo(key: 42); end; foo({key: 42}) # Warnung def foo(**kw); end; foo({key: 42}) # Warnung def foo(key: 42); end; foo(**{key: 42}) # OK def foo(**kw); end; foo(**{key: 42}) # OK - {% endhighlight %} + ``` * Wenn bei einem Methodenaufruf Schlüsselwortargumente an eine Methode, die auch Schlüsselwortargumente akzeptiert, übergeben @@ -105,12 +105,12 @@ werden. [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) Schlüsselwortargumentliste, um die Warnung zu vermeiden und korrektes Verhalten in Ruby 3 sicherzustellen. - {% highlight ruby %} + ```ruby def foo(h, **kw); end; foo(key: 42) # Warnung def foo(h, key: 42); end; foo(key: 42) # Warnung def foo(h, **kw); end; foo({key: 42}) # OK def foo(h, key: 42); end; foo({key: 42}) # OK - {% endhighlight %} + ``` * Wenn eine Methode bestimmte Schlüsselwortargumente, nicht aber den doppelten Auflösungsoperator verwendet, und ein Hash oder eine @@ -120,11 +120,11 @@ werden. [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) Verhalten in Ruby 3 den aufrufenden Code so ändern, dass zwei einzelne Hashes übergeben werden. - {% highlight ruby %} + ```ruby def foo(h={}, key: 42); end; foo("key" => 43, key: 42) # Warnung def foo(h={}, key: 42); end; foo({"key" => 43, key: 42}) # Warnung def foo(h={}, key: 42); end; foo({"key" => 43}, key: 42) # OK - {% endhighlight %} + ``` * Wenn eine Methode keine Schlüsselwortargumente akzeptiert, aber mit solchen aufgerufen wird, werden solche Schlüsselwortargumente @@ -132,30 +132,30 @@ werden. [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) interpretiert. Dieses Verhalten wird auch in Ruby 3 weiterhin beibehalten. - {% highlight ruby %} + ```ruby def foo(opt={}); end; foo( key: 42 ) # OK - {% endhighlight %} + ``` * Schlüsselwortargumente mit anderen Schlüsseln als Symbolen sind zulässig, wenn die Methode beliebige Schlüsselwortargumente akzeptiert. [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) - {% highlight ruby %} + ```ruby def foo(**kw); p kw; end; foo("str" => 1) #=> {"str"=>1} - {% endhighlight %} + ``` * **nil kann genutzt werden, um in einer Methodendefinition ausdrücklich festzulegen, dass die Methode keine Schlüsselwörter akzeptiert. Der Aufruf einer solchen Methode mit Schlüsselwortargumenten erzeugt einen ArgumentError. [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) - {% highlight ruby %} + ```ruby def foo(h, **nil); end; foo(key: 1) # ArgumentError def foo(h, **nil); end; foo(**{key: 1}) # ArgumentError def foo(h, **nil); end; foo("str" => 1) # ArgumentError def foo(h, **nil); end; foo({key: 1}) # OK def foo(h, **nil); end; foo({"str" => 1}) # OK - {% endhighlight %} + ``` * Die Übergabe einess leeren doppelten Auflösungsoperators an eine Methode, die keine Schlüsselwortargumente akzeptiert, führt nicht @@ -165,12 +165,12 @@ werden. [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) doppelten Auflösungsoperator, um ein Hash als Positionsargument zu übergeben. [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) - {% highlight ruby %} + ```ruby h = {}; def foo(*a) a end; foo(**h) # [] h = {}; def foo(a) a end; foo(**h) # {} und Warnung h = {}; def foo(*a) a end; foo(h) # [{}] h = {}; def foo(a) a end; foo(h) # {} - {% endhighlight %} + ``` ## Sonstige bemerkenswerte neue Funktionen @@ -186,39 +186,39 @@ werden. [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) domänenspezifische Sprachen praktisch sein. [#14799](https://bugs.ruby-lang.org/issues/14799) - {% highlight ruby %} + ```ruby ary[..3] # identical to ary[0..3] rel.where(sales: ..100) - {% endhighlight %} + ``` * `Enumerable#tally` wird hinzugefügt. Die Methode zählt das Vorkommen jedes Elements. - {% highlight ruby %} + ```ruby ["a", "b", "c", "b"].tally #=> {"a"=>1, "b"=>2, "c"=>1} - {% endhighlight %} + ``` * Es ist jetzt zulässig, eine private Methode auf `self` aufzurufen. [[Feature #11297]](https://bugs.ruby-lang.org/issues/11297) [[Feature #16123]](https://bugs.ruby-lang.org/issues/16123) - {% highlight ruby %} + ```ruby def foo end private :foo self.foo - {% endhighlight %} + ``` * `Enumerator::Lazy#eager` wird hinzugefügt. Diese Methode generiert einen nicht verzögertern Enumerator (_non-lazy enumerator_) aus einem verzögerten Enumerator (_lazy enumerator_). [[Feature #15901]](https://bugs.ruby-lang.org/issues/15901) - {% highlight ruby %} + ```ruby a = %w(foo bar baz) e = a.lazy.map {|x| x.upcase }.map {|x| x + "!" }.eager p e.class #=> Enumerator p e.map {|x| x + "?" } #=> ["FOO!?", "BAR!?", "BAZ!?"] - {% endhighlight %} + ``` ## Performanzverbesserungen diff --git a/de/news/_posts/2019-11-23-ruby-2-7-0-preview3-released.md b/de/news/_posts/2019-11-23-ruby-2-7-0-preview3-released.md index 826eaa71b2..e9f08507db 100644 --- a/de/news/_posts/2019-11-23-ruby-2-7-0-preview3-released.md +++ b/de/news/_posts/2019-11-23-ruby-2-7-0-preview3-released.md @@ -48,7 +48,7 @@ Programmiersprache Ruby eingeführt. [#14912](https://bugs.ruby-lang.org/issues/ Ein Musterabgleich untersucht das übergebene Objekt und weist seinen Wert dann zu, wenn er auf ein bestimmtes Muster passt. -{% highlight ruby %} +```ruby require "json" json = < 2 end -{% endhighlight %} +``` Weitere Details können Sie der Präsentation [Musterabgleiche - Neue Funktion in Ruby 2.7](https://speakerdeck.com/k_tsj/pattern-matching-new-feature-in-ruby-2-dot-7) entnehmen. @@ -101,12 +101,12 @@ werden. [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) vermieden und das korrekte Verhalten in Ruby 3 sichergestellt werden. - {% highlight ruby %} + ```ruby def foo(key: 42); end; foo({key: 42}) # Warnung def foo(**kw); end; foo({key: 42}) # Warnung def foo(key: 42); end; foo(**{key: 42}) # OK def foo(**kw); end; foo(**{key: 42}) # OK - {% endhighlight %} + ``` * Wenn bei einem Methodenaufruf Schlüsselwortargumente an eine Methode, die auch Schlüsselwortargumente akzeptiert, übergeben @@ -117,12 +117,12 @@ werden. [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) Schlüsselwortargumentliste, um die Warnung zu vermeiden und korrektes Verhalten in Ruby 3 sicherzustellen. - {% highlight ruby %} + ```ruby def foo(h, **kw); end; foo(key: 42) # Warnung def foo(h, key: 42); end; foo(key: 42) # Warnung def foo(h, **kw); end; foo({key: 42}) # OK def foo(h, key: 42); end; foo({key: 42}) # OK - {% endhighlight %} + ``` * Wenn eine Methode bestimmte Schlüsselwortargumente, nicht aber den doppelten Auflösungsoperator verwendet, und ein Hash oder eine @@ -132,11 +132,11 @@ werden. [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) Verhalten in Ruby 3 den aufrufenden Code so ändern, dass zwei einzelne Hashes übergeben werden. - {% highlight ruby %} + ```ruby def foo(h={}, key: 42); end; foo("key" => 43, key: 42) # Warnung def foo(h={}, key: 42); end; foo({"key" => 43, key: 42}) # Warnung def foo(h={}, key: 42); end; foo({"key" => 43}, key: 42) # OK - {% endhighlight %} + ``` * Wenn eine Methode keine Schlüsselwortargumente akzeptiert, aber mit solchen aufgerufen wird, werden solche Schlüsselwortargumente @@ -144,30 +144,30 @@ werden. [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) interpretiert. Dieses Verhalten wird auch in Ruby 3 weiterhin beibehalten. - {% highlight ruby %} + ```ruby def foo(opt={}); end; foo( key: 42 ) # OK - {% endhighlight %} + ``` * Schlüsselwortargumente mit anderen Schlüsseln als Symbolen sind zulässig, wenn die Methode beliebige Schlüsselwortargumente akzeptiert. [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) - {% highlight ruby %} + ```ruby def foo(**kw); p kw; end; foo("str" => 1) #=> {"str"=>1} - {% endhighlight %} + ``` * **nil kann genutzt werden, um in einer Methodendefinition ausdrücklich festzulegen, dass die Methode keine Schlüsselwörter akzeptiert. Der Aufruf einer solchen Methode mit Schlüsselwortargumenten erzeugt einen ArgumentError. [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) - {% highlight ruby %} + ```ruby def foo(h, **nil); end; foo(key: 1) # ArgumentError def foo(h, **nil); end; foo(**{key: 1}) # ArgumentError def foo(h, **nil); end; foo("str" => 1) # ArgumentError def foo(h, **nil); end; foo({key: 1}) # OK def foo(h, **nil); end; foo({"str" => 1}) # OK - {% endhighlight %} + ``` * Die Übergabe einess leeren doppelten Auflösungsoperators an eine Methode, die keine Schlüsselwortargumente akzeptiert, führt nicht @@ -177,12 +177,12 @@ werden. [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) doppelten Auflösungsoperator, um ein Hash als Positionsargument zu übergeben. [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) - {% highlight ruby %} + ```ruby h = {}; def foo(*a) a end; foo(**h) # [] h = {}; def foo(a) a end; foo(**h) # {} und Warnung h = {}; def foo(*a) a end; foo(h) # [{}] h = {}; def foo(a) a end; foo(h) # {} - {% endhighlight %} + ``` HINWEIS: Es ist darauf hingewiesen worden, dass die vielen Warnungen über die Inkompatibilität von Schlüsselwortargumenten störend sind. Derzeit @@ -207,40 +207,40 @@ jedoch bis zur offiziellen Veröffentlichung nachgeholt. domänenspezifische Sprachen praktisch sein. [#14799](https://bugs.ruby-lang.org/issues/14799) - {% highlight ruby %} + ```ruby ary[..3] # identical to ary[0..3] rel.where(sales: ..100) - {% endhighlight %} + ``` * `Enumerable#tally` wird hinzugefügt. Die Methode zählt das Vorkommen jedes Elements. - {% highlight ruby %} + ```ruby ["a", "b", "c", "b"].tally #=> {"a"=>1, "b"=>2, "c"=>1} - {% endhighlight %} + ``` * Es ist jetzt zulässig, eine private Methode auf `self` aufzurufen. [[Feature #11297]](https://bugs.ruby-lang.org/issues/11297) [[Feature #16123]](https://bugs.ruby-lang.org/issues/16123) - {% highlight ruby %} + ```ruby def foo end private :foo self.foo - {% endhighlight %} + ``` * `Enumerator::Lazy#eager` wird hinzugefügt. Diese Methode generiert einen nicht verzögertern Enumerator (_non-lazy enumerator_) aus einem verzögerten Enumerator (_lazy enumerator_). [[Feature #15901]](https://bugs.ruby-lang.org/issues/15901) - {% highlight ruby %} + ```ruby a = %w(foo bar baz) e = a.lazy.map {|x| x.upcase }.map {|x| x + "!" }.eager p e.class #=> Enumerator p e.map {|x| x + "?" } #=> ["FOO!?", "BAR!?", "BAZ!?"] - {% endhighlight %} + ``` ## Performanzverbesserungen diff --git a/de/news/_posts/2019-12-17-ruby-2-7-0-rc1-released.md b/de/news/_posts/2019-12-17-ruby-2-7-0-rc1-released.md index 52cc576444..79c9eb2f36 100644 --- a/de/news/_posts/2019-12-17-ruby-2-7-0-rc1-released.md +++ b/de/news/_posts/2019-12-17-ruby-2-7-0-rc1-released.md @@ -50,7 +50,7 @@ Programmiersprache Ruby eingeführt. [#14912](https://bugs.ruby-lang.org/issues/ Ein Musterabgleich untersucht das übergebene Objekt und weist seinen Wert dann zu, wenn er auf ein bestimmtes Muster passt. -{% highlight ruby %} +```ruby require "json" json = < 2 end -{% endhighlight %} +``` Weitere Details können Sie der Präsentation [Musterabgleiche - Neue Funktion in Ruby 2.7](https://speakerdeck.com/k_tsj/pattern-matching-new-feature-in-ruby-2-dot-7) entnehmen. diff --git a/de/news/_posts/2019-12-21-ruby-2-7-0-rc2-released.md b/de/news/_posts/2019-12-21-ruby-2-7-0-rc2-released.md index 8eb996628e..7028915cb8 100644 --- a/de/news/_posts/2019-12-21-ruby-2-7-0-rc2-released.md +++ b/de/news/_posts/2019-12-21-ruby-2-7-0-rc2-released.md @@ -33,7 +33,7 @@ Programmiersprache Ruby eingeführt. [#14912](https://bugs.ruby-lang.org/issues/ Ein Musterabgleich untersucht das übergebene Objekt und weist seinen Wert dann zu, wenn er auf ein bestimmtes Muster passt. -{% highlight ruby %} +```ruby require "json" json = < 2 end -{% endhighlight %} +``` Weitere Details können Sie der Präsentation [Musterabgleiche - Neue Funktion in Ruby 2.7](https://speakerdeck.com/k_tsj/pattern-matching-new-feature-in-ruby-2-dot-7) entnehmen. diff --git a/de/news/_posts/2019-12-25-ruby-2-7-0-released.md b/de/news/_posts/2019-12-25-ruby-2-7-0-released.md index 8dd9dfbaa5..cf2155009f 100644 --- a/de/news/_posts/2019-12-25-ruby-2-7-0-released.md +++ b/de/news/_posts/2019-12-25-ruby-2-7-0-released.md @@ -27,7 +27,7 @@ Programmiersprache Ruby eingeführt. [#14912](https://bugs.ruby-lang.org/issues/ Ein Musterabgleich untersucht das übergebene Objekt und weist seinen Wert dann zu, wenn er auf ein bestimmtes Muster passt. -{% highlight ruby %} +```ruby require "json" json = < 2 end -{% endhighlight %} +``` Weitere Details können Sie der Präsentation [Musterabgleiche - Neue Funktion in Ruby 2.7](https://speakerdeck.com/k_tsj/pattern-matching-new-feature-in-ruby-2-dot-7) entnehmen. diff --git a/es/news/_posts/2019-10-22-ruby-2-7-0-preview2-released.md b/es/news/_posts/2019-10-22-ruby-2-7-0-preview2-released.md index 56a8eefe5d..4f02a8df16 100644 --- a/es/news/_posts/2019-10-22-ruby-2-7-0-preview2-released.md +++ b/es/news/_posts/2019-10-22-ruby-2-7-0-preview2-released.md @@ -186,13 +186,17 @@ argumentos posicionales, y tal conversión se eliminará en Ruby 3. específicos para un domino (DSL). [[Característica #14799]](https://bugs.ruby-lang.org/issues/14799) - ary[..3] # identico a ary[0..3] - rel.where(ventas: ..100) + ```ruby + ary[..3] # identico a ary[0..3] + rel.where(ventas: ..100) + ``` * Se añade `Enumerable#tally`. Que cuenta las ocurrencias de cada elemento. - ["a", "b", "c", "b"].tally - #=> {"a"=>1, "b"=>2, "c"=>1} + ```ruby + ["a", "b", "c", "b"].tally + #=> {"a"=>1, "b"=>2, "c"=>1} + ``` * Ahora se permite llamar un método privado con`self`. [[Característica #11297]](https://bugs.ruby-lang.org/issues/11297), diff --git a/es/news/_posts/2019-11-23-ruby-2-7-0-preview3-released.md b/es/news/_posts/2019-11-23-ruby-2-7-0-preview3-released.md index e42262d2d8..0620ea931b 100644 --- a/es/news/_posts/2019-11-23-ruby-2-7-0-preview3-released.md +++ b/es/news/_posts/2019-11-23-ruby-2-7-0-preview3-released.md @@ -207,13 +207,17 @@ la versión oficial. específicos para un domino (DSL). [[Característica #14799]](https://bugs.ruby-lang.org/issues/14799) - ary[..3] # identico a ary[0..3] - rel.where(ventas: ..100) + ```ruby + ary[..3] # identico a ary[0..3] + rel.where(ventas: ..100) + ``` * Se añade `Enumerable#tally`. Que cuenta las ocurrencias de cada elemento. - ["a", "b", "c", "b"].tally - #=> {"a"=>1, "b"=>2, "c"=>1} + ```ruby + ["a", "b", "c", "b"].tally + #=> {"a"=>1, "b"=>2, "c"=>1} + ``` * Ahora se permite llamar un método privado con`self`. [[Característica #11297]](https://bugs.ruby-lang.org/issues/11297), diff --git a/es/news/_posts/2019-12-17-ruby-2-7-0-rc1-released.md b/es/news/_posts/2019-12-17-ruby-2-7-0-rc1-released.md index e99f23212b..596aef758f 100644 --- a/es/news/_posts/2019-12-17-ruby-2-7-0-rc1-released.md +++ b/es/news/_posts/2019-12-17-ruby-2-7-0-rc1-released.md @@ -208,13 +208,17 @@ la versión oficial. específicos para un domino (DSL). [[Característica #14799]](https://bugs.ruby-lang.org/issues/14799) - ary[..3] # identico a ary[0..3] - rel.where(ventas: ..100) + ```ruby + ary[..3] # identico a ary[0..3] + rel.where(ventas: ..100) + ``` * Se añade `Enumerable#tally`. Que cuenta las ocurrencias de cada elemento. - ["a", "b", "c", "b"].tally - #=> {"a"=>1, "b"=>2, "c"=>1} + ```ruby + ["a", "b", "c", "b"].tally + #=> {"a"=>1, "b"=>2, "c"=>1} + ``` * Ahora se permite llamar un método privado con`self`. [[Característica #11297]](https://bugs.ruby-lang.org/issues/11297), diff --git a/es/news/_posts/2019-12-21-ruby-2-7-0-rc2-released.md b/es/news/_posts/2019-12-21-ruby-2-7-0-rc2-released.md index 00ded96114..047f87fecb 100644 --- a/es/news/_posts/2019-12-21-ruby-2-7-0-rc2-released.md +++ b/es/news/_posts/2019-12-21-ruby-2-7-0-rc2-released.md @@ -208,13 +208,17 @@ la versión oficial. específicos para un domino (DSL). [[Característica #14799]](https://bugs.ruby-lang.org/issues/14799) - ary[..3] # identico a ary[0..3] - rel.where(ventas: ..100) + ```ruby + ary[..3] # identico a ary[0..3] + rel.where(ventas: ..100) + ``` * Se añade `Enumerable#tally`. Que cuenta las ocurrencias de cada elemento. - ["a", "b", "c", "b"].tally - #=> {"a"=>1, "b"=>2, "c"=>1} + ```ruby + ["a", "b", "c", "b"].tally + #=> {"a"=>1, "b"=>2, "c"=>1} + ``` * Ahora se permite llamar un método privado con un literal `self` como receptor. diff --git a/es/news/_posts/2019-12-25-ruby-2-7-0-released.md b/es/news/_posts/2019-12-25-ruby-2-7-0-released.md index 9bae5d44fa..1014beb691 100644 --- a/es/news/_posts/2019-12-25-ruby-2-7-0-released.md +++ b/es/news/_posts/2019-12-25-ruby-2-7-0-released.md @@ -191,13 +191,17 @@ un argumento en la línea de ordenes `-W:no-deprecated` o añada específicos para un domino (DSL). [[Característica #14799]](https://bugs.ruby-lang.org/issues/14799) - ary[..3] # identico a ary[0..3] - rel.where(ventas: ..100) + ```ruby + ary[..3] # identico a ary[0..3] + rel.where(ventas: ..100) + ``` * Se añade `Enumerable#tally`. Que cuenta las ocurrencias de cada elemento. - ["a", "b", "c", "b"].tally - #=> {"a"=>1, "b"=>2, "c"=>1} + ```ruby + ["a", "b", "c", "b"].tally + #=> {"a"=>1, "b"=>2, "c"=>1} + ``` * Ahora se permite llamar un método privado con un literal `self` como receptor. From 81dce9bfc51a7dee0b8f16a6a3049951ef7cf87a Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Wed, 29 Apr 2020 13:07:03 +0300 Subject: [PATCH 0050/1487] Update link to TryRuby --- _data/locales/bg.yml | 2 +- _data/locales/de.yml | 2 +- _data/locales/en.yml | 2 +- _data/locales/es.yml | 2 +- _data/locales/fr.yml | 2 +- _data/locales/id.yml | 2 +- _data/locales/it.yml | 2 +- _data/locales/ja.yml | 2 +- _data/locales/ko.yml | 2 +- _data/locales/pl.yml | 2 +- _data/locales/pt.yml | 2 +- _data/locales/ru.yml | 2 +- _data/locales/tr.yml | 2 +- _data/locales/vi.yml | 2 +- _data/locales/zh_cn.yml | 2 +- _data/locales/zh_tw.yml | 2 +- bg/documentation/index.md | 2 +- de/documentation/index.md | 2 +- en/documentation/index.md | 2 +- es/documentation/index.md | 2 +- fr/documentation/index.md | 2 +- id/documentation/index.md | 2 +- it/documentation/index.md | 2 +- ko/documentation/index.md | 2 +- pl/documentation/index.md | 2 +- pt/documentation/index.md | 2 +- ru/documentation/index.md | 2 +- tr/documentation/index.md | 2 +- vi/documentation/index.md | 2 +- zh_cn/documentation/index.md | 2 +- zh_tw/documentation/index.md | 2 +- 31 files changed, 31 insertions(+), 31 deletions(-) diff --git a/_data/locales/bg.yml b/_data/locales/bg.yml index efaf0b91c7..85b4264dd8 100644 --- a/_data/locales/bg.yml +++ b/_data/locales/bg.yml @@ -29,7 +29,7 @@ sidebar: text: Започнете лесно е! try_ruby: text: Пробвайте Ruby! (в браузъра) - url: https://ruby.github.io/TryRuby/ + url: https://try.ruby-lang.org/ quickstart: text: Ruby в 20 минути url: /bg/documentation/quickstart/ diff --git a/_data/locales/de.yml b/_data/locales/de.yml index bd7d5cef56..ae1749cf82 100644 --- a/_data/locales/de.yml +++ b/_data/locales/de.yml @@ -30,7 +30,7 @@ sidebar: text: Der Einstieg ist einfach! try_ruby: text: Teste Ruby! (im Browser) - url: https://ruby.github.io/TryRuby/ + url: https://try.ruby-lang.org/ quickstart: text: Ruby in 20 Minuten url: /de/documentation/quickstart/ diff --git a/_data/locales/en.yml b/_data/locales/en.yml index cabed6a632..9125472cd1 100644 --- a/_data/locales/en.yml +++ b/_data/locales/en.yml @@ -30,7 +30,7 @@ sidebar: text: Get Started, it's easy! try_ruby: text: Try Ruby! (in your browser) - url: https://ruby.github.io/TryRuby/ + url: https://try.ruby-lang.org/ quickstart: text: Ruby in Twenty Minutes url: /en/documentation/quickstart/ diff --git a/_data/locales/es.yml b/_data/locales/es.yml index 6c9c9253bc..679539743e 100644 --- a/_data/locales/es.yml +++ b/_data/locales/es.yml @@ -29,7 +29,7 @@ sidebar: text: Iníciate, ¡es fácil! try_ruby: text: ¡Prueba Ruby! (en tu navegador) - url: https://ruby.github.io/TryRuby/ + url: https://try.ruby-lang.org/ quickstart: text: Ruby en 20 Minutos url: /es/documentation/quickstart/ diff --git a/_data/locales/fr.yml b/_data/locales/fr.yml index b0143e59f8..3a5129eae2 100644 --- a/_data/locales/fr.yml +++ b/_data/locales/fr.yml @@ -30,7 +30,7 @@ sidebar: text: Lancez-vous, c’est facile ! try_ruby: text: Essayez Ruby ! - url: https://ruby.github.io/TryRuby/ + url: https://try.ruby-lang.org/ quickstart: text: Apprenez Ruby en vingt minutes url: /fr/documentation/quickstart/ diff --git a/_data/locales/id.yml b/_data/locales/id.yml index ad15a6890e..d15735bf3f 100644 --- a/_data/locales/id.yml +++ b/_data/locales/id.yml @@ -29,7 +29,7 @@ sidebar: text: Coba Sekarang, sangat mudah! try_ruby: text: Try Ruby! (langsung di browser Anda) - url: https://ruby.github.io/TryRuby/ + url: https://try.ruby-lang.org/ quickstart: text: Menguasai Ruby dalam 20 Menit url: /id/documentation/quickstart/ diff --git a/_data/locales/it.yml b/_data/locales/it.yml index bc7d0d5b46..6d41e6bbf8 100644 --- a/_data/locales/it.yml +++ b/_data/locales/it.yml @@ -29,7 +29,7 @@ sidebar: text: Per iniziare, è facile! try_ruby: text: Prova Ruby! (nel tuo browser) - url: https://ruby.github.io/TryRuby/ + url: https://try.ruby-lang.org/ quickstart: text: Ruby in venti minuti url: /it/documentation/quickstart/ diff --git a/_data/locales/ja.yml b/_data/locales/ja.yml index 3647ea4c9c..d671aa0878 100644 --- a/_data/locales/ja.yml +++ b/_data/locales/ja.yml @@ -32,7 +32,7 @@ sidebar: text: はじめよう! try_ruby: text: 試してみる! (ブラウザから) - url: https://ruby.github.io/TryRuby/ + url: https://try.ruby-lang.org/ quickstart: text: 20分ではじめるRuby url: /ja/documentation/quickstart/ diff --git a/_data/locales/ko.yml b/_data/locales/ko.yml index a48b810c21..5a03ac4d33 100644 --- a/_data/locales/ko.yml +++ b/_data/locales/ko.yml @@ -29,7 +29,7 @@ sidebar: text: 시작하기 try_ruby: text: Try Ruby! - url: https://ruby.github.io/TryRuby/ + url: https://try.ruby-lang.org/ quickstart: text: 20분 가이드 url: /ko/documentation/quickstart/ diff --git a/_data/locales/pl.yml b/_data/locales/pl.yml index e9b2490fd3..c88e5e854b 100644 --- a/_data/locales/pl.yml +++ b/_data/locales/pl.yml @@ -29,7 +29,7 @@ sidebar: text: Zacznij, to proste! try_ruby: text: Wypróbuj Ruby! (w twojej przeglądarce) - url: https://ruby.github.io/TryRuby/ + url: https://try.ruby-lang.org/ quickstart: text: Ruby w 20 Minut url: /pl/documentation/quickstart/ diff --git a/_data/locales/pt.yml b/_data/locales/pt.yml index c6d2d9770a..0eb5874a48 100644 --- a/_data/locales/pt.yml +++ b/_data/locales/pt.yml @@ -29,7 +29,7 @@ sidebar: text: Primeiros passos, é fácil! try_ruby: text: Try Ruby! (in your browser) - url: https://ruby.github.io/TryRuby/ + url: https://try.ruby-lang.org/ quickstart: text: Ruby em Vinte Minutos url: /pt/documentation/quickstart/ diff --git a/_data/locales/ru.yml b/_data/locales/ru.yml index b716b41bf3..78930e4a14 100644 --- a/_data/locales/ru.yml +++ b/_data/locales/ru.yml @@ -29,7 +29,7 @@ sidebar: text: Начните сейчас, это легко! try_ruby: text: Попробуйте Ruby! (в своем браузере) - url: https://ruby.github.io/TryRuby/ + url: https://try.ruby-lang.org/ quickstart: text: Ruby за двадцать минут url: /ru/documentation/quickstart/ diff --git a/_data/locales/tr.yml b/_data/locales/tr.yml index 5042793267..3593d054c3 100644 --- a/_data/locales/tr.yml +++ b/_data/locales/tr.yml @@ -30,7 +30,7 @@ sidebar: text: Başlamak, çok kolay! try_ruby: text: Ruby'yi Deneyin! (tarayıcınızda) - url: https://ruby.github.io/TryRuby/ + url: https://try.ruby-lang.org/ quickstart: text: Yirmi Dakikada Ruby url: /tr/documentation/quickstart/ diff --git a/_data/locales/vi.yml b/_data/locales/vi.yml index 3bc577525c..face65451e 100644 --- a/_data/locales/vi.yml +++ b/_data/locales/vi.yml @@ -29,7 +29,7 @@ sidebar: text: Nhập môn, quá dễ! try_ruby: text: Thử Ruby! (trong trình duyệt) - url: https://ruby.github.io/TryRuby/ + url: https://try.ruby-lang.org/ quickstart: text: Ruby trong 20 phút url: /vi/documentation/quickstart/ diff --git a/_data/locales/zh_cn.yml b/_data/locales/zh_cn.yml index 295a293adb..9f3a3615a8 100644 --- a/_data/locales/zh_cn.yml +++ b/_data/locales/zh_cn.yml @@ -29,7 +29,7 @@ sidebar: text: 试用,其实很简单! try_ruby: text: 在浏览器中试用 Ruby(英文) - url: https://ruby.github.io/TryRuby/ + url: https://try.ruby-lang.org/ quickstart: text: 20 分钟体验 Ruby url: /zh_cn/documentation/quickstart/ diff --git a/_data/locales/zh_tw.yml b/_data/locales/zh_tw.yml index 7342b2a2d8..8558722ca9 100644 --- a/_data/locales/zh_tw.yml +++ b/_data/locales/zh_tw.yml @@ -29,7 +29,7 @@ sidebar: text: 上手入門,一點都不難! try_ruby: text: 在瀏覽器中試用 Ruby! - url: https://ruby.github.io/TryRuby/ + url: https://try.ruby-lang.org/ quickstart: text: 20 分鐘 Ruby 體驗 url: /zh_tw/documentation/quickstart/ diff --git a/bg/documentation/index.md b/bg/documentation/index.md index b37dd628ad..e8b8c03100 100644 --- a/bg/documentation/index.md +++ b/bg/documentation/index.md @@ -129,7 +129,7 @@ ruby -v Ако имате въпроси относно Ruby, [пощенският списък](/bg/community/mailing-lists/) е чудесно място да ги зададете. -[1]: https://ruby.github.io/TryRuby/ +[1]: https://try.ruby-lang.org/ [2]: http://rubykoans.com/ [5]: https://poignant.guide [6]: http://rubylearning.com/ diff --git a/de/documentation/index.md b/de/documentation/index.md index ef5c1f0ce9..93f7511a71 100644 --- a/de/documentation/index.md +++ b/de/documentation/index.md @@ -73,7 +73,7 @@ deutschsprachigen Artikeln. Für weitergehende Fragen steht eine große -[1]: https://ruby.github.io/TryRuby/ +[1]: https://try.ruby-lang.org/ [3]: https://poignant.guide [4]: http://www.moccasoft.de/papers/ruby_tutorial [5]: http://pine.fm/LearnToProgram/ diff --git a/en/documentation/index.md b/en/documentation/index.md index 22a32fbca7..97bdb93eb3 100644 --- a/en/documentation/index.md +++ b/en/documentation/index.md @@ -129,7 +129,7 @@ If you have questions about Ruby the -[1]: https://ruby.github.io/TryRuby/ +[1]: https://try.ruby-lang.org/ [2]: http://rubykoans.com/ [5]: https://poignant.guide [6]: http://rubylearning.com/ diff --git a/es/documentation/index.md b/es/documentation/index.md index 9ee8dadb55..20035327c1 100644 --- a/es/documentation/index.md +++ b/es/documentation/index.md @@ -64,7 +64,7 @@ correo](/es/community/mailing-lists/) es un buen lugar para comenzar. -[1]: https://ruby.github.io/TryRuby/ +[1]: https://try.ruby-lang.org/ [2]: http://pine.fm/LearnToProgram/ [3]: http://www.ruby-doc.org/docs/ProgrammingRuby/ [4]: http://pragmaticprogrammer.com/titles/ruby/index.html diff --git a/fr/documentation/index.md b/fr/documentation/index.md index 8dd1b65b66..574b2b1f8e 100644 --- a/fr/documentation/index.md +++ b/fr/documentation/index.md @@ -129,7 +129,7 @@ la [liste de diffusion](/en/community/mailing-lists/) est un bon endroit [2]: http://jeveuxapprendreruby.fr/ -[3]: https://ruby.github.io/TryRuby/ +[3]: https://try.ruby-lang.org/ [4]: http://rubykoans.com/ [5]: https://poignant.guide [6]: http://pine.fm/LearnToProgram/ diff --git a/id/documentation/index.md b/id/documentation/index.md index 3307b7153a..e84330ec6d 100644 --- a/id/documentation/index.md +++ b/id/documentation/index.md @@ -128,7 +128,7 @@ adalah tempat yang baik untuk memulai. -[1]: https://ruby.github.io/TryRuby/ +[1]: https://try.ruby-lang.org/ [2]: http://rubykoans.com/ [5]: https://poignant.guide [6]: http://rubylearning.com/ diff --git a/it/documentation/index.md b/it/documentation/index.md index 03634bb03b..b82b7e7a6f 100644 --- a/it/documentation/index.md +++ b/it/documentation/index.md @@ -128,7 +128,7 @@ iniziare. -[1]: https://ruby.github.io/TryRuby/ +[1]: https://try.ruby-lang.org/ [2]: http://rubykoans.com/ [5]: https://poignant.guide [6]: http://rubylearning.com/ diff --git a/ko/documentation/index.md b/ko/documentation/index.md index 107f244236..63b67f73c1 100644 --- a/ko/documentation/index.md +++ b/ko/documentation/index.md @@ -129,7 +129,7 @@ lang: ko 영어가 되신다면 [메일링 리스트](/ko/community/mailing-lists/)를 사용하실 수도 있습니다. -[1]: https://ruby.github.io/TryRuby/ +[1]: https://try.ruby-lang.org/ [2]: http://rubykoans.com/ [5]: https://poignant.guide [6]: http://rubylearning.com/ diff --git a/pl/documentation/index.md b/pl/documentation/index.md index c8164c04cd..a60fd725de 100644 --- a/pl/documentation/index.md +++ b/pl/documentation/index.md @@ -132,7 +132,7 @@ angielskim). Jeśli szukasz pomocy w języku polskim, zajrzyj na [forum][pl-2]. -[1]: https://ruby.github.io/TryRuby/ +[1]: https://try.ruby-lang.org/ [2]: http://rubykoans.com/ [5]: https://poignant.guide [6]: http://rubylearning.com/ diff --git a/pt/documentation/index.md b/pt/documentation/index.md index ed69124782..61c96cb296 100644 --- a/pt/documentation/index.md +++ b/pt/documentation/index.md @@ -140,7 +140,7 @@ perguntas sobre Ruby, a [lista de e-mails](/pt/community/mailing-lists/) -[1]: https://ruby.github.io/TryRuby/ +[1]: https://try.ruby-lang.org/ [2]: http://rubykoans.com/ [5]: http://why.carlosbrando.com/ [6]: http://rubylearning.com/ diff --git a/ru/documentation/index.md b/ru/documentation/index.md index a1055ab40c..5a85b50f5f 100644 --- a/ru/documentation/index.md +++ b/ru/documentation/index.md @@ -138,7 +138,7 @@ ruby -v -[1]: https://ruby.github.io/TryRuby/ +[1]: https://try.ruby-lang.org/ [2]: http://rubykoans.com/ [5]: https://poignant.guide [6]: http://rubylearning.com/ diff --git a/tr/documentation/index.md b/tr/documentation/index.md index 4da8c3ecfc..0e93a6c9ba 100644 --- a/tr/documentation/index.md +++ b/tr/documentation/index.md @@ -142,7 +142,7 @@ olacaktır. -[1]: https://ruby.github.io/TryRuby/ +[1]: https://try.ruby-lang.org/ [2]: http://rubykoans.com/ [5]: https://poignant.guide [6]: http://rubylearning.com/ diff --git a/vi/documentation/index.md b/vi/documentation/index.md index a35cc594c8..dd03f4a529 100644 --- a/vi/documentation/index.md +++ b/vi/documentation/index.md @@ -139,7 +139,7 @@ là một nơi tuyệt vời. -[1]: https://ruby.github.io/TryRuby/ +[1]: https://try.ruby-lang.org/ [2]: http://rubykoans.com/ [5]: https://poignant.guide [6]: http://rubylearning.com/ diff --git a/zh_cn/documentation/index.md b/zh_cn/documentation/index.md index 70a3393f58..75e072e0a3 100644 --- a/zh_cn/documentation/index.md +++ b/zh_cn/documentation/index.md @@ -110,7 +110,7 @@ ruby -v -[1]: https://ruby.github.io/TryRuby/ +[1]: https://try.ruby-lang.org/ [2]: http://rubykoans.com/ [5]: https://poignant.guide [6]: http://rubylearning.com/ diff --git a/zh_tw/documentation/index.md b/zh_tw/documentation/index.md index 9abbcc35ab..b74c4f2aaa 100644 --- a/zh_tw/documentation/index.md +++ b/zh_tw/documentation/index.md @@ -105,7 +105,7 @@ lang: zh_tw -[1]: https://ruby.github.io/TryRuby/ +[1]: https://try.ruby-lang.org/ [2]: http://rubykoans.com/ [5]: https://poignant.guide [6]: http://rubylearning.com/ From c5064753d05f6c50ba15daeb753b33b80d63d748 Mon Sep 17 00:00:00 2001 From: Pierre Grimaud Date: Wed, 29 Apr 2020 19:04:34 +0200 Subject: [PATCH 0051/1487] Fix typos --- en/news/_posts/2018-12-15-ruby-2-6-0-rc2-released.md | 2 +- en/news/_posts/2018-12-25-ruby-2-6-0-released.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/en/news/_posts/2018-12-15-ruby-2-6-0-rc2-released.md b/en/news/_posts/2018-12-15-ruby-2-6-0-rc2-released.md index ef44a2e650..3296c37791 100644 --- a/en/news/_posts/2018-12-15-ruby-2-6-0-rc2-released.md +++ b/en/news/_posts/2018-12-15-ruby-2-6-0-rc2-released.md @@ -97,7 +97,7 @@ The `RubyVM::AbstractSyntaxTree::Node` class is also introduced. You can get loc * Passing `safe_level` to `ERB.new` is deprecated. `trim_mode` and `eoutvar` arguments are changed to keyword arguments. [[Feature #14256]](https://bugs.ruby-lang.org/issues/14256) -* Supported Unicode version is updated to 11. It is planed to update to 12 and 12.1 in future TEENY releases of Ruby 2.6. +* Supported Unicode version is updated to 11. It is planned to update to 12 and 12.1 in future TEENY releases of Ruby 2.6. * Merge RubyGems 3.0.0.beta3. `--ri` and `--rdoc` options were removed. Please use `--document` and `--no-document` options instead. diff --git a/en/news/_posts/2018-12-25-ruby-2-6-0-released.md b/en/news/_posts/2018-12-25-ruby-2-6-0-released.md index 494fd01da5..61a60e9742 100644 --- a/en/news/_posts/2018-12-25-ruby-2-6-0-released.md +++ b/en/news/_posts/2018-12-25-ruby-2-6-0-released.md @@ -79,7 +79,7 @@ The `RubyVM::AbstractSyntaxTree::Node` class is also introduced. You can get sou * Speed up `Proc#call` by removing the temporary allocation for `$SAFE`. [[Feature #14318]](https://bugs.ruby-lang.org/issues/14318) - We have observed a 1.4x peformance improvement in the `lc_fizzbuzz` benchmark that calls `Proc#call` numerous times. [[Bug #10212]](https://bugs.ruby-lang.org/issues/10212) + We have observed a 1.4x performance improvement in the `lc_fizzbuzz` benchmark that calls `Proc#call` numerous times. [[Bug #10212]](https://bugs.ruby-lang.org/issues/10212) * Speed up `block.call` when `block` is passed in as a block parameter. [[Feature #14330]](https://bugs.ruby-lang.org/issues/14330) From 415b8b20f25e5fed65b346aa3f20b08c805bc572 Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Thu, 30 Apr 2020 23:40:48 +0300 Subject: [PATCH 0052/1487] Add DEV link to blog page (ru) (#2444) --- ru/community/weblogs/index.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ru/community/weblogs/index.md b/ru/community/weblogs/index.md index 0c31c6110a..9b02992f10 100644 --- a/ru/community/weblogs/index.md +++ b/ru/community/weblogs/index.md @@ -16,6 +16,9 @@ lang: ru * [**O’Reilly Ruby**][8] – это групповой блог с хорошими уроками по Ruby и интервью с интересными людьми из сообщества. +* [**DEV Ruby Tag**][dev-ruby-tag] – это подборка всех сообщений с + тегом Ruby в сообществе DEV. DEV – это сеть из тысяч разработчиков + программного обеспечения, которые ведут блоги и обсуждают код. * [**Riding Rails**][9] – это официальный групповой блог команды Ruby on Rails. Если вы пользуетесь Rails, этот блог является наилучшим местом для получения уведомлений об обновлениях по безопасности и общего обзора @@ -41,6 +44,7 @@ Ruby также довольно частая тема на [Slashdot][14], [8]: http://oreillynet.com/ruby/ +[dev-ruby-tag]: https://dev.to/t/ruby [9]: http://weblog.rubyonrails.org/ [10]: http://www.rubyinside.com/ [11]: http://www.rubyist.net/~matz/ From 8444a2aa5cb865d2541d0c03af0bed70827c67db Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Mon, 27 Apr 2020 20:18:42 +0700 Subject: [PATCH 0053/1487] Translate Ruby 2.7.0-rc1 released news (id) --- .../2019-12-17-ruby-2-7-0-rc1-released.md | 369 ++++++++++++++++++ 1 file changed, 369 insertions(+) create mode 100644 id/news/_posts/2019-12-17-ruby-2-7-0-rc1-released.md diff --git a/id/news/_posts/2019-12-17-ruby-2-7-0-rc1-released.md b/id/news/_posts/2019-12-17-ruby-2-7-0-rc1-released.md new file mode 100644 index 0000000000..80aa176398 --- /dev/null +++ b/id/news/_posts/2019-12-17-ruby-2-7-0-rc1-released.md @@ -0,0 +1,369 @@ +--- +layout: news_post +title: "Ruby 2.7.0-rc1 Dirilis" +author: "naruse" +translator: "meisyal" +date: 2019-12-17 12:00:00 +0000 +lang: id +--- + +{% assign release = site.data.releases | where: "version", "2.7.0-rc1" | first %} + +Kami dengan senang hati mengumumkan rilis dari Ruby 2.7.0-rc1. + +Sebuah *release candidate* dirilis untuk mengumpulkan umpan balik rilis final +yang direncanakan rilis pada bulan Desember. +Versi ini dirilis terutama untuk mengkonfirmasi kompatibilitas dari +*keyword argument*. + +Selain itu, rilis ini juga memperkenalkan sejumlah fitur baru dan +perbaikan performa, terutama: + +* Compaction GC +* Pattern Matching +* REPL improvement +* Separation of positional and keyword arguments + +## Compaction GC + +Rilis ini memperkenalkan *Compaction* GC yang dapat *defragment* sebuah +*fragmented memory space*. + +Beberapa *multi-threaded* dari program Ruby dapat menyebabkan *memory +fragmentation*, menyebabkan penggunaan *memory* tinggi dan penurunan kecepatan. + +*Method* `GC.compact` dikenalkan untuk me-*compact heap*. Fungsi ini +me-*compact* objek di dalam *heap* sehingga sedikit *page* yang akan digunakan +dan *heap* bisa jadi lebih CoW bersahabat. +[[Feature #15626]](https://bugs.ruby-lang.org/issues/15626) + +## Pattern Matching [Experimental] + +*Pattern matching*, fitur yang banyak digunakan dalam bahasa pemrograman +fungsional, dikenalkan sebagai sebuah fitur eksperimental. +[[Feature #14912]](https://bugs.ruby-lang.org/issues/14912) + +Ini dapat melewati sebuah objek dan menetapkan nilainya jika cocok dengan +sebuah pola. + +```ruby +require "json" + +json = < 2 +end +``` + +Untuk lebih detail, mohon lihat +[Pattern matching - New feature in Ruby 2.7](https://speakerdeck.com/k_tsj/pattern-matching-new-feature-in-ruby-2-dot-7). + +## REPL improvement + +`irb`, membungkus *interactive development* (REPL; Read-Eval-Print-Loop), +sekarang mendukung suntingan *multi-line*. Ini didukung oleh `reline`, +`readline` yang sesuai dengan implementasi murni dari Ruby. Ini juga +menyediakan integrasi rdoc. Di dalam `irb` Anda dapat menampilkan referensi +sebuah *class*, *module*, atau *method*. +[[Feature #14683]](https://bugs.ruby-lang.org/issues/14683), +[[Feature #14787]](https://bugs.ruby-lang.org/issues/14787), +[[Feature #14918]](https://bugs.ruby-lang.org/issues/14918) + +Selain itu, baris kode ditampilkan pada `binding.irb` dan hasil pemeriksaan +objek *core-class* sekarang berwarna. + + + +## Separation of positional and keyword arguments + +Konversi otomatis dari *keyword argument* dan *positional argument* sudah +usang dan akan dihapus di Ruby 3. +[[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) + +* Ketika sebuah pemanggilan *method* melewati sebuah *Hash* pada *argument* + terakhir, ketika melewati *keyword* kosong, dan ketika *method* yang + dipanggil menerima *keyword*, sebuah peringatan dikeluarkan. Untuk + melanjutkan sebagai *keyword*, menambahkan sebuah *double splat operator* + untuk menghindari peringatan dan memastikan perilaku yang benar pada Ruby 3. + + + ```ruby + def foo(key: 42); end; foo({key: 42}) # warned + def foo(**kw); end; foo({key: 42}) # warned + def foo(key: 42); end; foo(**{key: 42}) # OK + def foo(**kw); end; foo(**{key: 42}) # OK + ``` + +* Ketika sebuah pemanggilan *method* melewati *keyword* ke sebuah *method* + yang menerima *keyword*, tetapi tidak memenuhi *positional argument* yang + diperlukan, *keyword* akan dianggap sebagai sebuah *required positional + argument* final dan sebuah peringatan dikeluarkan. Melewati *argument* + sebagai sebuah *hash* ketimbang *keyword* untuk menghindari peringatan dan + memastikan perilaku yang benar pada Ruby 3. + + ```ruby + def foo(h, **kw); end; foo(key: 42) # warned + def foo(h, key: 42); end; foo(key: 42) # warned + def foo(h, **kw); end; foo({key: 42}) # OK + def foo(h, key: 42); end; foo({key: 42}) # OK + ``` + +* Ketika sebuah *method* menerima *keyword* tertentu, tetapi bukan sebuah + *keyword splat* dan sebuah *hash* atau *keyword splat* dilewatkan *method* + yang memasukkan *key* Symbol dan non-Symbol, *hash* akan lanjut dengan + memisahkan dan sebuah peringatan dikeluarkan. Anda akan butuh pemanggilan + kode untuk melewati hash yang terpisah untuk memastikan perilaku yang benar + pada Ruby 3. + + ```ruby + def foo(h={}, key: 42); end; foo("key" => 43, key: 42) # warned + def foo(h={}, key: 42); end; foo({"key" => 43, key: 42}) # warned + def foo(h={}, key: 42); end; foo({"key" => 43}, key: 42) # OK + ``` + +* Jika sebuah *method* tidak menerima *keyword* dan dipanggil dengan *keyword*, + *keyword* akan dianggap sebagai sebuah *positional hash* tanpa peringatan. + Perilaku ini akan berlanjut pada Ruby 3. + + ```ruby + def foo(opt={}); end; foo( key: 42 ) # OK + ``` + +* Non-symbol diperbolehkan sebagai sebuah *keyword argument* jika *method* + menerima *arbitrary keyword*. + [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) + + ```ruby + def foo(**kw); p kw; end; foo("str" => 1) #=> {"str"=>1} + ``` + +* `**nil` diperbolehkan pada definisi *method* sebagai penanda + langsung bahwa *method* menerima *keyword* kosong. Memanggil *method* + seperti itu dengan *keyword* akan menyebabkan ArgumentError. + [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) + + ```ruby + def foo(h, **nil); end; foo(key: 1) # ArgumentError + def foo(h, **nil); end; foo(**{key: 1}) # ArgumentError + def foo(h, **nil); end; foo("str" => 1) # ArgumentError + def foo(h, **nil); end; foo({key: 1}) # OK + def foo(h, **nil); end; foo({"str" => 1}) # OK + ``` + +* Melewatkan sebuah *keyword splat* kosong pada sebuah *method* yang tidak + menerima *keyword* tidak akan lagi melewati sebuah *hash* kosong, kecuali + *hash* kosong dibutuhkan sebagai sebuah *required parameter*, di mana kasus + sebuah peringatan akan dikelurkan. Hilangkan *double splat* untuk melanjutkan + sebuah *positional hash*. + [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) + + ```ruby + h = {}; def foo(*a) a end; foo(**h) # [] + h = {}; def foo(a) a end; foo(**h) # {} and warning + h = {}; def foo(*a) a end; foo(h) # [{}] + h = {}; def foo(a) a end; foo(h) # {} + ``` + +CATATAN: Sangat banyak peringatan yang usang dari *keyword argument +incompatibility* telah ditunjuk terlalu bertele-tele. Saat ini, ada dua +kemungkinan solusi didiskusikan; menonaktifkan peringatan *deprecation* secara +otomatis +([#16345](https://bugs.ruby-lang.org/issues/16345)) +atau menyembunyikan peringatan yang sama +([#16289](https://bugs.ruby-lang.org/issues/16289)). +Keputusan akhir belum dibuat, tetapi akan diselesaikan saat rilis resmi. + +## Fitur Baru Penting Lainnya + +* Sebuah *method reference operator*, `.:`, telah dikenalkan sebagai + sebuah fitur eksperimental pada *preview* sebelumnya, namun + telah dikembalikan. + [[Feature #12125]](https://bugs.ruby-lang.org/issues/12125), + [[Feature #13581]]( https://bugs.ruby-lang.org/issues/13581), + [[Feature #16275]](https://bugs.ruby-lang.org/issues/16275) + +* *Numbered parameter* sebagai *default block parameter* dikenalkan sebagai + sebuah fitur eksperimental. + [[Feature #4475]](https://bugs.ruby-lang.org/issues/4475) + +* Sebuah *beginless range* secara eksperimental dikenalkan. Ini mungkin tidak + berguna seperti *endless range*, tetapi sangat baik untuk penggunan DSL. + [[Feature #14799]](https://bugs.ruby-lang.org/issues/14799) + + ```ruby + ary[..3] # identical to ary[0..3] + rel.where(sales: ..100) + ``` + +* `Enumerable#tally` ditambahkan. Ini menghitung banyak elemen dari setiap + elemen. + + ```ruby + ["a", "b", "c", "b"].tally + #=> {"a"=>1, "b"=>2, "c"=>1} + ``` + +* Pemanggilan sebuah *private method* pada `self` sekarang diperbolehkan. + [[Feature #11297]](https://bugs.ruby-lang.org/issues/11297), + [[Feature #16123]](https://bugs.ruby-lang.org/issues/16123) + + ```ruby + def foo + end + private :foo + self.foo + ``` + +* `Enumerator::Lazy#eager` ditambahkan. + Ini menghasilkan sebuah *non-lazy enumerator* dari sebuah *lazy enumerator*. + [[Feature #15901]](https://bugs.ruby-lang.org/issues/15901) + + ```ruby + a = %w(foo bar baz) + e = a.lazy.map {|x| x.upcase }.map {|x| x + "!" }.eager + p e.class #=> Enumerator + p e.map {|x| x + "?" } #=> ["FOO!?", "BAR!?", "BAZ!?"] + ``` + +## Perbaikan performa + +* JIT [Eksperimental] + + * Kode JIT-*ed* di-*recompile* untuk kode *less-optimized* ketika sebuah + asumsi optimisasi dibatalkan. + + * *Method inlining* dilakukan ketika sebuah *method* dianggap murni. + Optimisasi ini masih eksperimental dan banyak *method* dianggap tidak + murni. + + * Nilai default dari `--jit-min-calls` diubah dari 5 ke 10,000. + + * Nilai default dari `--jit-max-cache` diubah dari 1,000 ke 100. + +* ~~`Symbol#to_s`,~~ `Module#name`, `true.to_s`, `false.to_s`, + dan `nil.to_s` sekarang selalu mengembalikan sebuah *frozen string*. + *String* yang dikembalikan selalu sama untuk sebuah objek. + [Eksperimental] + [[Feature #16150]](https://bugs.ruby-lang.org/issues/16150) + +* Performa dari `CGI.escapeHTML` ditingkatkan. + [GH-2226](https://github.com/ruby/ruby/pull/2226) + +* Performa dari Monitor dan MonitorMixin ditingkatkan. + [[Feature #16255]](https://bugs.ruby-lang.org/issues/16255) + +## Perubahan penting lainnya sejak 2.6 + +* Beberapa pustaka standar diperbarui. + * Bundler 2.1.0.pre.3 + ([History](https://github.com/bundler/bundler/blob/2-1-stable/CHANGELOG.md#210pre3-november-8-2019)) + * RubyGems 3.1.0.pre.3 + ([History](https://github.com/rubygems/rubygems/blob/3.1/History.txt)) + * CSV 3.1.2 + ([NEWS](https://github.com/ruby/csv/blob/v3.1.2/NEWS.md)) + * Racc 1.4.15 + * REXML 3.2.3 + ([NEWS](https://github.com/ruby/rexml/blob/v3.2.3/NEWS.md)) + * RSS 0.2.8 + ([NEWS](https://github.com/ruby/rss/blob/v0.2.8/NEWS.md)) + * StringScanner 1.0.3 + * Beberapa pustaka lainnya yang tidak memiliki versi asli juga diperbarui. + +* Memasukkan stdlib sebagai *default gem* + * *default gem* di bawah ini telah dipublikasikan ke rubygems.org + * benchmark + * cgi + * delegate + * getoptlong + * net-pop + * net-smtp + * open3 + * pstore + * singleton + * *default gem* di bawah ini hanya dimasukkan ke ruby-core, + tetapi belum dipublikasikan ke rubygems.org. + * monitor + * observer + * timeout + * tracer + * uri + * yaml + +* `Proc.new` dan `proc` tanpa *block* dalam sebuah *method* dipanggil dengan + sebuah *block* akan diperingatkan sekarang. + +* `lambda` tanpa *block* dalam sebuah *method* dipanggil dengan sebuah + *block errs*. + +* Memperbarui versi Unicode dan Emoji dari 11.0.0 ke 12.0.0. + [[Feature #15321]](https://bugs.ruby-lang.org/issues/15321) + +* Memperbarui versi Unicode ke 12.1.0, + menambahkan dukungan U+32FF SQUARE ERA NAME REIWA. + [[Feature #15195]](https://bugs.ruby-lang.org/issues/15195) + +* `Date.jisx0301`, `Date#jisx0301`, dan `Date.parse` mendukung *Japanese era* + yang baru. + [[Feature #15742]](https://bugs.ruby-lang.org/issues/15742) + +* Membutuhkan *compiler* untuk mendukung C99 + [[Misc #15347]](https://bugs.ruby-lang.org/issues/15347) + * Detail dialek kami: + + +* ~~`Regexp#match{?}` dengan `nil` menimbulkan TypeError sebagai String, Symbol. + [[Feature #13083]](https://bugs.ruby-lang.org/issues/13083)~~ dikembalikan + +Lihat [NEWS](https://github.com/ruby/ruby/blob/v2_7_0_rc1/NEWS) +atau [commit logs](https://github.com/ruby/ruby/compare/v2_6_0...v2_7_0_rc1) +untuk lebih detail. + +Dengan perubahan tersebut, [{{ release.stats.files_changed }} berkas berubah, {{ release.stats.insertions }} sisipan(+), {{ release.stats.deletions }} terhapus(-)](https://github.com/ruby/ruby/compare/v2_6_0...v2_7_0_rc1) +sejak Ruby 2.6.0! +Nikmati memprogram dengan Ruby 2.7! + +## Unduh + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Apa itu Ruby + +Ruby pertama kali dikembangkan oleh Matz (Yukihiro Matsumoto) pada 1993 +dan sekarang dikembangkan sebagai *Open Source*. Ruby berjalan di berbagai +jenis *platform* dan digunakan di seluruh dunia khususnya pengembangan *web*. From e83ac5f092946dc08c4b171f59e946398bf3251a Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Wed, 29 Apr 2020 20:49:34 +0700 Subject: [PATCH 0054/1487] Translate Ruby 2.7.0-rc2 released news (id) --- .../2019-12-21-ruby-2-7-0-rc2-released.md | 365 ++++++++++++++++++ 1 file changed, 365 insertions(+) create mode 100644 id/news/_posts/2019-12-21-ruby-2-7-0-rc2-released.md diff --git a/id/news/_posts/2019-12-21-ruby-2-7-0-rc2-released.md b/id/news/_posts/2019-12-21-ruby-2-7-0-rc2-released.md new file mode 100644 index 0000000000..7e2776c20e --- /dev/null +++ b/id/news/_posts/2019-12-21-ruby-2-7-0-rc2-released.md @@ -0,0 +1,365 @@ +--- +layout: news_post +title: "Ruby 2.7.0-rc2 Dirilis" +author: "naruse" +translator: "meisyal" +date: 2019-12-21 12:00:00 +0000 +lang: id +--- + +{% assign release = site.data.releases | where: "version", "2.7.0-rc2" | first %} + +Kami dengan senang hati mengumumkan rilis dari Ruby 2.7.0-rc2. + +Sebuah *release candidate* dirilis untuk mengumpulkan umpan balik rilis final +yang direncanakan rilis pada tanggal 25 Desember. + +Rilis ini juga memperkenalkan sejumlah fitur baru dan perbaikan performa, +terutama: + +* Pattern Matching +* REPL improvement +* Compaction GC +* Separation of positional and keyword arguments + +## Pattern Matching [Experimental] + +*Pattern matching*, fitur yang banyak digunakan dalam bahasa pemrograman +fungsional, dikenalkan sebagai sebuah fitur eksperimental. +[[Feature #14912]](https://bugs.ruby-lang.org/issues/14912) + +Ini dapat melewati sebuah objek dan menetapkan nilainya jika cocok dengan +sebuah pola. + +```ruby +require "json" + +json = < 2 +end +``` + +Untuk lebih detail, mohon lihat +[Pattern matching - New feature in Ruby 2.7](https://speakerdeck.com/k_tsj/pattern-matching-new-feature-in-ruby-2-dot-7). + +## REPL improvement + +`irb`, membungkus *interactive development* (REPL; Read-Eval-Print-Loop), +sekarang mendukung suntingan *multi-line*. Ini didukung oleh `reline`, +pustaka `readline` yang sesuai dengan implementasi murni dari Ruby. Ini juga +menyediakan integrasi rdoc. Di dalam `irb` Anda dapat menampilkan referensi +sebuah *class*, *module*, atau *method*. +[[Feature #14683]](https://bugs.ruby-lang.org/issues/14683), +[[Feature #14787]](https://bugs.ruby-lang.org/issues/14787), +[[Feature #14918]](https://bugs.ruby-lang.org/issues/14918) + +Selain itu, baris kode ditampilkan oleh `Binding#irb` dan hasil pemeriksaan +objek *core-class* sekarang berwarna. + + + +## Compaction GC + +Rilis ini memperkenalkan *Compaction* GC yang dapat *defragment* sebuah +*fragmented memory space*. + +Beberapa *multi-threaded* dari program Ruby dapat menyebabkan *memory +fragmentation*, menyebabkan penggunaan *memory* tinggi dan penurunan kecepatan. + +*Method* `GC.compact` dikenalkan untuk me-*compact heap*. Fungsi ini +me-*compact* objek di dalam *heap* sehingga sedikit *page* yang akan digunakan +dan *heap* bisa jadi lebih CoW (copy-on-write) bersahabat. +[[Feature #15626]](https://bugs.ruby-lang.org/issues/15626) + +## Separation of positional and keyword arguments + +Konversi otomatis dari *keyword argument* dan *positional argument* sudah +usang dan akan dihapus di Ruby 3. +[[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) + +* Ketika sebuah pemanggilan *method* melewati sebuah *Hash* pada *argument* + terakhir, ketika melewati *keyword* kosong, dan ketika *method* yang + dipanggil menerima *keyword*, sebuah peringatan dikeluarkan. Untuk + melanjutkan sebagai *keyword*, menambahkan sebuah *double splat operator* + untuk menghindari peringatan dan memastikan perilaku yang benar pada Ruby 3. + + + ```ruby + def foo(key: 42); end; foo({key: 42}) # warned + def foo(**kw); end; foo({key: 42}) # warned + def foo(key: 42); end; foo(**{key: 42}) # OK + def foo(**kw); end; foo(**{key: 42}) # OK + ``` + +* Ketika sebuah pemanggilan *method* melewati *keyword* ke sebuah *method* + yang menerima *keyword*, tetapi tidak memenuhi *positional argument* yang + diperlukan, *keyword* akan dianggap sebagai sebuah *required positional + argument* final dan sebuah peringatan dikeluarkan. Melewati *argument* + sebagai sebuah *hash* ketimbang *keyword* untuk menghindari peringatan dan + memastikan perilaku yang benar pada Ruby 3. + + ```ruby + def foo(h, **kw); end; foo(key: 42) # warned + def foo(h, key: 42); end; foo(key: 42) # warned + def foo(h, **kw); end; foo({key: 42}) # OK + def foo(h, key: 42); end; foo({key: 42}) # OK + ``` + +* Ketika sebuah *method* menerima *keyword* tertentu, tetapi bukan sebuah + *keyword splat* dan sebuah *hash* atau *keyword splat* dilewatkan *method* + yang memasukkan *key* Symbol dan non-Symbol, *hash* akan lanjut dengan + memisahkan dan sebuah peringatan dikeluarkan. Anda akan butuh pemanggilan + kode untuk melewati hash yang terpisah untuk memastikan perilaku yang benar + pada Ruby 3. + + ```ruby + def foo(h={}, key: 42); end; foo("key" => 43, key: 42) # warned + def foo(h={}, key: 42); end; foo({"key" => 43, key: 42}) # warned + def foo(h={}, key: 42); end; foo({"key" => 43}, key: 42) # OK + ``` + +* Jika sebuah *method* tidak menerima *keyword* dan dipanggil dengan *keyword*, + *keyword* akan dianggap sebagai sebuah *positional hash* tanpa peringatan. + Perilaku ini akan berlanjut pada Ruby 3. + + ```ruby + def foo(opt={}); end; foo( key: 42 ) # OK + ``` + +* Non-symbol diperbolehkan sebagai sebuah *keyword argument* jika *method* + menerima *arbitrary keyword*. + [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) + + ```ruby + def foo(**kw); p kw; end; foo("str" => 1) #=> {"str"=>1} + ``` + +* `**nil` diperbolehkan pada definisi *method* sebagai penanda + langsung bahwa *method* menerima *keyword* kosong. Memanggil *method* + seperti itu dengan *keyword* akan menyebabkan ArgumentError. + [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) + + ```ruby + def foo(h, **nil); end; foo(key: 1) # ArgumentError + def foo(h, **nil); end; foo(**{key: 1}) # ArgumentError + def foo(h, **nil); end; foo("str" => 1) # ArgumentError + def foo(h, **nil); end; foo({key: 1}) # OK + def foo(h, **nil); end; foo({"str" => 1}) # OK + ``` + +* Melewatkan sebuah *keyword splat* kosong pada sebuah *method* yang tidak + menerima *keyword* tidak akan lagi melewati sebuah *hash* kosong, kecuali + *hash* kosong dibutuhkan sebagai sebuah *required parameter*, di mana kasus + sebuah peringatan akan dikelurkan. Hilangkan *double splat* untuk melanjutkan + sebuah *positional hash*. + [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) + + ```ruby + h = {}; def foo(*a) a end; foo(**h) # [] + h = {}; def foo(a) a end; foo(**h) # {} and warning + h = {}; def foo(*a) a end; foo(h) # [{}] + h = {}; def foo(a) a end; foo(h) # {} + ``` + +CATATAN: Sangat banyak peringatan yang usang dari *keyword argument +incompatibility* telah ditunjuk terlalu bertele-tele. Saat ini, ada dua +kemungkinan solusi didiskusikan; menonaktifkan peringatan *deprecation* secara +otomatis +([#16345](https://bugs.ruby-lang.org/issues/16345)) +atau menyembunyikan peringatan yang sama +([#16289](https://bugs.ruby-lang.org/issues/16289)). +Keputusan akhir belum dibuat, tetapi akan diselesaikan saat rilis resmi. + +## Fitur Baru Penting Lainnya + +* Sebuah *method reference operator*, `.:`, telah dikenalkan + sebagai sebuah fitur eksperimental pada *preview* sebelumnya, namun + telah dikembalikan. + [[Feature #12125]](https://bugs.ruby-lang.org/issues/12125), + [[Feature #13581]]( https://bugs.ruby-lang.org/issues/13581), + [[Feature #16275]](https://bugs.ruby-lang.org/issues/16275) + +* *Numbered parameter* sebagai *default block parameter* dikenalkan + sebagai sebuah fitur eksperimental. + [[Feature #4475]](https://bugs.ruby-lang.org/issues/4475) + +* Sebuah *beginless range* secara eksperimental dikenalkan. Ini mungkin tidak + berguna seperti *endless range*, tetapi sangat baik untuk penggunan DSL. + [[Feature #14799]](https://bugs.ruby-lang.org/issues/14799) + + ```ruby + ary[..3] # identical to ary[0..3] + rel.where(sales: ..100) + ``` + +* `Enumerable#tally` ditambahkan. Ini menghitung banyak elemen dari setiap + elemen. + + ```ruby + ["a", "b", "c", "b"].tally + #=> {"a"=>1, "b"=>2, "c"=>1} + ``` + +* Pemanggilan sebuah *private method* dengan sebuah `self` *literal* + sebagai penerima sekarang diperbolehkan. + [[Feature #11297]](https://bugs.ruby-lang.org/issues/11297), + [[Feature #16123]](https://bugs.ruby-lang.org/issues/16123) + + ```ruby + def foo + end + private :foo + self.foo + ``` + +* `Enumerator::Lazy#eager` ditambahkan. + Ini menghasilkan sebuah *non-lazy enumerator* dari sebuah *lazy enumerator*. + [[Feature #15901]](https://bugs.ruby-lang.org/issues/15901) + + ```ruby + a = %w(foo bar baz) + e = a.lazy.map {|x| x.upcase }.map {|x| x + "!" }.eager + p e.class #=> Enumerator + p e.map {|x| x + "?" } #=> ["FOO!?", "BAR!?", "BAZ!?"] + ``` + +## Perbaikan performa + +* JIT [Eksperimental] + + * Kode JIT-*ed* di-*recompile* untuk kode *less-optimized* ketika sebuah + asumsi optimisasi dibatalkan. + + * *Method inlining* dilakukan ketika sebuah *method* dianggap murni. + Optimisasi ini masih eksperimental dan banyak *method* dianggap tidak + murni. + + * Nilai default dari `--jit-min-calls` diubah dari 5 ke 10,000. + + * Nilai default dari `--jit-max-cache` diubah dari 1,000 ke 100. + +* `Module#name`, `true.to_s`, `false.to_s`, + dan `nil.to_s` sekarang selalu mengembalikan sebuah *frozen string*. + *String* yang dikembalikan selalu sama untuk sebuah objek. + [Eksperimental] + [[Feature #16150]](https://bugs.ruby-lang.org/issues/16150) + +* Performa dari `CGI.escapeHTML` ditingkatkan. + [GH-2226](https://github.com/ruby/ruby/pull/2226) + +* Performa dari Monitor dan MonitorMixin ditingkatkan. + [[Feature #16255]](https://bugs.ruby-lang.org/issues/16255) + +## Perubahan penting lainnya sejak 2.6 + +* Beberapa pustaka standar diperbarui. + * Bundler 2.1.0.pre.3 + ([History](https://github.com/bundler/bundler/blob/2-1-stable/CHANGELOG.md#210pre3-november-8-2019)) + * RubyGems 3.1.0.pre.3 + ([History](https://github.com/rubygems/rubygems/blob/3.1/History.txt)) + * CSV 3.1.2 + ([NEWS](https://github.com/ruby/csv/blob/v3.1.2/NEWS.md)) + * Racc 1.4.15 + * REXML 3.2.3 + ([NEWS](https://github.com/ruby/rexml/blob/v3.2.3/NEWS.md)) + * RSS 0.2.8 + ([NEWS](https://github.com/ruby/rss/blob/v0.2.8/NEWS.md)) + * StringScanner 1.0.3 + * Beberapa pustaka lainnya yang tidak memiliki versi asli juga diperbarui. + +* Memasukkan stdlib sebagai *default gem* + * *default gem* di bawah ini telah dipublikasikan ke rubygems.org + * benchmark + * cgi + * delegate + * getoptlong + * net-pop + * net-smtp + * open3 + * pstore + * singleton + * *default gem* di bawah ini hanya dimasukkan ke ruby-core, + tetapi belum dipublikasikan ke rubygems.org. + * monitor + * observer + * timeout + * tracer + * uri + * yaml + +* `Proc.new` dan `proc` tanpa *block* dalam sebuah *method* dipanggil dengan + sebuah *block* akan diperingatkan sekarang. + +* `lambda` tanpa *block* dalam sebuah *method* dipanggil dengan sebuah + *block* yang mengeluarkan *exception*. + +* Memperbarui versi Unicode dan Emoji dari 11.0.0 ke 12.0.0. + [[Feature #15321]](https://bugs.ruby-lang.org/issues/15321) + +* Memperbarui versi Unicode ke 12.1.0, + menambahkan dukungan U+32FF SQUARE ERA NAME REIWA. + [[Feature #15195]](https://bugs.ruby-lang.org/issues/15195) + +* `Date.jisx0301`, `Date#jisx0301`, dan `Date.parse` mendukung + *Japanese era* yang baru. + [[Feature #15742]](https://bugs.ruby-lang.org/issues/15742) + +* Membutuhkan *compiler* untuk mendukung C99. + [[Misc #15347]](https://bugs.ruby-lang.org/issues/15347) + * Detail dialek kami: + + +Lihat [NEWS](https://github.com/ruby/ruby/blob/v2_7_0_rc2/NEWS) +atau [commit logs](https://github.com/ruby/ruby/compare/v2_6_0...v2_7_0_rc2) +untuk lebih detail. + +Dengan perubahan tersebut, [{{ release.stats.files_changed }} berkas berubah, {{ release.stats.insertions }} sisipan(+), {{ release.stats.deletions }} terhapus(-)](https://github.com/ruby/ruby/compare/v2_6_0...v2_7_0_rc2) +sejak Ruby 2.6.0! +Nikmati memprogram dengan Ruby 2.7! + +## Unduh + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Apa itu Ruby + +Ruby pertama kali dikembangkan oleh Matz (Yukihiro Matsumoto) pada 1993 +dan sekarang dikembangkan sebagai *Open Source*. Ruby berjalan di berbagai +jenis *platform* dan digunakan di seluruh dunia khususnya pengembangan *web*. From d22fab43f309ddff4c1f26316fe43063f232629e Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Fri, 1 May 2020 21:59:43 +0700 Subject: [PATCH 0055/1487] Translate Ruby 2.7.0 released news (id) --- .../_posts/2019-12-25-ruby-2-7-0-released.md | 371 ++++++++++++++++++ 1 file changed, 371 insertions(+) create mode 100644 id/news/_posts/2019-12-25-ruby-2-7-0-released.md diff --git a/id/news/_posts/2019-12-25-ruby-2-7-0-released.md b/id/news/_posts/2019-12-25-ruby-2-7-0-released.md new file mode 100644 index 0000000000..9d4a5c2a04 --- /dev/null +++ b/id/news/_posts/2019-12-25-ruby-2-7-0-released.md @@ -0,0 +1,371 @@ +--- +layout: news_post +title: "Ruby 2.7.0 Dirilis" +author: "naruse" +translator: "meisyal" +date: 2019-12-25 00:00:00 +0000 +lang: id +--- + +Kami dengan senang hati mengumumkan rilis dari Ruby 2.7.0. + +Rilis ini memperkenalkan sejumlah fitur baru dan perbaikan performa, +terutama: + +* Pattern Matching +* REPL improvement +* Compaction GC +* Separation of positional and keyword arguments + +## Pattern Matching [Experimental] + +*Pattern matching*, fitur yang banyak digunakan dalam bahasa pemrograman +fungsional, dikenalkan sebagai sebuah fitur eksperimental. +[[Feature #14912]](https://bugs.ruby-lang.org/issues/14912) + +Ini dapat melewati sebuah objek dan menetapkan nilainya jika cocok dengan +sebuah pola. + +```ruby +require "json" + +json = < 2 +end +``` + +Untuk lebih detail, mohon lihat +[Pattern matching - New feature in Ruby 2.7](https://speakerdeck.com/k_tsj/pattern-matching-new-feature-in-ruby-2-dot-7). + +## REPL improvement + +`irb`, membungkus *interactive development* (REPL; Read-Eval-Print-Loop), +sekarang mendukung suntingan *multi-line*. Ini didukung oleh `reline`, +pustaka `readline` yang sesuai dengan implementasi murni dari Ruby. Ini juga +menyediakan integrasi rdoc. Di dalam `irb` Anda dapat menampilkan referensi +sebuah *class*, *module*, atau *method*. +[[Feature #14683]](https://bugs.ruby-lang.org/issues/14683), +[[Feature #14787]](https://bugs.ruby-lang.org/issues/14787), +[[Feature #14918]](https://bugs.ruby-lang.org/issues/14918) + +Selain itu, baris kode ditampilkan oleh `Binding#irb` dan hasil pemeriksaan +objek *core-class* sekarang berwarna. + + + +## Compaction GC + +Rilis ini memperkenalkan *Compaction* GC yang dapat *defragment* sebuah +*fragmented memory space*. + +Beberapa *multi-threaded* dari program Ruby dapat menyebabkan *memory +fragmentation*, menyebabkan penggunaan *memory* tinggi dan penurunan kecepatan. + +*Method* `GC.compact` dikenalkan untuk me-*compact heap*. Fungsi ini +me-*compact* objek di dalam *heap* sehingga sedikit *page* yang akan digunakan +dan *heap* bisa jadi lebih CoW (copy-on-write) bersahabat. +[[Feature #15626]](https://bugs.ruby-lang.org/issues/15626) + +## Separation of positional and keyword arguments + +Konversi otomatis dari *keyword argument* dan *positional argument* sudah +usang dan akan dihapus di Ruby 3. +[[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) + +Lihat artikel "[Pemisahan positional dan keyword argument pada Ruby 3.0](https://www.ruby-lang.org/id/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/)" untuk detail. +Hanya perubahan-perubahan sebagai berikut. + +* Ketika sebuah pemanggilan *method* melewati sebuah *Hash* pada *argument* + terakhir, ketika melewati *keyword* kosong, dan ketika *method* yang + dipanggil menerima *keyword*, sebuah peringatan dikeluarkan. Untuk + melanjutkan sebagai *keyword*, menambahkan sebuah *double splat operator* + untuk menghindari peringatan dan memastikan perilaku yang benar pada Ruby 3. + + + ```ruby + def foo(key: 42); end; foo({key: 42}) # warned + def foo(**kw); end; foo({key: 42}) # warned + def foo(key: 42); end; foo(**{key: 42}) # OK + def foo(**kw); end; foo(**{key: 42}) # OK + ``` + +* Ketika sebuah pemanggilan *method* melewati *keyword* ke sebuah *method* + yang menerima *keyword*, tetapi tidak memenuhi *positional argument* yang + diperlukan, *keyword* akan dianggap sebagai sebuah *required positional + argument* final dan sebuah peringatan dikeluarkan. Melewati *argument* + sebagai sebuah *hash* ketimbang *keyword* untuk menghindari peringatan dan + memastikan perilaku yang benar pada Ruby 3. + + ```ruby + def foo(h, **kw); end; foo(key: 42) # warned + def foo(h, key: 42); end; foo(key: 42) # warned + def foo(h, **kw); end; foo({key: 42}) # OK + def foo(h, key: 42); end; foo({key: 42}) # OK + ``` + +* Ketika sebuah *method* menerima *keyword* tertentu, tetapi bukan sebuah + *keyword splat* dan sebuah *hash* atau *keyword splat* dilewatkan *method* + yang memasukkan *key* Symbol dan non-Symbol, *hash* akan lanjut dengan + memisahkan dan sebuah peringatan dikeluarkan. Anda akan butuh pemanggilan + kode untuk melewati hash yang terpisah untuk memastikan perilaku yang benar + pada Ruby 3. + + ```ruby + def foo(h={}, key: 42); end; foo("key" => 43, key: 42) # warned + def foo(h={}, key: 42); end; foo({"key" => 43, key: 42}) # warned + def foo(h={}, key: 42); end; foo({"key" => 43}, key: 42) # OK + ``` + +* Jika sebuah *method* tidak menerima *keyword* dan dipanggil dengan *keyword*, + *keyword* akan dianggap sebagai sebuah *positional hash* tanpa peringatan. + Perilaku ini akan berlanjut pada Ruby 3. + + ```ruby + def foo(opt={}); end; foo( key: 42 ) # OK + ``` + +* Non-symbol diperbolehkan sebagai sebuah *keyword argument* jika *method* + menerima *arbitrary keyword*. + [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) + + ```ruby + def foo(**kw); p kw; end; foo("str" => 1) #=> {"str"=>1} + ``` + +* `**nil` diperbolehkan pada definisi *method* sebagai penanda + langsung bahwa *method* menerima *keyword* kosong. Memanggil *method* + seperti itu dengan *keyword* akan menyebabkan ArgumentError. + [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) + + ```ruby + def foo(h, **nil); end; foo(key: 1) # ArgumentError + def foo(h, **nil); end; foo(**{key: 1}) # ArgumentError + def foo(h, **nil); end; foo("str" => 1) # ArgumentError + def foo(h, **nil); end; foo({key: 1}) # OK + def foo(h, **nil); end; foo({"str" => 1}) # OK + ``` + +* Melewatkan sebuah *keyword splat* kosong pada sebuah *method* yang tidak + menerima *keyword* tidak akan lagi melewati sebuah *hash* kosong, kecuali + *hash* kosong dibutuhkan sebagai sebuah *required parameter*, di mana kasus + sebuah peringatan akan dikelurkan. Hilangkan *double splat* untuk melanjutkan + sebuah *positional hash*. + [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) + + ```ruby + h = {}; def foo(*a) a end; foo(**h) # [] + h = {}; def foo(a) a end; foo(**h) # {} and warning + h = {}; def foo(*a) a end; foo(h) # [{}] + h = {}; def foo(a) a end; foo(h) # {} + ``` + +Jika Anda ingin menonaktifkan peringatan *deprecation*, mohon gunakan sebuah +*command-line argument* `-W:no-deprecated` atau +tambahkan `Warning[:deprecated] = false` pada kode Anda. + +## Fitur Baru Penting Lainnya + +* *Numbered parameter* sebagai *default block parameter* dikenalkan. + [[Feature #4475]](https://bugs.ruby-lang.org/issues/4475) + +* Sebuah *beginless range* secara eksperimental dikenalkan. Ini mungkin tidak + berguna seperti *endless range*, tetapi sangat baik untuk penggunan DSL. + [[Feature #14799]](https://bugs.ruby-lang.org/issues/14799) + + ```ruby + ary[..3] # identical to ary[0..3] + rel.where(sales: ..100) + ``` + +* `Enumerable#tally` ditambahkan. Ini menghitung banyak elemen dari setiap + elemen. + + ```ruby + ["a", "b", "c", "b"].tally + #=> {"a"=>1, "b"=>2, "c"=>1} + ``` + +* Pemanggilan sebuah *private method* dengan sebuah `self` *literal* + sebagai penerima sekarang diperbolehkan. + [[Feature #11297]](https://bugs.ruby-lang.org/issues/11297), + [[Feature #16123]](https://bugs.ruby-lang.org/issues/16123) + + ```ruby + def foo + end + private :foo + self.foo + ``` + +* `Enumerator::Lazy#eager` ditambahkan. + Ini menghasilkan sebuah *non-lazy enumerator* dari sebuah *lazy enumerator*. + [[Feature #15901]](https://bugs.ruby-lang.org/issues/15901) + + ```ruby + a = %w(foo bar baz) + e = a.lazy.map {|x| x.upcase }.map {|x| x + "!" }.eager + p e.class #=> Enumerator + p e.map {|x| x + "?" } #=> ["FOO!?", "BAR!?", "BAZ!?"] + ``` + +## Perbaikan performa + +* JIT [Eksperimental] + + * Kode JIT-*ed* di-*recompile* untuk kode *less-optimized* ketika sebuah + asumsi optimisasi dibatalkan. + + * *Method inlining* dilakukan ketika sebuah *method* dianggap murni. + Optimisasi ini masih eksperimental dan banyak *method* dianggap tidak + murni. + + * Nilai default dari `--jit-min-calls` diubah dari 5 ke 10,000. + + * Nilai default dari `--jit-max-cache` diubah dari 1,000 ke 100. + +* `Module#name`, `true.to_s`, `false.to_s`, + dan `nil.to_s` sekarang selalu mengembalikan sebuah *frozen string*. + *String* yang dikembalikan selalu sama untuk sebuah objek. + [Eksperimental] + [[Feature #16150]](https://bugs.ruby-lang.org/issues/16150) + +* Performa dari `CGI.escapeHTML` ditingkatkan. + [GH-2226](https://github.com/ruby/ruby/pull/2226) + +* Performa dari Monitor dan MonitorMixin ditingkatkan. + [[Feature #16255]](https://bugs.ruby-lang.org/issues/16255) + +* *Per-call-site method cache*, yang mana telah ada sejak Ruby 1.9, + telah ditingkatkan: *cache hit rate* meningkat dari 89% ke 94%. + Lihat [GH-2583](https://github.com/ruby/ruby/pull/2583) + +* RubyVM::InstructionSequence#to_binary *method* menghasilkan *compiled binary*. + Ukuran *binary* berkurang. [Feature #16163] + +## Perubahan penting lainnya sejak 2.6 + +* Beberapa pustaka standar diperbarui. + * Bundler 2.1.2 + ([Release note](https://github.com/bundler/bundler/releases/tag/v2.1.2)) + * RubyGems 3.1.2 + * ([Release note for 3.1.0](https://github.com/rubygems/rubygems/releases/tag/v3.1.0)) + * ([Release note for 3.1.1](https://github.com/rubygems/rubygems/releases/tag/v3.1.1)) + * ([Release note for 3.1.2](https://github.com/rubygems/rubygems/releases/tag/v3.1.2)) + * Racc 1.4.15 + * CSV 3.1.2 + ([NEWS](https://github.com/ruby/csv/blob/v3.1.2/NEWS.md)) + * REXML 3.2.3 + ([NEWS](https://github.com/ruby/rexml/blob/v3.2.3/NEWS.md)) + * RSS 0.2.8 + ([NEWS](https://github.com/ruby/rss/blob/v0.2.8/NEWS.md)) + * StringScanner 1.0.3 + * Beberapa pustaka lainnya yang tidak memiliki versi asli juga diperbarui. + +* Pustaka-pustaka berikut tidak lagi sebagai *bundled gem*. + Pasang *gem* yang sesuai untuk menggunakan fitur-fitur ini. + * CMath (cmath gem) + * Scanf (scanf gem) + * Shell (shell gem) + * Synchronizer (sync gem) + * ThreadsWait (thwait gem) + * E2MM (e2mmap gem) + +* `profile.rb` telah dihapus dari pustaka standar. + +* Memasukkan stdlib sebagai *default gem* + * *default gem* di bawah ini telah dipublikasikan ke rubygems.org + * benchmark + * cgi + * delegate + * getoptlong + * net-pop + * net-smtp + * open3 + * pstore + * singleton + * *default gem* di bawah ini hanya dimasukkan ke ruby-core, + tetapi belum dipublikasikan ke rubygems.org. + * monitor + * observer + * timeout + * tracer + * uri + * yaml + +* `Proc.new` dan `proc` tanpa *block* dalam sebuah *method* dipanggil dengan + sebuah *block* akan diperingatkan sekarang. + +* `lambda` tanpa *block* dalam sebuah *method* dipanggil dengan sebuah + *block* yang mengeluarkan *exception*. + +* Memperbarui versi Unicode dan Emoji dari 11.0.0 ke 12.0.0. + [[Feature #15321]](https://bugs.ruby-lang.org/issues/15321) + +* Memperbarui versi Unicode ke 12.1.0, + menambahkan dukungan U+32FF SQUARE ERA NAME REIWA. + [[Feature #15195]](https://bugs.ruby-lang.org/issues/15195) + +* `Date.jisx0301`, `Date#jisx0301`, dan `Date.parse` mendukung + *Japanese era* yang baru. + [[Feature #15742]](https://bugs.ruby-lang.org/issues/15742) + +* Membutuhkan *compiler* untuk mendukung C99. + [[Misc #15347]](https://bugs.ruby-lang.org/issues/15347) + * Detail dialek kami: + + +Lihat [NEWS](https://github.com/ruby/ruby/blob/v2_7_0/NEWS) +atau [commit logs](https://github.com/ruby/ruby/compare/v2_6_0...v2_7_0) +untuk lebih detail. + +Dengan perubahan tersebut, [{{ release.stats.files_changed }} berkas berubah, {{ release.stats.insertions }} sisipan(+), {{ release.stats.deletions }} terhapus(-)](https://github.com/ruby/ruby/compare/v2_6_0...v2_7_0) +sejak Ruby 2.6.0! + +Selamat Natal, selamat berlibur, dan nikmati memprogram dengan Ruby 2.7! + +## Unduh + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Apa itu Ruby + +Ruby pertama kali dikembangkan oleh Matz (Yukihiro Matsumoto) pada 1993 +dan sekarang dikembangkan sebagai *Open Source*. Ruby berjalan di berbagai +jenis *platform* dan digunakan di seluruh dunia khususnya pengembangan *web*. From cdd219e79302e680d1d89f714e859cf1854ff41c Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Mon, 11 May 2020 01:06:02 +0300 Subject: [PATCH 0056/1487] Remove "*" symbol in "Separation of positional and keyword arguments in Ruby 3.0" post (id) --- ...ion-of-positional-and-keyword-arguments-in-ruby-3-0.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/id/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/id/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md index 10353e4739..949f4eeccc 100644 --- a/id/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md +++ b/id/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -1,6 +1,6 @@ --- layout: news_post -title: "Pemisahan *positional* dan *keyword argument* pada Ruby 3.0" +title: "Pemisahan positional dan keyword argument pada Ruby 3.0" author: "mame" translator: "meisyal" date: 2019-12-12 12:00:00 +0000 @@ -17,9 +17,9 @@ akan memberi peringatan terhadap perilaku yang akan berubah pada Ruby 3.0. Jika Anda melihat peringatan di bawah ini maka Anda perlu untuk memperbarui kode Anda: -* `Menggunakan *argument* terakhir sebagai parameter *argument* sudah usang`, atau -* `Melewatkan *keyword argument* sebagai parameter *hash* terakhir juga sudah usang`, atau -* `Memisahkan *argument* terakhir ke *positional* dan *keyword argument* juga sudah usang` +* `Menggunakan argument terakhir sebagai parameter argument sudah usang`, atau +* `Melewatkan keyword argument sebagai parameter hash terakhir juga sudah usang`, atau +* `Memisahkan argument terakhir ke positional dan keyword argument juga sudah usang` Pada kebanyakan kasus, Anda dapat menghindari *compatibility* ini dengan menambahkan operator _double splat_. Operator ini secara langsung melewatkan From 1b5d2c06957b96ff41d39406fe0883df867c02c3 Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Mon, 11 May 2020 02:58:18 +0300 Subject: [PATCH 0057/1487] Fix indentation in last news posts (es, pt) --- .../2019-05-30-ruby-2-7-0-preview1-released.md | 16 ++++++++-------- .../2019-10-22-ruby-2-7-0-preview2-released.md | 18 +++++++++--------- .../2019-11-23-ruby-2-7-0-preview3-released.md | 16 ++++++++-------- .../2019-12-17-ruby-2-7-0-rc1-released.md | 16 ++++++++-------- .../2019-12-21-ruby-2-7-0-rc2-released.md | 16 ++++++++-------- .../_posts/2019-12-25-ruby-2-7-0-released.md | 16 ++++++++-------- .../2019-05-30-ruby-2-7-0-preview1-released.md | 18 +++++++++--------- 7 files changed, 58 insertions(+), 58 deletions(-) diff --git a/es/news/_posts/2019-05-30-ruby-2-7-0-preview1-released.md b/es/news/_posts/2019-05-30-ruby-2-7-0-preview1-released.md index 657878ca88..4d88f4b8e1 100644 --- a/es/news/_posts/2019-05-30-ruby-2-7-0-preview1-released.md +++ b/es/news/_posts/2019-05-30-ruby-2-7-0-preview1-released.md @@ -32,14 +32,14 @@ Puede recorrer un objeto dado y asignar su valor si concuerda con un patrón. ```ruby json ='{ - "nombre": "Alice", - "edad": 30, - "hijos": [ - { - "nombre": "Bob", - "edad": 2 - } - ] + "nombre": "Alice", + "edad": 30, + "hijos": [ + { + "nombre": "Bob", + "edad": 2 + } + ] }' case JSON.parse(json, symbolize_names: true) in {nombre: "Alice", hijos: [{nombre: "Bob", edad: edad}]} diff --git a/es/news/_posts/2019-10-22-ruby-2-7-0-preview2-released.md b/es/news/_posts/2019-10-22-ruby-2-7-0-preview2-released.md index 4f02a8df16..363a479dca 100644 --- a/es/news/_posts/2019-10-22-ruby-2-7-0-preview2-released.md +++ b/es/news/_posts/2019-10-22-ruby-2-7-0-preview2-released.md @@ -1,6 +1,6 @@ --- layout: news_post -title: "Ruby 2.7.0-preview2 Publicado " +title: "Ruby 2.7.0-preview2 Publicado" author: "naruse" translator: vtamara date: 2019-10-22 12:00:00 +0000 @@ -44,14 +44,14 @@ Puede recorrer un objeto dado y asignar su valor si concuerda con un patrón. ```ruby json ='{ - "nombre": "Alice", - "edad": 30, - "hijos": [ - { - "nombre": "Bob", - "edad": 2 - } - ] + "nombre": "Alice", + "edad": 30, + "hijos": [ + { + "nombre": "Bob", + "edad": 2 + } + ] }' case JSON.parse(json, symbolize_names: true) in {nombre: "Alice", hijos: [{nombre: "Bob", edad: edad}]} diff --git a/es/news/_posts/2019-11-23-ruby-2-7-0-preview3-released.md b/es/news/_posts/2019-11-23-ruby-2-7-0-preview3-released.md index 0620ea931b..3153dce7db 100644 --- a/es/news/_posts/2019-11-23-ruby-2-7-0-preview3-released.md +++ b/es/news/_posts/2019-11-23-ruby-2-7-0-preview3-released.md @@ -49,14 +49,14 @@ Puede recorrer un objeto dado y asignar su valor si concuerda con un patrón. ```ruby json ='{ - "nombre": "Alice", - "edad": 30, - "hijos": [ - { - "nombre": "Bob", - "edad": 2 - } - ] + "nombre": "Alice", + "edad": 30, + "hijos": [ + { + "nombre": "Bob", + "edad": 2 + } + ] }' case JSON.parse(json, symbolize_names: true) in {nombre: "Alice", hijos: [{nombre: "Bob", edad: edad}]} diff --git a/es/news/_posts/2019-12-17-ruby-2-7-0-rc1-released.md b/es/news/_posts/2019-12-17-ruby-2-7-0-rc1-released.md index 596aef758f..25d5114765 100644 --- a/es/news/_posts/2019-12-17-ruby-2-7-0-rc1-released.md +++ b/es/news/_posts/2019-12-17-ruby-2-7-0-rc1-released.md @@ -50,14 +50,14 @@ Puede recorrer un objeto dado y asignar su valor si concuerda con un patrón. ```ruby json ='{ - "nombre": "Alice", - "edad": 30, - "hijos": [ - { - "nombre": "Bob", - "edad": 2 - } - ] + "nombre": "Alice", + "edad": 30, + "hijos": [ + { + "nombre": "Bob", + "edad": 2 + } + ] }' case JSON.parse(json, symbolize_names: true) in {nombre: "Alice", hijos: [{nombre: "Bob", edad: edad}]} diff --git a/es/news/_posts/2019-12-21-ruby-2-7-0-rc2-released.md b/es/news/_posts/2019-12-21-ruby-2-7-0-rc2-released.md index 047f87fecb..ace86ba601 100644 --- a/es/news/_posts/2019-12-21-ruby-2-7-0-rc2-released.md +++ b/es/news/_posts/2019-12-21-ruby-2-7-0-rc2-released.md @@ -33,14 +33,14 @@ Puede recorrer un objeto dado y asignar su valor si concuerda con un patrón. ```ruby json ='{ - "nombre": "Alice", - "edad": 30, - "hijos": [ - { - "nombre": "Bob", - "edad": 2 - } - ] + "nombre": "Alice", + "edad": 30, + "hijos": [ + { + "nombre": "Bob", + "edad": 2 + } + ] }' case JSON.parse(json, symbolize_names: true) in {nombre: "Alice", hijos: [{nombre: "Bob", edad: edad}]} diff --git a/es/news/_posts/2019-12-25-ruby-2-7-0-released.md b/es/news/_posts/2019-12-25-ruby-2-7-0-released.md index 1014beb691..205af086ff 100644 --- a/es/news/_posts/2019-12-25-ruby-2-7-0-released.md +++ b/es/news/_posts/2019-12-25-ruby-2-7-0-released.md @@ -28,14 +28,14 @@ Puede recorrer un objeto dado y asignar su valor si concuerda con un patrón. ```ruby json ='{ - "nombre": "Alice", - "edad": 30, - "hijos": [ - { - "nombre": "Bob", - "edad": 2 - } - ] + "nombre": "Alice", + "edad": 30, + "hijos": [ + { + "nombre": "Bob", + "edad": 2 + } + ] }' case JSON.parse(json, symbolize_names: true) in {nombre: "Alice", hijos: [{nombre: "Bob", edad: edad}]} diff --git a/pt/news/_posts/2019-05-30-ruby-2-7-0-preview1-released.md b/pt/news/_posts/2019-05-30-ruby-2-7-0-preview1-released.md index c8177862c2..aee4617440 100644 --- a/pt/news/_posts/2019-05-30-ruby-2-7-0-preview1-released.md +++ b/pt/news/_posts/2019-05-30-ruby-2-7-0-preview1-released.md @@ -28,18 +28,18 @@ páginas possam ser usadas e a heap possa ser mais _CoW friendly_. [#15626](http ## Pattern Matching [Experimental] Pattern matching, funcionalidade amplamenta utilizada em linguagens para programação funcional, é introduzida como uma funcionalidade experimental. [#14912](https://bugs.ruby-lang.org/issues/14912) -Ela pode examinar um dado objeto e definir seu valor se um padrão for . +Ela pode examinar um dado objeto e definir seu valor se um padrão for. ```ruby json ='{ - "nombre": "Alice", - "edad": 30, - "hijos": [ - { - "nombre": "Bob", - "edad": 2 - } - ] + "nombre": "Alice", + "edad": 30, + "hijos": [ + { + "nombre": "Bob", + "edad": 2 + } + ] }' case JSON.parse('{...}', symbolize_names: true) in {name: "Alice", children: [{name: "Bob", age: age}]} From 03216704daf3aac39d722d569ee9bbd778ec595f Mon Sep 17 00:00:00 2001 From: Alex Shi Date: Wed, 13 May 2020 23:34:32 +0800 Subject: [PATCH 0058/1487] Translate 2.7.1 news and CVE-2020-10663, CVE-2020-10933 (zh_cn) (#2425) * Translate 2.7.1 news (zh_cn) * Translate CVE 2020-10933 and 2020-10663 (zh_cn) --- .../2020-03-19-json-dos-cve-2020-10663.md | 33 ++++++++++++ ...-heap-exposure-in-socket-cve-2020-10933.md | 32 +++++++++++ .../_posts/2020-03-31-ruby-2-7-1-released.md | 53 +++++++++++++++++++ 3 files changed, 118 insertions(+) create mode 100644 zh_cn/news/_posts/2020-03-19-json-dos-cve-2020-10663.md create mode 100644 zh_cn/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md create mode 100644 zh_cn/news/_posts/2020-03-31-ruby-2-7-1-released.md diff --git a/zh_cn/news/_posts/2020-03-19-json-dos-cve-2020-10663.md b/zh_cn/news/_posts/2020-03-19-json-dos-cve-2020-10663.md new file mode 100644 index 0000000000..88077d1bd0 --- /dev/null +++ b/zh_cn/news/_posts/2020-03-19-json-dos-cve-2020-10663.md @@ -0,0 +1,33 @@ +--- +layout: news_post +title: "CVE-2020-10663: JSON 存在任意创建不安全对象风险 (额外修复)" +author: "mame" +translator: "Alex S" +date: 2020-03-19 13:00:00 +0000 +tags: security +lang: zh_cn +--- + +Ruby 內建的 json gem 存在任意创建不安全对象风险,此风险的 CVE 识别号为 [CVE-2020-10663](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10663)。我们强烈建议您升级 json gem。 + +## 风险细节 + +json gem(包含 Ruby 內建的版本)在解析 JSON 文件时,系統可以被置入任意的对象。 + +此风险与 [CVE-2013-0269](https://www.ruby-lang.org/en/news/2013/02/22/json-dos-cve-2013-0269/) 是同样的问题。之前的补丁不完整,只修复了 `JSON.parse(user_input)`,沒修复到其他解析的方法像是:`JSON(user_input)` 和 `JSON.parse(user_input, nil)`。 + +了解更多细节参见 [CVE-2013-0269](https://www.ruby-lang.org/en/news/2013/02/22/json-dos-cve-2013-0269/)。注意本风险本可用來建立大量无法被 GC 回收的 Symbol 对象,但像是这种类型的攻击已经不再有效,因为 Ruby 已经可以垃圾回收 Symbol 对象了。但根据程序代码的不同,创建任何对象仍可能存在严重的安全风险。 + +请用 `gem update json` 命令更新 json gem 至 2.3.0 以上版本。用 bundler 请加入 `gem "json", ">= 2.3.0"` 这行到 `Gemfile`。 + +## 受影响版本 + +* JSON gem 2.2.0 及先前版本 + +## 致谢 + +感谢 Jeremy Evans 报告此问题。 + +## 历史 + +* 最初发布于 2020-03-19 13:00:00 (UTC) diff --git a/zh_cn/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md b/zh_cn/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md new file mode 100644 index 0000000000..f890b32c40 --- /dev/null +++ b/zh_cn/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md @@ -0,0 +1,32 @@ +--- +layout: news_post +title: "CVE-2020-10933:socket 函数库存在堆内存泄漏风险" +author: "mame" +translator: "Alex S" +date: 2020-03-31 12:00:00 +0000 +tags: security +lang: zh_cn +--- + +socket 函数库存在堆内存泄漏风险。此风险的 CVE 识别号为 [CVE-2020-10933](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10933)。我们强烈建议您升级 Ruby。 + +## 风险细节 + +当调用 `BasicSocket#recv_nonblock` 和 `BasicSocket#read_nonblock` 方法,传入 size 与 buffer 参数时,buffer 会被调整为制定大小。当执行被阻塞,他們会不拷贝任何数据立即返回。因此,buffer 字符串可以带有堆内存上的任何数据。这可能导致解释器泄漏敏感数据。 + +在 Linux 上可以重现这个问题。从 Ruby 2.5.0 开始存在此风险,Ruby 2.4 系列版本没有问题。 + +## 受影响版本 + +* Ruby 2.5 系列:Ruby 2.5.7 及更早版本 +* Ruby 2.6 系列:Ruby 2.6.5 及更早版本 +* Ruby 2.7 系列:2.7.0 +* master 早于 61b7f86248bd121be2e83768be71ef289e8e5b90 的提交 + +## 致谢 + +感谢 Samuel Williams 报告此问题。 + +## 历史 + +* 最初发布于 2020-03-31 12:00:00 (UTC) diff --git a/zh_cn/news/_posts/2020-03-31-ruby-2-7-1-released.md b/zh_cn/news/_posts/2020-03-31-ruby-2-7-1-released.md new file mode 100644 index 0000000000..a9a28ef310 --- /dev/null +++ b/zh_cn/news/_posts/2020-03-31-ruby-2-7-1-released.md @@ -0,0 +1,53 @@ +--- +layout: news_post +title: "Ruby 2.7.1 发布" +author: "naruse" +translator: "Alex S" +date: 2020-03-31 12:00:00 +0000 +lang: zh_cn +--- + +Ruby 2.7.1 已经发布。 + +本版本包含安全性修复。细节请参考以下内容。 + +* [CVE-2020-10663: JSON 存在任意创建不安全对象风险 (额外修复)]({% link zh_cn/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10933:socket 函数库存在堆内存泄漏风险]({% link zh_cn/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) + +详细变动请参阅[提交记录](https://github.com/ruby/ruby/compare/v2_7_0...v2_7_1)。 + +## 下载 + +{% assign release = site.data.releases | where: "version", "2.7.1" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## 发布记 + +许多提交者、开发者和漏洞报告者帮助了此版本的发布,在此感谢所有人的贡献。 From e008d0caaeb1ec5547ff34d2e46f36c3d7a145dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20T=C3=A1mara=20Pati=C3=B1o?= Date: Mon, 1 Jun 2020 12:26:14 -0400 Subject: [PATCH 0059/1487] Translate CVE-2020-10933 post (es) (#2435) --- ...-heap-exposure-in-socket-cve-2020-10933.md | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 es/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md diff --git a/es/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md b/es/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md new file mode 100644 index 0000000000..18e06ae845 --- /dev/null +++ b/es/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md @@ -0,0 +1,42 @@ +--- +layout: news_post +title: "CVE-2020-10933: Vulnerabilidad de exposición del montón (heap) en la librería de zócalos (sockets)" +author: "mame" +translator: "vtamara" +date: 2020-03-31 12:00:00 +0000 +tags: security +lang: es +--- + +Una vulnerabilidad de exposición del montón (heap) ha sido descubierta en +la librería de zócalos (sockets). +A esta vulnerabilidad se le ha asignado el identificador +CVE [CVE-2020-10933](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10933). +Recomendamos con énfasis actualizar Ruby. + +## Detalles + +Cuando se llama `BasicSocket#recv_nonblock` y `BasicSocket#read_nonblock` con +argumentos de tamaño y colchón (buffer), estas funciones inicialmente cambian +el tamaño del colchon al tamaño especificado. En casos donde la operación +fuera a bloquearse, retornan sin copiar dato alguno. Asi que, la +cadena colchón incluirá datos arbitrarios del montón (heap). Esto podría +exponer datos sensibles del interprete. + +Este problema puede explotarse sólo en Linux. El problema ha estado +presente desde Ruby 2.5.0; la serie 2.4 no es vulnerable. + +## Versiones afectadas + +* Serie Ruby 2.5: 2.5.7 y anteriores +* Serire Ruby 2.6: 2.6.5 y anteriores +* Serire Ruby 2.7: 2.7.0 +* en la rama master versiones anteriores a 61b7f86248bd121be2e83768be71ef289e8e5b90 + +## Créditos + +Agradecemos a Samuel Williams por descubrir este problema. + +## Historia + +* Publicado originalmente el 2020-03-31 12:00:00 (UTC) From 845d37622b9bc5a9d629ecec5f1ac5f780c15e21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20T=C3=A1mara=20Pati=C3=B1o?= Date: Mon, 1 Jun 2020 12:51:06 -0400 Subject: [PATCH 0060/1487] Translate releases of 2020-03-31 (es) (#2452) --- .../_posts/2020-03-31-ruby-2-4-10-released.md | 59 +++++++++++++++++++ .../_posts/2020-03-31-ruby-2-5-8-released.md | 55 +++++++++++++++++ .../_posts/2020-03-31-ruby-2-6-6-released.md | 57 ++++++++++++++++++ .../_posts/2020-03-31-ruby-2-7-1-released.md | 57 ++++++++++++++++++ 4 files changed, 228 insertions(+) create mode 100644 es/news/_posts/2020-03-31-ruby-2-4-10-released.md create mode 100644 es/news/_posts/2020-03-31-ruby-2-5-8-released.md create mode 100644 es/news/_posts/2020-03-31-ruby-2-6-6-released.md create mode 100644 es/news/_posts/2020-03-31-ruby-2-7-1-released.md diff --git a/es/news/_posts/2020-03-31-ruby-2-4-10-released.md b/es/news/_posts/2020-03-31-ruby-2-4-10-released.md new file mode 100644 index 0000000000..3cc4d71e16 --- /dev/null +++ b/es/news/_posts/2020-03-31-ruby-2-4-10-released.md @@ -0,0 +1,59 @@ +--- +layout: news_post +title: "Ruby 2.4.10 Released" +author: "usa" +translator: "vtamara" +date: 2020-03-31 12:00:00 +0000 +lang: es +--- + +Ruby 2.4.10 ha sido publicado. + +Esta versión incluye una corrección de seguridad. Por favor revise +los detalles a continuación. + +* [CVE-2020-10663: Vulnerabilidad de Creación Insegura de Objetos en JSON (Corrección adicional)]({% link es/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) + +Ruby 2.4 ahora está en la fase de mantenimiento de seguridad, hasta el final +de Marzo de 2020. +Después de esa fecha, terminará el mantenimiento de Ruby 2.4. +Por tanto, esta versión sería la última de la serie Ruby 2.4. +Recomendamos que actualice de inmediato a una versión más reciente de Ruby, +tal como 2.7 o 2.6 o 2.5. + +## Descargas + +{% assign release = site.data.releases | where: "version", "2.4.10" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Comentario de la Versión + +Gracias a todos los que ayudaron con esta publicación, especialmente +a quienes reportaron la vulnerabilidad. diff --git a/es/news/_posts/2020-03-31-ruby-2-5-8-released.md b/es/news/_posts/2020-03-31-ruby-2-5-8-released.md new file mode 100644 index 0000000000..6f6bbd16fd --- /dev/null +++ b/es/news/_posts/2020-03-31-ruby-2-5-8-released.md @@ -0,0 +1,55 @@ +--- +layout: news_post +title: "Ruby 2.5.8 Released" +author: "usa" +translator: "vtamara" +date: 2020-03-31 12:00:00 +0000 +lang: es +--- + +Ruby 2.5.8 ha sido publicado. + +Esta versión incluye correcciones de seguridad. Por favor revise +detalles en los siguientes temas. + +* [CVE-2020-10663: Vulnerabilidad de Creación Insegura de Objetos en JSON (Corrección adicional)]({% link es/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10933: Vulnerabilidad de exposición del montón (heap) en la librería de zócalos (sockets)]({% link es/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) + +Ver detalles en la [bitácora de cambios](https://github.com/ruby/ruby/compare/v2_5_7...v2_5_8) + +## Descargas + +{% assign release = site.data.releases | where: "version", "2.5.8" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Comentario de la versión + +Gracias a todos los que ayudaron con esta publicación, especialmente +a quienes reportaron la vulnerabilidad. diff --git a/es/news/_posts/2020-03-31-ruby-2-6-6-released.md b/es/news/_posts/2020-03-31-ruby-2-6-6-released.md new file mode 100644 index 0000000000..1c082db6de --- /dev/null +++ b/es/news/_posts/2020-03-31-ruby-2-6-6-released.md @@ -0,0 +1,57 @@ +--- +layout: news_post +title: "Ruby 2.6.6 Released" +author: "nagachika" +translator: "vtamara" +date: 2020-03-31 12:00:00 +0000 +lang: es +--- + +Ruby 2.6.6 ha sido publicado. + +Esta versión incluye correcciones de seguridad. +Por favor revise detalles en los siguientes temas. + +* [CVE-2020-10663: Vulnerabilidad de Creación Insegura de Objetos en JSON (Corrección adicional)]({% link es/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10933: Vulnerabilidad de exposición del montón (heap) en la librería de zócalos (sockets)]({% link es/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) + +Ver detalles en la [bitácora de cambios](https://github.com/ruby/ruby/compare/v2_6_5...v2_6_6). + +## Descargas + +{% assign release = site.data.releases | where: "version", "2.6.6" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + + +## Comentario de la versión + +Muchos contribuyentes, desarrolladores y usuarios aportaron +reportes de fallas y nos ayudar a hacer esta versión. +Gracias por sus contribuciones. diff --git a/es/news/_posts/2020-03-31-ruby-2-7-1-released.md b/es/news/_posts/2020-03-31-ruby-2-7-1-released.md new file mode 100644 index 0000000000..4fd83956e0 --- /dev/null +++ b/es/news/_posts/2020-03-31-ruby-2-7-1-released.md @@ -0,0 +1,57 @@ +--- +layout: news_post +title: "Ruby 2.7.1 Released" +author: "naruse" +translator: "vtamara" +date: 2020-03-31 12:00:00 +0000 +lang: es +--- + +Ruby 2.7.1 has been released. + +Esta versión incluye correcciones de seguridad. +Por favor revise detalles en los siguientes temas. + +* [CVE-2020-10663: Vulnerabilidad de Creación Insegura de Objetos en JSON (Corrección adicional)]({% link es/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10933: Vulnerabilidad de exposición del montón (heap) en la librería de zócalos (sockets)]({% link es/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) + +Ver detalles en la [bitácora de cambios](https://github.com/ruby/ruby/compare/v2_7_0...v2_7_1). + +## Descargas + +{% assign release = site.data.releases | where: "version", "2.7.1" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + + +## Comentario de la versión + +Muchos contribuyentes, desarrolladores y usuarios aportaron +reportes de fallas y nos ayudar a hacer esta versión. +Gracias por sus contribuciones. From 7c93282561a46709292e3e45fe16c40010037860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20T=C3=A1mara=20Pati=C3=B1o?= Date: Mon, 1 Jun 2020 12:51:23 -0400 Subject: [PATCH 0061/1487] Translate Support of Ruby 2.4 has ended (es) (#2453) --- ...020-04-05-support-of-ruby-2-4-has-ended.md | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 es/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md diff --git a/es/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md b/es/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md new file mode 100644 index 0000000000..e164c30c3c --- /dev/null +++ b/es/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md @@ -0,0 +1,50 @@ +--- +layout: news_post +title: "Support of Ruby 2.4 has ended" +author: "usa" +translator: "vtamara" +date: 2020-04-05 12:00:00 +0000 +lang: es +--- + +Anunciamos que ha terminado todo el soporte para la serie Ruby 2.4. + +Desde el final de Marzo del año pasado, el soporte para la serie Ruby 2.4 +estaba en fase de mantenimiento de seguridad. +Ahora, después de un año, esta fase ha terminado. +Por tanto, en Marzo 31 de 2020 todo soporte de la serie Ruby 2.4 ha terminado. +Las correcciones de fallas y de seguridad de las versiones de Ruby más +recientes ya no se retro-portarán a 2.4, ni se publicarán nuevas versiones +de la serie 2.4. +Pulicamos Ruby 2.4.10 el 31 de Marzo de 2020, pero para dar a los usuarios +un poco de tiempo para pasar a las versiones más recientes. +Recomendamos con enfásis que actualice a las versiones más recientes +de Ruby tan pronto como sea posible. + +## Sobre las versiones de Ruby soportadas en la actualidad + +### Serie Ruby 2.7 + +En fase de mantenimento normal. +Retro-portaremos correcciones a fallas y publicaremos nuevas versiones con +las correcciones cuando sea necesario. +Y, si se encuentra un problema de seguridad crítico, publicaremos una +corrección urgente para esta. + +### Serie Ruby 2.6 + +En fase de mantenimiento normal. +Retro-portaremos correcciones a fallas y publicaremos nuevas versiones con +las correcciones cuando sea necesario. +Y, si se encuentra un problema de seguridad crítico, publicaremos una +corrección urgente para esta. + +### Serie Ruby 2.5 + +En fase de mantenimiento de seguridad. +No retro-portaremos correcciones a fallas a la serie 2.5, excepto +fallas de seguridad. +Si se encuentra un problema de seguridad crítico, publicaremos una +corrección urgente para esta. +Planeamos terminar el soporte para la serie Ruby 2.5 al final de +Marzo de 2021. From 2466984da42e4ec05b72ca1916e448b2573b8a8a Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 18 Jun 2020 18:21:06 +0900 Subject: [PATCH 0062/1487] Update the latest sponsor list --- en/about/website/index.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/en/about/website/index.md b/en/about/website/index.md index 36e982f1d0..c265f38184 100644 --- a/en/about/website/index.md +++ b/en/about/website/index.md @@ -35,13 +35,11 @@ to this website. Also many thanks to the organizations that support us: * [Ruby Association][rubyassociation] (hosting) + * [Ruby no Kai][rubynokai] (build server) + * [AWS][aws] (hosting) * [Heroku][heroku] (hosting) - * [IIJ][iij] (hosting) - * [GlobalSign][globalsign] (SSL certification) * [Fastly][fastly] (CDN) * [Hatena][hatena] ([mackerel][mackerel], server monitoring) - * [CloudCore][cloudcore] (build server) - * [Ruby no Kai][rubynokai] (build server) [logo]: /en/about/logo/ @@ -53,10 +51,8 @@ Also many thanks to the organizations that support us: [github-wiki]: https://github.com/ruby/www.ruby-lang.org/wiki [rubyassociation]: http://www.ruby.or.jp [heroku]: https://www.heroku.com/ -[iij]: http://www.iij.ad.jp -[globalsign]: https://www.globalsign.com [fastly]: http://www.fastly.com [hatena]: http://hatenacorp.jp/ [mackerel]: https://mackerel.io/ -[cloudcore]: http://www.cloudcore.jp/?utm_source=ad&utm_medium=ad&utm_content=dev&utm_campaign=vps [rubynokai]: http://ruby-no-kai.org/ +[aws]: https://aws.amazon.com/ From 5bb8784bc39082f205f161fc1ba17e96179281f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20Ar=C4=B1l=C4=B1k?= Date: Sat, 20 Jun 2020 18:20:14 +0300 Subject: [PATCH 0063/1487] Update the latest sponsor list (tr) (#2456) --- tr/about/website/index.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tr/about/website/index.md b/tr/about/website/index.md index 97bfa30fcd..a23881421d 100644 --- a/tr/about/website/index.md +++ b/tr/about/website/index.md @@ -32,13 +32,11 @@ Tüm işleyicilere, yazarlara, çevirmenlere, ve bu siteye katkıda bulunan diğ Ayrıca bizi destekleyen organizasyonlara çok teşekkür ederiz: * [Ruby Derneği][rubyassociation] (barındırma) + * [Ruby no Kai][rubynokai] (inşa sunucusu) + * [AWS][aws] (barındırma) * [Heroku][heroku] (barındırma) - * [IIJ][iij] (barındırma) - * [GlobalSign][globalsign] (SSL sertifikası) * [Fastly][fastly] (CDN) * [Hatena][hatena] ([mackerel][mackerel], sunucu izleme) - * [CloudCore][cloudcore] (inşa sunucusu) - * [Ruby no Kai][rubynokai] (inşa sunucusu) [logo]: /tr/about/logo/ @@ -50,10 +48,8 @@ Ayrıca bizi destekleyen organizasyonlara çok teşekkür ederiz: [github-wiki]: https://github.com/ruby/www.ruby-lang.org/wiki [rubyassociation]: http://www.ruby.or.jp [heroku]: https://www.heroku.com/ -[iij]: http://www.iij.ad.jp -[globalsign]: https://www.globalsign.com [fastly]: http://www.fastly.com [hatena]: http://hatenacorp.jp/ [mackerel]: https://mackerel.io/ -[cloudcore]: http://www.cloudcore.jp/?utm_source=ad&utm_medium=ad&utm_content=dev&utm_campaign=vps [rubynokai]: http://ruby-no-kai.org/ +[aws]: https://aws.amazon.com/ From bedf30c5246376696577500b1800ae37eba5c580 Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Sat, 20 Jun 2020 23:03:10 +0300 Subject: [PATCH 0064/1487] Add hatena corp. (ru) See commit a4296ec6b0b692246fef27d5fb8009eba1cacd19. --- ru/about/website/index.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ru/about/website/index.md b/ru/about/website/index.md index 1d4fc5fe75..791ab67965 100644 --- a/ru/about/website/index.md +++ b/ru/about/website/index.md @@ -38,6 +38,7 @@ lang: ru * [IIJ][iij] (хостинг), * [GlobalSign][globalsign] (SSL сертификация), * [Fastly][fastly] (CDN). + * [Hatena][hatena] ([mackerel][mackerel], мониторинг сервера) [logo]: /ru/about/logo/ @@ -52,3 +53,5 @@ lang: ru [iij]: http://www.iij.ad.jp [globalsign]: https://www.globalsign.com [fastly]: http://www.fastly.com +[hatena]: http://hatenacorp.jp/ +[mackerel]: https://mackerel.io/ From a734e4f1f4d2db6aa75ece817568e1d9b033306b Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Sun, 21 Jun 2020 00:12:32 +0300 Subject: [PATCH 0065/1487] Add ruby no kai (ru) See commit 43953ac5333695192419a437f0aec184b90b08e5. --- ru/about/website/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ru/about/website/index.md b/ru/about/website/index.md index 791ab67965..b6d6e5da86 100644 --- a/ru/about/website/index.md +++ b/ru/about/website/index.md @@ -39,6 +39,7 @@ lang: ru * [GlobalSign][globalsign] (SSL сертификация), * [Fastly][fastly] (CDN). * [Hatena][hatena] ([mackerel][mackerel], мониторинг сервера) + * [Ruby no Kai][rubynokai] (сборка сервера) [logo]: /ru/about/logo/ @@ -55,3 +56,4 @@ lang: ru [fastly]: http://www.fastly.com [hatena]: http://hatenacorp.jp/ [mackerel]: https://mackerel.io/ +[rubynokai]: http://ruby-no-kai.org/ From 971c7e36c1b2c7c9c13c91039b90ae5a5101564b Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Sun, 21 Jun 2020 00:55:10 +0300 Subject: [PATCH 0066/1487] Small changes on about/website page (translations) See commit af8c9a220e61531e88937777ee73ad062cf7cdbd. --- bg/about/website/index.md | 13 +++++++------ de/about/website/index.md | 10 +++++----- it/about/website/index.md | 10 +++++----- ru/about/website/index.md | 10 +++++----- zh_tw/about/website/index.md | 10 +++++----- 5 files changed, 27 insertions(+), 26 deletions(-) diff --git a/bg/about/website/index.md b/bg/about/website/index.md index 49775b0d9b..47654cc958 100644 --- a/bg/about/website/index.md +++ b/bg/about/website/index.md @@ -34,15 +34,16 @@ lang: bg Благодарим и на организациите, които ни подкрепят: - * [NaCl][nacl] (хостинг), - * [Heroku][heroku] (хостинг), - * [IIJ][iij] (хостинг), - * [GlobalSign][globalsign] (SSL сертифициране), - * [Fastly][fastly] (CDN). - * [Hatena][hatena] ([mackerel][mackerel], Сървърен мониторинг) + * [NaCl][nacl] (хостинг) + * [Heroku][heroku] (хостинг) + * [IIJ][iij] (хостинг) + * [GlobalSign][globalsign] (SSL сертифициране) + * [Fastly][fastly] (CDN) + * [Hatena][hatena] ([mackerel][mackerel], сървърен мониторинг) * [CloudCore][cloudcore] (build сървър) * [Ruby no Kai][rubynokai] (build сървър) + [logo]: /bg/about/logo/ [webmaster]: mailto:webmaster@ruby-lang.org [jekyll]: http://www.jekyllrb.com/ diff --git a/de/about/website/index.md b/de/about/website/index.md index 03ff3fa07e..95443d4304 100644 --- a/de/about/website/index.md +++ b/de/about/website/index.md @@ -35,11 +35,11 @@ an dieser Website. Wir danken außerdem den Organisationen, die uns unterstützen: - * [NaCl][nacl] (Hosting), - * [Heroku][heroku] (Hosting), - * [IIJ][iij] (Hosting), - * [GlobalSign][globalsign] (SSL-Zertifizierung), - * [Fastly][fastly] (CDN). + * [NaCl][nacl] (Hosting) + * [Heroku][heroku] (Hosting) + * [IIJ][iij] (Hosting) + * [GlobalSign][globalsign] (SSL-Zertifizierung) + * [Fastly][fastly] (CDN) [logo]: /de/about/logo/ diff --git a/it/about/website/index.md b/it/about/website/index.md index b55f609093..2fd00d935b 100644 --- a/it/about/website/index.md +++ b/it/about/website/index.md @@ -34,11 +34,11 @@ questo sito web. Inoltre, ringraziamo le organizzazioni che ci supportano: - * [NaCl][nacl] (hosting), - * [Heroku][heroku] (hosting), - * [IIJ][iij] (hosting), - * [GlobalSign][globalsign] (certificati SSL), - * [Fastly][fastly] (CDN). + * [NaCl][nacl] (hosting) + * [Heroku][heroku] (hosting) + * [IIJ][iij] (hosting) + * [GlobalSign][globalsign] (certificati SSL) + * [Fastly][fastly] (CDN) [logo]: /it/about/logo/ diff --git a/ru/about/website/index.md b/ru/about/website/index.md index b6d6e5da86..ea6b23157b 100644 --- a/ru/about/website/index.md +++ b/ru/about/website/index.md @@ -33,11 +33,11 @@ lang: ru Также хотим выразить благодарность поддерживающим нас организациям: - * [NaCl][nacl] (хостинг), - * [Heroku][heroku] (хостинг), - * [IIJ][iij] (хостинг), - * [GlobalSign][globalsign] (SSL сертификация), - * [Fastly][fastly] (CDN). + * [NaCl][nacl] (хостинг) + * [Heroku][heroku] (хостинг) + * [IIJ][iij] (хостинг) + * [GlobalSign][globalsign] (SSL сертификация) + * [Fastly][fastly] (CDN) * [Hatena][hatena] ([mackerel][mackerel], мониторинг сервера) * [Ruby no Kai][rubynokai] (сборка сервера) diff --git a/zh_tw/about/website/index.md b/zh_tw/about/website/index.md index cb92c36843..909d0b465e 100644 --- a/zh_tw/about/website/index.md +++ b/zh_tw/about/website/index.md @@ -31,11 +31,11 @@ lang: zh_tw 此外感謝下列機構提供支持: - * [Ruby Association][rubyassociation] (網站托管)、 - * [Heroku][heroku] (網站托管)、 - * [IIJ][iij] (網站托管)、 - * [GlobalSign][globalsign] (SSL 證書)、 - * [Fastly][fastly] (CDN)。 + * [Ruby Association][rubyassociation] (網站托管) + * [Heroku][heroku] (網站托管) + * [IIJ][iij] (網站托管) + * [GlobalSign][globalsign] (SSL 證書) + * [Fastly][fastly] (CDN) [logo]: /zh_tw/about/logo/ From 4236975f7dd8b996e51ba57344319cf98423133d Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Sun, 21 Jun 2020 01:23:02 +0300 Subject: [PATCH 0067/1487] Change NaCl to Ruby Association (translations) See commit f3d6f03d780a80c22bc471c8af10b8b96d56d5bc. --- bg/about/website/index.md | 4 ++-- de/about/website/index.md | 4 ++-- id/about/website/index.md | 4 ++-- it/about/website/index.md | 4 ++-- ko/about/website/index.md | 4 ++-- ru/about/website/index.md | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bg/about/website/index.md b/bg/about/website/index.md index 47654cc958..493de40da7 100644 --- a/bg/about/website/index.md +++ b/bg/about/website/index.md @@ -34,7 +34,7 @@ lang: bg Благодарим и на организациите, които ни подкрепят: - * [NaCl][nacl] (хостинг) + * [Ruby Association][rubyassociation] (хостинг) * [Heroku][heroku] (хостинг) * [IIJ][iij] (хостинг) * [GlobalSign][globalsign] (SSL сертифициране) @@ -51,7 +51,7 @@ lang: bg [github-repo]: https://github.com/ruby/www.ruby-lang.org/ [github-issues]: https://github.com/ruby/www.ruby-lang.org/issues [github-wiki]: https://github.com/ruby/www.ruby-lang.org/wiki -[nacl]: http://www.netlab.jp +[rubyassociation]: http://www.ruby.or.jp [heroku]: https://www.heroku.com/ [iij]: http://www.iij.ad.jp [globalsign]: https://www.globalsign.com diff --git a/de/about/website/index.md b/de/about/website/index.md index 95443d4304..6b4088d080 100644 --- a/de/about/website/index.md +++ b/de/about/website/index.md @@ -35,7 +35,7 @@ an dieser Website. Wir danken außerdem den Organisationen, die uns unterstützen: - * [NaCl][nacl] (Hosting) + * [Ruby Association][rubyassociation] (Hosting) * [Heroku][heroku] (Hosting) * [IIJ][iij] (Hosting) * [GlobalSign][globalsign] (SSL-Zertifizierung) @@ -49,7 +49,7 @@ Wir danken außerdem den Organisationen, die uns unterstützen: [github-repo]: https://github.com/ruby/www.ruby-lang.org/ [github-issues]: https://github.com/ruby/www.ruby-lang.org/issues [github-wiki]: https://github.com/ruby/www.ruby-lang.org/wiki -[nacl]: http://www.netlab.jp +[rubyassociation]: http://www.ruby.or.jp [heroku]: https://www.heroku.com/ [iij]: http://www.iij.ad.jp [globalsign]: https://www.globalsign.com diff --git a/id/about/website/index.md b/id/about/website/index.md index 40c70bb89c..949867652b 100644 --- a/id/about/website/index.md +++ b/id/about/website/index.md @@ -34,7 +34,7 @@ situs ini. Terima kasih juga kepada organisasi-organisasi yang telah mendukung kami: - * [NaCl][nacl] (hosting) + * [Ruby Association][rubyassociation] (hosting) * [Heroku][heroku] (hosting) * [IIJ][iij] (hosting) * [GlobalSign][globalsign] (sertifikasi SSL) @@ -51,7 +51,7 @@ Terima kasih juga kepada organisasi-organisasi yang telah mendukung kami: [github-repo]: https://github.com/ruby/www.ruby-lang.org/ [github-issues]: https://github.com/ruby/www.ruby-lang.org/issues [github-wiki]: https://github.com/ruby/www.ruby-lang.org/wiki -[nacl]: http://www.netlab.jp +[rubyassociation]: http://www.ruby.or.jp [heroku]: https://www.heroku.com/ [iij]: http://www.iij.ad.jp [globalsign]: https://www.globalsign.com diff --git a/it/about/website/index.md b/it/about/website/index.md index 2fd00d935b..7dda162785 100644 --- a/it/about/website/index.md +++ b/it/about/website/index.md @@ -34,7 +34,7 @@ questo sito web. Inoltre, ringraziamo le organizzazioni che ci supportano: - * [NaCl][nacl] (hosting) + * [Ruby Association][rubyassociation] (hosting) * [Heroku][heroku] (hosting) * [IIJ][iij] (hosting) * [GlobalSign][globalsign] (certificati SSL) @@ -48,7 +48,7 @@ Inoltre, ringraziamo le organizzazioni che ci supportano: [github-repo]: https://github.com/ruby/www.ruby-lang.org/ [github-issues]: https://github.com/ruby/www.ruby-lang.org/issues [github-wiki]: https://github.com/ruby/www.ruby-lang.org/wiki -[nacl]: http://www.netlab.jp +[rubyassociation]: http://www.ruby.or.jp [heroku]: https://www.heroku.com/ [iij]: http://www.iij.ad.jp [globalsign]: https://www.globalsign.com diff --git a/ko/about/website/index.md b/ko/about/website/index.md index ada11010ee..4250da7125 100644 --- a/ko/about/website/index.md +++ b/ko/about/website/index.md @@ -36,7 +36,7 @@ lang: ko 지원해주신 단체들에게도 감사드립니다. - * [NaCl][nacl] (호스트) + * [Ruby Association][rubyassociation] (호스트) * [Heroku][heroku] (호스트) * [IIJ][iij] (호스트) * [GlobalSign][globalsign] (SSL 인증서) @@ -53,7 +53,7 @@ lang: ko [github-repo]: https://github.com/ruby/www.ruby-lang.org/ [github-issues]: https://github.com/ruby/www.ruby-lang.org/issues [github-wiki]: https://github.com/ruby/www.ruby-lang.org/wiki -[nacl]: http://www.netlab.jp +[rubyassociation]: http://www.ruby.or.jp [heroku]: https://www.heroku.com/ [iij]: http://www.iij.ad.jp [globalsign]: https://www.globalsign.com diff --git a/ru/about/website/index.md b/ru/about/website/index.md index ea6b23157b..56253fe495 100644 --- a/ru/about/website/index.md +++ b/ru/about/website/index.md @@ -33,7 +33,7 @@ lang: ru Также хотим выразить благодарность поддерживающим нас организациям: - * [NaCl][nacl] (хостинг) + * [Ruby Association][rubyassociation] (хостинг) * [Heroku][heroku] (хостинг) * [IIJ][iij] (хостинг) * [GlobalSign][globalsign] (SSL сертификация) @@ -49,7 +49,7 @@ lang: ru [github-repo]: https://github.com/ruby/www.ruby-lang.org/ [github-issues]: https://github.com/ruby/www.ruby-lang.org/issues [github-wiki]: https://github.com/ruby/www.ruby-lang.org/wiki -[nacl]: http://www.netlab.jp +[rubyassociation]: http://www.ruby.or.jp [heroku]: https://www.heroku.com/ [iij]: http://www.iij.ad.jp [globalsign]: https://www.globalsign.com From 3b1c4fc676c942852d6d83f84ee601dc660ec948 Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Sun, 21 Jun 2020 02:15:39 +0300 Subject: [PATCH 0068/1487] Update the latest sponsor list (translations) See PR #2455. --- bg/about/website/index.md | 10 +++------- de/about/website/index.md | 6 ++---- id/about/website/index.md | 10 +++------- it/about/website/index.md | 6 ++---- ja/about/website/index.md | 10 +++------- ko/about/website/index.md | 10 +++------- pt/about/website/index.md | 10 +++------- ru/about/website/index.md | 8 +++----- zh_cn/about/website/index.md | 10 +++------- zh_tw/about/website/index.md | 6 ++---- 10 files changed, 27 insertions(+), 59 deletions(-) diff --git a/bg/about/website/index.md b/bg/about/website/index.md index 493de40da7..77f36b931a 100644 --- a/bg/about/website/index.md +++ b/bg/about/website/index.md @@ -35,13 +35,11 @@ lang: bg Благодарим и на организациите, които ни подкрепят: * [Ruby Association][rubyassociation] (хостинг) + * [Ruby no Kai][rubynokai] (build сървър) + * [AWS][aws] (хостинг) * [Heroku][heroku] (хостинг) - * [IIJ][iij] (хостинг) - * [GlobalSign][globalsign] (SSL сертифициране) * [Fastly][fastly] (CDN) * [Hatena][hatena] ([mackerel][mackerel], сървърен мониторинг) - * [CloudCore][cloudcore] (build сървър) - * [Ruby no Kai][rubynokai] (build сървър) [logo]: /bg/about/logo/ @@ -53,10 +51,8 @@ lang: bg [github-wiki]: https://github.com/ruby/www.ruby-lang.org/wiki [rubyassociation]: http://www.ruby.or.jp [heroku]: https://www.heroku.com/ -[iij]: http://www.iij.ad.jp -[globalsign]: https://www.globalsign.com [fastly]: http://www.fastly.com [hatena]: http://hatenacorp.jp/ [mackerel]: https://mackerel.io/ -[cloudcore]: http://www.cloudcore.jp/ [rubynokai]: http://ruby-no-kai.org/ +[aws]: https://aws.amazon.com/ diff --git a/de/about/website/index.md b/de/about/website/index.md index 6b4088d080..87c92f65b8 100644 --- a/de/about/website/index.md +++ b/de/about/website/index.md @@ -36,9 +36,8 @@ an dieser Website. Wir danken außerdem den Organisationen, die uns unterstützen: * [Ruby Association][rubyassociation] (Hosting) + * [AWS][aws] (Hosting) * [Heroku][heroku] (Hosting) - * [IIJ][iij] (Hosting) - * [GlobalSign][globalsign] (SSL-Zertifizierung) * [Fastly][fastly] (CDN) @@ -51,6 +50,5 @@ Wir danken außerdem den Organisationen, die uns unterstützen: [github-wiki]: https://github.com/ruby/www.ruby-lang.org/wiki [rubyassociation]: http://www.ruby.or.jp [heroku]: https://www.heroku.com/ -[iij]: http://www.iij.ad.jp -[globalsign]: https://www.globalsign.com [fastly]: http://www.fastly.com +[aws]: https://aws.amazon.com/ diff --git a/id/about/website/index.md b/id/about/website/index.md index 949867652b..7c0b34743e 100644 --- a/id/about/website/index.md +++ b/id/about/website/index.md @@ -35,13 +35,11 @@ situs ini. Terima kasih juga kepada organisasi-organisasi yang telah mendukung kami: * [Ruby Association][rubyassociation] (hosting) + * [Ruby no Kai][rubynokai] (*build server*) + * [AWS][aws] (hosting) * [Heroku][heroku] (hosting) - * [IIJ][iij] (hosting) - * [GlobalSign][globalsign] (sertifikasi SSL) * [Fastly][fastly] (CDN) * [Hatena][hatena] ([mackerel][mackerel], pemantauan *server*) - * [CloudCore][cloudcore] (*build server*) - * [Ruby no Kai][rubynokai] (*build server*) [logo]: /id/about/logo/ @@ -53,10 +51,8 @@ Terima kasih juga kepada organisasi-organisasi yang telah mendukung kami: [github-wiki]: https://github.com/ruby/www.ruby-lang.org/wiki [rubyassociation]: http://www.ruby.or.jp [heroku]: https://www.heroku.com/ -[iij]: http://www.iij.ad.jp -[globalsign]: https://www.globalsign.com [fastly]: http://www.fastly.com [hatena]: http://hatenacorp.jp/ [mackerel]: https://mackerel.io/ -[cloudcore]: http://www.cloudcore.jp/?utm_source=ad&utm_medium=ad&utm_content=dev&utm_campaign=vps [rubynokai]: http://ruby-no-kai.org/ +[aws]: https://aws.amazon.com/ diff --git a/it/about/website/index.md b/it/about/website/index.md index 7dda162785..43229bf593 100644 --- a/it/about/website/index.md +++ b/it/about/website/index.md @@ -35,9 +35,8 @@ questo sito web. Inoltre, ringraziamo le organizzazioni che ci supportano: * [Ruby Association][rubyassociation] (hosting) + * [AWS][aws] (hosting) * [Heroku][heroku] (hosting) - * [IIJ][iij] (hosting) - * [GlobalSign][globalsign] (certificati SSL) * [Fastly][fastly] (CDN) @@ -50,6 +49,5 @@ Inoltre, ringraziamo le organizzazioni che ci supportano: [github-wiki]: https://github.com/ruby/www.ruby-lang.org/wiki [rubyassociation]: http://www.ruby.or.jp [heroku]: https://www.heroku.com/ -[iij]: http://www.iij.ad.jp -[globalsign]: https://www.globalsign.com [fastly]: http://www.fastly.com +[aws]: https://aws.amazon.com/ diff --git a/ja/about/website/index.md b/ja/about/website/index.md index d9e2fccad0..7c608fbfa5 100644 --- a/ja/about/website/index.md +++ b/ja/about/website/index.md @@ -34,13 +34,11 @@ Ruby Visual Identity Team による初期のデザインが元になっていま また、われわれをサポートしてくれる以下の機関にも大きな感謝をいたします: * [Rubyアソシエーション][rubyassociation] (ホスティング) + * [Ruby no Kai][rubynokai] (build server) + * [AWS][aws] (ホスティング) * [Heroku][heroku] (ホスティング) - * [IIJ][iij] (ホスティング) - * [GlobalSign][globalsign] (SSL 証明書) * [Fastly][fastly] (CDN) * [Hatena][hatena] ([mackerel][mackerel], サーバー監視) - * [CloudCore][cloudcore] (build server) - * [Ruby no Kai][rubynokai] (build server) [logo]: /ja/about/logo/ @@ -52,10 +50,8 @@ Ruby Visual Identity Team による初期のデザインが元になっていま [github-wiki]: https://github.com/ruby/www.ruby-lang.org/wiki [rubyassociation]: http://www.ruby.or.jp/ja/sponsors/list/ [heroku]: https://www.heroku.com/ -[iij]: http://www.iij.ad.jp -[globalsign]: https://www.globalsign.com [fastly]: http://www.fastly.com [hatena]: http://hatenacorp.jp/ [mackerel]: https://mackerel.io/ -[cloudcore]: http://www.cloudcore.jp/?utm_source=ad&utm_medium=ad&utm_content=dev&utm_campaign=vps [rubynokai]: http://ruby-no-kai.org/ +[aws]: https://aws.amazon.com/ diff --git a/ko/about/website/index.md b/ko/about/website/index.md index 4250da7125..825a646876 100644 --- a/ko/about/website/index.md +++ b/ko/about/website/index.md @@ -37,13 +37,11 @@ lang: ko 지원해주신 단체들에게도 감사드립니다. * [Ruby Association][rubyassociation] (호스트) + * [Ruby no Kai][rubynokai] (빌드 서버) + * [AWS][aws] (호스트) * [Heroku][heroku] (호스트) - * [IIJ][iij] (호스트) - * [GlobalSign][globalsign] (SSL 인증서) * [Fastly][fastly] (CDN) * [Hatena][hatena] ([mackerel][mackerel], 서버 모니터링) - * [CloudCore][cloudcore] (빌드 서버) - * [Ruby no Kai][rubynokai] (빌드 서버) [logo]: /ko/about/logo/ @@ -55,10 +53,8 @@ lang: ko [github-wiki]: https://github.com/ruby/www.ruby-lang.org/wiki [rubyassociation]: http://www.ruby.or.jp [heroku]: https://www.heroku.com/ -[iij]: http://www.iij.ad.jp -[globalsign]: https://www.globalsign.com [fastly]: http://www.fastly.com [hatena]: http://hatenacorp.jp/ [mackerel]: https://mackerel.io/ -[cloudcore]: http://www.cloudcore.jp/ [rubynokai]: http://ruby-no-kai.org/ +[aws]: https://aws.amazon.com/ diff --git a/pt/about/website/index.md b/pt/about/website/index.md index 92403213bd..004fe3b415 100644 --- a/pt/about/website/index.md +++ b/pt/about/website/index.md @@ -35,13 +35,11 @@ e outros colaboradores deste website. Também agradecemos a todas as organizações que nos dão suporte: * [Ruby Association][rubyassociation] (hospedagem) + * [Ruby no Kai][rubynokai] (servidor de build) + * [AWS][aws] (hospedagem) * [Heroku][heroku] (hospedagem) - * [IIJ][iij] (hospedagem) - * [GlobalSign][globalsign] (certificação SSL) * [Fastly][fastly] (CDN) * [Hatena][hatena] ([mackerel][mackerel], monitoramento do servidor) - * [CloudCore][cloudcore] (servidor de build) - * [Ruby no Kai][rubynokai] (servidor de build) [logo]: /pt/about/logo/ @@ -53,10 +51,8 @@ Também agradecemos a todas as organizações que nos dão suporte: [github-wiki]: https://github.com/ruby/www.ruby-lang.org/wiki [rubyassociation]: http://www.ruby.or.jp [heroku]: https://www.heroku.com/ -[iij]: http://www.iij.ad.jp -[globalsign]: https://www.globalsign.com [fastly]: http://www.fastly.com [hatena]: http://hatenacorp.jp/ [mackerel]: https://mackerel.io/ -[cloudcore]: http://www.cloudcore.jp/?utm_source=ad&utm_medium=ad&utm_content=dev&utm_campaign=vps [rubynokai]: http://ruby-no-kai.org/ +[aws]: https://aws.amazon.com/ diff --git a/ru/about/website/index.md b/ru/about/website/index.md index 56253fe495..b34a81356f 100644 --- a/ru/about/website/index.md +++ b/ru/about/website/index.md @@ -34,12 +34,11 @@ lang: ru Также хотим выразить благодарность поддерживающим нас организациям: * [Ruby Association][rubyassociation] (хостинг) + * [Ruby no Kai][rubynokai] (сборка сервера) + * [AWS][aws] (хостинг) * [Heroku][heroku] (хостинг) - * [IIJ][iij] (хостинг) - * [GlobalSign][globalsign] (SSL сертификация) * [Fastly][fastly] (CDN) * [Hatena][hatena] ([mackerel][mackerel], мониторинг сервера) - * [Ruby no Kai][rubynokai] (сборка сервера) [logo]: /ru/about/logo/ @@ -51,9 +50,8 @@ lang: ru [github-wiki]: https://github.com/ruby/www.ruby-lang.org/wiki [rubyassociation]: http://www.ruby.or.jp [heroku]: https://www.heroku.com/ -[iij]: http://www.iij.ad.jp -[globalsign]: https://www.globalsign.com [fastly]: http://www.fastly.com [hatena]: http://hatenacorp.jp/ [mackerel]: https://mackerel.io/ [rubynokai]: http://ruby-no-kai.org/ +[aws]: https://aws.amazon.com/ diff --git a/zh_cn/about/website/index.md b/zh_cn/about/website/index.md index 261dd26335..6bbc5471b5 100644 --- a/zh_cn/about/website/index.md +++ b/zh_cn/about/website/index.md @@ -30,13 +30,11 @@ lang: zh_cn 同时也感谢这些组织对我们的支持: * [Ruby Association][rubyassociation](托管) + * [Ruby no Kai][rubynokai](构建服务器) + * [AWS][aws](托管) * [Heroku][heroku](托管) - * [IIJ][iij](托管) - * [GlobalSign][globalsign](SSL 认证) * [Fastly][fastly](CDN) * [Hatena][hatena]([mackerel][mackerel],服务器监控) - * [CloudCore][cloudcore](构建服务器) - * [Ruby no Kai][rubynokai](构建服务器) [logo]: /zh_cn/about/logo/ @@ -48,10 +46,8 @@ lang: zh_cn [github-wiki]: https://github.com/ruby/www.ruby-lang.org/wiki [rubyassociation]: http://www.ruby.or.jp [heroku]: https://www.heroku.com/ -[iij]: http://www.iij.ad.jp -[globalsign]: https://www.globalsign.com [fastly]: http://www.fastly.com [hatena]: http://hatenacorp.jp/ [mackerel]: https://mackerel.io/ -[cloudcore]: http://www.cloudcore.jp/ [rubynokai]: http://ruby-no-kai.org/ +[aws]: https://aws.amazon.com/ diff --git a/zh_tw/about/website/index.md b/zh_tw/about/website/index.md index 909d0b465e..d72cc7c1fe 100644 --- a/zh_tw/about/website/index.md +++ b/zh_tw/about/website/index.md @@ -32,9 +32,8 @@ lang: zh_tw 此外感謝下列機構提供支持: * [Ruby Association][rubyassociation] (網站托管) + * [AWS][aws] (網站托管) * [Heroku][heroku] (網站托管) - * [IIJ][iij] (網站托管) - * [GlobalSign][globalsign] (SSL 證書) * [Fastly][fastly] (CDN) @@ -47,6 +46,5 @@ lang: zh_tw [github-wiki]: https://github.com/ruby/www.ruby-lang.org/wiki [rubyassociation]: http://www.ruby.or.jp [heroku]: https://www.heroku.com/ -[iij]: http://www.iij.ad.jp -[globalsign]: https://www.globalsign.com [fastly]: http://www.fastly.com +[aws]: https://aws.amazon.com/ From a6b501d06610351de28a646d5e9a8edba20ff07c Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Mon, 22 Jun 2020 01:34:07 +0300 Subject: [PATCH 0069/1487] Update the TOC on Ruby Core page --- en/community/ruby-core/index.md | 3 ++- id/community/ruby-core/index.md | 3 ++- ko/community/ruby-core/index.md | 3 ++- tr/community/ruby-core/index.md | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/en/community/ruby-core/index.md b/en/community/ruby-core/index.md index 9e9486af5e..5a510fbe5a 100644 --- a/en/community/ruby-core/index.md +++ b/en/community/ruby-core/index.md @@ -14,7 +14,7 @@ The topics related to Ruby development covered here are: * [Using Git to Track Ruby Development](#following-ruby) * [Improving Ruby, Patch by Patch](#patching-ruby) -* [Rules for Core Developers](#coding-standards) +* [Note about branches](#branches-ruby) ### Using Git to Track Ruby Development {: #following-ruby} @@ -103,6 +103,7 @@ resolved, be persistent—give it another shot a few days later. ### Note about branches +{: #branches-ruby} The source code of Ruby had been managed under Subversion repository until 22nd April 2019. Thus, some branches may still be managed under Subversion. diff --git a/id/community/ruby-core/index.md b/id/community/ruby-core/index.md index 2f343b7dbf..fa691c3ba0 100644 --- a/id/community/ruby-core/index.md +++ b/id/community/ruby-core/index.md @@ -14,7 +14,7 @@ Topik seputar pengembangan Ruby yang dibahas disini adalah: * [Menggunakan Git untuk Memonitor Pengembangan Ruby](#following-ruby) * [Menyempurnakan Ruby, Patch by Patch](#patching-ruby) -* [Peraturan untuk Core Developer](#coding-standards) +* [Catatan terkait branches](#branches-ruby) ### Menggunakan Git untuk Memonitor Pengembangan Ruby {: #following-ruby} @@ -103,6 +103,7 @@ hari kemudian. ### Catatan terkait branches +{: #branches-ruby} Kode sumber Ruby telah dikelola menggunakan repositori Subversion hingga 22 April 2019. diff --git a/ko/community/ruby-core/index.md b/ko/community/ruby-core/index.md index 551bf978a2..275f9a08a5 100644 --- a/ko/community/ruby-core/index.md +++ b/ko/community/ruby-core/index.md @@ -13,7 +13,7 @@ lang: ko * [Git을 사용하여 루비 개발을 트래킹하기](#following-ruby) * [패치들로 루비 개선하기](#patching-ruby) -* [코어 개발자를 위한 룰](#coding-standards) +* [브랜치에 대한 안내](#branches-ruby) ### Git을 사용하여 루비 개발을 트래킹하기 {: #following-ruby} @@ -93,6 +93,7 @@ $ git clone git@git.ruby-lang.org:ruby.git 않았을 경우에도 인내심을 가지고 며칠 후에 다시 시도해주시길 바랍니다. ### 브랜치에 대한 안내 +{: #branches-ruby} 루비의 소스 코드는 2019년 4월 22일까지 서브버전에서 관리되어 왔습니다. 그러므로 몇몇 버전은 그대로 서브버전에서 관리됩니다. diff --git a/tr/community/ruby-core/index.md b/tr/community/ruby-core/index.md index 2cab4de0e1..4545100f54 100644 --- a/tr/community/ruby-core/index.md +++ b/tr/community/ruby-core/index.md @@ -14,7 +14,7 @@ Ruby'nin geliştirilmesi ile ilgili burada kapsanan konular şunlardır: * [Ruby'nin Geliştirilmesini Git Kullanarak Takip Etmek](#following-ruby) * [Yamalar ile Ruby'yi İyileştirmek](#patching-ruby) -* [Çekirdek Geliştiricileri için Kurallar](#coding-standards) +* [Dallar hakkında bir not](#branches-ruby) ### Ruby'nin Geliştirilmesini Git Kullanarak Takip Etmek {: #following-ruby} @@ -105,6 +105,7 @@ dürtmeyi deneyin. ### Dallar hakkında bir not +{: #branches-ruby} Ruby'nin kaynak kodu 22 Nisan 2019'a kadar Subversion deposunda yönetiliyordu. Bu sebeple bazı dallar hala Subversion altında yönetiliyor olabilir. From 3e089f388cdb4068fc68bed23a1878fde986d8d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Jun 2020 17:29:22 +0000 Subject: [PATCH 0070/1487] Bump rack from 2.0.8 to 2.2.3 Bumps [rack](https://github.com/rack/rack) from 2.0.8 to 2.2.3. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/2.0.8...2.2.3) Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 229e350781..88fda76081 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -56,7 +56,7 @@ GEM pathutil (0.16.2) forwardable-extended (~> 2.6) public_suffix (4.0.1) - rack (2.0.8) + rack (2.2.3) rack-protection (2.0.7) rack rack-rewrite (1.5.1) From 27f06e68382584c0ebbdaa7b41e46b86d5a20064 Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Sun, 5 Jul 2020 17:10:44 +0700 Subject: [PATCH 0071/1487] Translate CVE-2020-10933: Heap exposure vulnerability in the socket library (id) --- ...-heap-exposure-in-socket-cve-2020-10933.md | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 id/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md diff --git a/id/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md b/id/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md new file mode 100644 index 0000000000..cb5741c987 --- /dev/null +++ b/id/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md @@ -0,0 +1,40 @@ +--- +layout: news_post +title: "CVE-2020-10933: Kerentanan tereksposnya heap pada pustaka socket" +author: "mame" +translator: "meisyal" +date: 2020-03-31 12:00:00 +0000 +tags: security +lang: id +--- + +Sebuah kerentanan tereksposnya *heap* telah ditemukan pada pustaka *socket*. +Kerentanan ini telah ditetapkan dengan penanda CVE [CVE-2020-10933](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10933). +Kami sangat menyarankan untuk memperbarui Ruby. + +## Detail + +Ketika `BasicSocket#recv_nonblock` dan `BasicSocket#read_nonblock` dipanggil +dengan argumen *size* dan *buffer*, kedua fungsi tersebut semula mengubah +ukuran *buffer* ke ukuran tertentu. Pada beberapa kasus di mana operasi ini +mengeblok, operasi mengembalikan nilai tanpa menyalin data apapun. Sehingga, +*buffer string* sekarang akan berisi data apapun dari *heap*. Hal ini akan +mengekspos data sensitif yang ada di dalam *interpreter*. + +Masalah ini hanya terjadi di Linux. Isu terjadi sejak Ruby 2.5; rangkaian +Ruby 2.4 tidak rentan. + +## Versi terimbas + +* Rangkaian Ruby 2.5: 2.5.7 dan sebelumnya +* Rangkaian Ruby 2.6: 2.6.5 dan sebelumnya +* Rangkaian Ruby 2.7: 2.7.0 +* sebelum revisi *master* 61b7f86248bd121be2e83768be71ef289e8e5b90 + +## Rujukan + +Terima kasih kepada Samuel Williams yang telah menemukan masalah ini. + +## Riwayat + +* Semula dipublikasikan pada 2020-03-31 12:00:00 (UTC) From a0d98730438a254ac8ea3e896272f39504c8e276 Mon Sep 17 00:00:00 2001 From: digitalfukuoka Date: Thu, 16 Jul 2020 13:31:47 +0900 Subject: [PATCH 0072/1487] Add `Fukuoka Ruby Award 2021`. --- .../2020-07-16-fukuoka-ruby-award-2021.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 en/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md diff --git a/en/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md b/en/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md new file mode 100644 index 0000000000..9570b694ba --- /dev/null +++ b/en/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md @@ -0,0 +1,32 @@ +--- +layout: news_post +title: "2021 Fukuoka Ruby Award Competition - Entries to be judged by Matz" +author: "Fukuoka Ruby" +translator: +date: 2020-07-16 00:00:00 +0000 +lang: en +--- + +Dear Ruby Enthusiasts, + +The Government of Fukuoka, Japan together with "Matz" Matsumoto would like to invite you to enter the following Ruby competition.If you have developed an interesting Ruby program, please be encouraged to apply. + +2021 Fukuoka Ruby Award Competition - Grand Prize - 1 Million Yen! + +Entry Deadline: December 4, 2020 + +![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) + +Matz and a group of panelists will select the winners of the Fukuoka Competition. The grand prize for the Fukuoka Competition is 1 million yen. Past grand prize winners include Rhomobile (USA) and APEC Climate Center (Korea). + +Programs entered in the competition do not have to be written entirely in Ruby but should take advantage of the unique characteristics of Ruby. + +The program must have been developed or updated in the past year or so. Please visit the following Fukuoka website to enter. + +[http://www.digitalfukuoka.jp/events/226](http://www.digitalfukuoka.jp/events/226) + +Please email the application form to award@f-ruby.com + +"Matz will be testing and reviewing your source code thoroughly, so it's very meaningful to apply! The competition is free to enter." + + Thanks! From ed33a3211fef287331bbd24339ebfeda73be2bef Mon Sep 17 00:00:00 2001 From: asfarley Date: Thu, 16 Jul 2020 18:13:17 -0600 Subject: [PATCH 0073/1487] Remove broken links for mirrors. --- en/downloads/mirrors/index.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/en/downloads/mirrors/index.md b/en/downloads/mirrors/index.md index 4f5fca73fc..612b3e2f75 100644 --- a/en/downloads/mirrors/index.md +++ b/en/downloads/mirrors/index.md @@ -19,12 +19,8 @@ Please try to use a mirror that is near you. * [shibaura-it.ac.jp][mirror-http-jp-ring-shibaura-it] * [u-toyama.ac.jp][mirror-http-jp-ring-u-toyama] * [airnet.ne.jp][mirror-http-jp-ring-airnet] - * [maffin.ad.jp][mirror-http-jp-ring-maffin] -* [Germany][mirror-http-de] (AmbiWeb GmbH) * [Holland][mirror-http-nl] (XS4ALL) - only release packages -* [Austria][mirror-http-at] (tuwien.ac.at) * [France][mirror-http-fr] (cyberbits.eu) -* [China 1][mirror-http-cn1] (ruby.taobao.org) * [China 2][mirror-http-cn2] (Ruby China) * [South Korea][mirror-http-kr] (Korea FreeBSD Users Group) @@ -34,12 +30,10 @@ Please try to use a mirror that is near you. * [shibaura-it.ac.jp][mirror-ftp-jp-ring-shibaura-it] * [u-toyama.ac.jp][mirror-ftp-jp-ring-u-toyama] * [airnet.ne.jp][mirror-ftp-jp-ring-airnet] - * [maffin.ad.jp][mirror-ftp-jp-ring-maffin] * [Japan 3][mirror-ftp-jp3] (IIJ) * [South Korea][mirror-ftp-kr] (Korea FreeBSD Users Group) * [Germany][mirror-ftp-de] (FU Berlin) * [Greece][mirror-ftp-gr] (ntua.gr) -* [Austria][mirror-ftp-at] (tuwien.ac.at) ### Mirror sites via rsync @@ -50,12 +44,8 @@ Please try to use a mirror that is near you. [mirror-http-jp-ring-shibaura-it]: http://ring.shibaura-it.ac.jp/archives/lang/ruby/ [mirror-http-jp-ring-u-toyama]: http://ring.u-toyama.ac.jp/archives/lang/ruby/ [mirror-http-jp-ring-airnet]: http://ring.airnet.ne.jp/archives/lang/ruby/ -[mirror-http-jp-ring-maffin]: http://ring.maffin.ad.jp/archives/lang/ruby/ -[mirror-http-de]: http://dl.ambiweb.de/mirrors/ftp.ruby-lang.org/ [mirror-http-nl]: http://www.xs4all.nl/~hipster/lib/mirror/ruby/ -[mirror-http-at]: http://gd.tuwien.ac.at/languages/ruby/ [mirror-http-fr]: https://mirror.cyberbits.eu/ruby/ -[mirror-http-cn1]: https://ruby.taobao.org/mirrors/ruby/ [mirror-http-cn2]: https://cache.ruby-china.com/pub/ruby/ [mirror-http-kr]: http://ftp.kr.freebsd.org/pub/ruby/ [mirror-ftp-jp-ring-shibaura-it]: ftp://ring.shibaura-it.ac.jp/pub/lang/ruby/ @@ -66,6 +56,5 @@ Please try to use a mirror that is near you. [mirror-ftp-kr]: ftp://ftp.kr.freebsd.org/pub/ruby/ [mirror-ftp-de]: ftp://ftp.fu-berlin.de/unix/languages/ruby/ [mirror-ftp-gr]: ftp://ftp.ntua.gr/pub/lang/ruby/ -[mirror-ftp-at]: ftp://gd.tuwien.ac.at/languages/ruby/ [mirror-rsync-fr]: rsync://rsync.cyberbits.eu/ruby/ [mirror-rsync-kr]: rsync://rsync.kr.freebsd.org/ruby/ From ed1a6e5cfaa59b74b4574376a738e1f39346cb9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marvin=20G=C3=BClker?= Date: Sat, 18 Jul 2020 15:28:59 +0200 Subject: [PATCH 0074/1487] Translate JSON vulnerability post (de) --- .../2020-03-19-json-dos-cve-2020-10663.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 de/news/_posts/2020-03-19-json-dos-cve-2020-10663.md diff --git a/de/news/_posts/2020-03-19-json-dos-cve-2020-10663.md b/de/news/_posts/2020-03-19-json-dos-cve-2020-10663.md new file mode 100644 index 0000000000..d7a6ec43e0 --- /dev/null +++ b/de/news/_posts/2020-03-19-json-dos-cve-2020-10663.md @@ -0,0 +1,33 @@ +--- +layout: news_post +title: "CVE-2020-10663: Sicherheitslücke bei der Objekterstellung in JSON (weiterer Fehler behoben)" +author: "mame" +translator: "Marvin Gülker" +date: 2020-03-19 13:00:00 +0000 +tags: security +lang: de +--- + +Es gibt eine Sicherheitslücke im mit Ruby mitgelieferten json-Gem, die bei der Erstellung neuer Objekte auftritt. Dieser Sicherheitslücke wurde die CVE-Nummer [CVE-2020-10663](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10663) zugewiesen. Wir empfehlen dringend, das json-Gem zu aktualisieren. + +## Details + +Beim Parsen gewisser JSON-Dokumente kann das `json`-Gem (auch das mit Ruby mitgelieferte) dazu gebracht werden, beliebige Objekte in ein Zielsystem einzuschleusen. + +Hierbei handelt es sich um dasselbe Problem wie in [CVE-2013-0269](https://www.ruby-lang.org/de/news/2013/02/22/json-dos-cve-2013-0269/). Damals wurde der Fehler nicht vollständig behoben, da nur `JSON.parse(user_input)` korrigiert wurde, aber nicht auch einige andere Methoden, JSON zu parsen, darunter `JSON(user_input)` und `JSON.parse(user_input, nil)`. + +Siehe [CVE-2013-0269](https://www.ruby-lang.org/de/news/2013/02/22/json-dos-cve-2013-0269/) für Details. Bitte beachten Sie, dass dieses Problem ursprünglich ausgenutzt werden konnte, um einen Denial-of-Service-Angriff durchzuführen, indem man eine große Zahl von Symbol-Objekten erzeugte. Diese Art von Angriff ist nicht mehr möglich, weil Symbol-Objekte mittlerweile durch den Garbage Collector entsorgt werden können. Dennoch kann die Erstellung beliebiger Objekte abhängig vom jeweiligen Programmcode zu erheblichen Sicherheitsproblemen führen. + +Bitte aktualisieren Sie das json-Gem auf Version 2.3.0 oder neuer, was durch Ausführen des Befehls `gem update json` möglich ist. Wenn Sie Bundler einsetzen, fügen Sie die Zeile `gem "json", ">= 2.3.0"` zu Ihrer `Gemfile` hinzu. + +## Betroffene Versionen + +* JSON-Gem 2.2.0 und früher + +## Danksagung + +Wir danken Jeremy Evans für die Entdeckung des Problems. + +## Historie + +* Erstmals veröffentlicht: 2020-03-19 13:00:00 (UTC) From 37a42f028bf1c009f6172a6ef6634eddc2c50bea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marvin=20G=C3=BClker?= Date: Sat, 18 Jul 2020 15:29:13 +0200 Subject: [PATCH 0075/1487] Translate Heap Exposure post (de) --- ...-heap-exposure-in-socket-cve-2020-10933.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 de/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md diff --git a/de/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md b/de/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md new file mode 100644 index 0000000000..585bab58a0 --- /dev/null +++ b/de/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md @@ -0,0 +1,33 @@ +--- +layout: news_post +title: "CVE-2020-10933: Heap kann durch Sicherheitslücke in Socket-Bibliothek ausgelesen werden" +author: "mame" +translator: "Marvin Gülker" +date: 2020-03-31 12:00:00 +0000 +tags: security +lang: de +--- + +In der Socket-Bibliothek wurde eine Sicherheitslücke entdeckt, die es +ermöglicht, den Heap auszulesen. Dieser Sicherheitslücke wurde die CVE-Nummer [CVE-2020-10933](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10933) zugewiesen. Wir raten dringend dazu, Ruby zu aktualisieren. + +## Details + +Wenn `BasicSocket#recv_nonblock` und `BasicSocket#read_nonblock` mit Argumenten zu Größe und Puffer aufgerufen werden, so verändern sie zunächst die Größe des Puffers auf die verlangte Anzahl Bytes. In Fällen, in denen die nachfolgende eigentliche Leseoperation blocken würde, wird die Ausführung ohne Rückgabe von Daten abgebrochen. Das führt dazu, dass der Puffer nun beliebige Daten aus dem Heap enthält. Dadurch können potentiell sensible Daten des Interpreters ausgelesen werden. + +Die Sicherheitslücke kann nur unter Linux ausgenutzt werden und findet sich in den Ruby-Versionen seit 2.5.0. Die 2.4er-Serie ist nicht betroffen. + +## Betroffene Versionen + +* Ruby 2.5er-Serie: 2.5.7 und früher +* Ruby 2.6er-Serie: 2.6.5 und früher +* Ruby 2.7er-Serie: 2.7.0 +* Master vor Revision 61b7f86248bd121be2e83768be71ef289e8e5b90 + +## Danksagung + +Wir danken Samuel Williams für die Entdeckung des Problems. + +## Historie + +* Erstveröffentlichung am 2020-03-31 12:00:00 (UTC) From 5e9974fae54bc074f38470832d7d0a4333681da8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marvin=20G=C3=BClker?= Date: Sat, 18 Jul 2020 15:29:35 +0200 Subject: [PATCH 0076/1487] Translate Ruby release posts (de) --- .../_posts/2020-03-31-ruby-2-4-10-released.md | 52 ++++++++++++++++++ .../_posts/2020-03-31-ruby-2-5-8-released.md | 53 +++++++++++++++++++ .../_posts/2020-03-31-ruby-2-6-6-released.md | 53 +++++++++++++++++++ .../_posts/2020-03-31-ruby-2-7-1-released.md | 53 +++++++++++++++++++ 4 files changed, 211 insertions(+) create mode 100644 de/news/_posts/2020-03-31-ruby-2-4-10-released.md create mode 100644 de/news/_posts/2020-03-31-ruby-2-5-8-released.md create mode 100644 de/news/_posts/2020-03-31-ruby-2-6-6-released.md create mode 100644 de/news/_posts/2020-03-31-ruby-2-7-1-released.md diff --git a/de/news/_posts/2020-03-31-ruby-2-4-10-released.md b/de/news/_posts/2020-03-31-ruby-2-4-10-released.md new file mode 100644 index 0000000000..ae6f640f6e --- /dev/null +++ b/de/news/_posts/2020-03-31-ruby-2-4-10-released.md @@ -0,0 +1,52 @@ +--- +layout: news_post +title: "Ruby 2.4.10 veröffentlicht" +author: "usa" +translator: "Marvin Gülker" +date: 2020-03-31 12:00:00 +0000 +lang: de +--- + +Ruby 2.4.10 ist veröffentlicht worden. + +Diese Version behebt ein Sicherheitsproblem. Bitte lesen Sie die nachfolgenden Informationen für Details: + +* [CVE-2020-10663: Sicherheitslücke bei der Objekterstellung in JSON (weiterer Fehler behoben)]({% link de/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) + +Ruby 2.4 befindet sich noch bis Ende März 2020 in der Phase der Sicherheitsaktualisierungen. Mit Ablauf dieses Datums wird die Unterstützung von Ruby 2.4 eingestellt. Bei dieser Version handelt es sich daher um die letzte der 2.4er-Serie von Ruby. Wir empfehlen Ihnen, so schnell wie möglich auf eine neuere Ruby-Version wie 2.7, 2.6 oder 2.5 zu aktualisieren. + +## Download + +{% assign release = site.data.releases | where: "version", "2.4.10" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Veröffentlichungskommentar + +Dank an alle, die mit dieser Veröffentlichung geholfen haben, besonders an die Entdecker der Sicherheitslücke. diff --git a/de/news/_posts/2020-03-31-ruby-2-5-8-released.md b/de/news/_posts/2020-03-31-ruby-2-5-8-released.md new file mode 100644 index 0000000000..a797002b70 --- /dev/null +++ b/de/news/_posts/2020-03-31-ruby-2-5-8-released.md @@ -0,0 +1,53 @@ +--- +layout: news_post +title: "Ruby 2.5.8 veröffentlicht" +author: "usa" +translator: "Marvin Gülker" +date: 2020-03-31 12:00:00 +0000 +lang: de +--- + +Ruby 2.5.8 ist veröffentlicht worden. + +Diese Version behebt einige Sicherheitslücken. Siehe die folgenden Links für Details. + +* [CVE-2020-10663: Sicherheitslücke bei der Objekterstellung in JSON (weiterer Fehler behoben)]({% link de/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10933: Heap kann durch Sicherheitslücke in Socket-Bibliothek ausgelesen werden]({% link de/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) + +Siehe die [Commit-Logs](https://github.com/ruby/ruby/compare/v2_5_7...v2_5_8) für weitere Informationen. + +## Download + +{% assign release = site.data.releases | where: "version", "2.5.8" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Veröffentlichungskommentar + +Dank an alle, die mit dieser Veröffentlichung geholfen haben, besonders an die Entdecker der Sicherheitslücken. diff --git a/de/news/_posts/2020-03-31-ruby-2-6-6-released.md b/de/news/_posts/2020-03-31-ruby-2-6-6-released.md new file mode 100644 index 0000000000..3e581d7a7b --- /dev/null +++ b/de/news/_posts/2020-03-31-ruby-2-6-6-released.md @@ -0,0 +1,53 @@ +--- +layout: news_post +title: "Ruby 2.6.6 veröffentlicht" +author: "nagachika" +translator: "Marvin Gülker" +date: 2020-03-31 12:00:00 +0000 +lang: de +--- + +Ruby 2.6.6 ist veröffentlicht worden. + +Diese Version behebt einige Sicherheitslücken. Siehe die folgenden Links für Details. + +* [CVE-2020-10663: Sicherheitslücke bei der Objekterstellung in JSON (weiterer Fehler behoben)]({% link de/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10933: Heap kann durch Sicherheitslücke in Socket-Bibliothek ausgelesen werden]({% link de/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) + +Siehe die [Commit-Logs](https://github.com/ruby/ruby/compare/v2_6_5...v2_6_6) für weitere Informationen. + +## Download + +{% assign release = site.data.releases | where: "version", "2.6.6" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Veröffentlichungskommentar + +Viele Beitragende, Entwickler und Nutzer, die Fehler meldeten, haben uns mit dieser Veröffentlichung geholfen. Danke für ihre Beiträge. diff --git a/de/news/_posts/2020-03-31-ruby-2-7-1-released.md b/de/news/_posts/2020-03-31-ruby-2-7-1-released.md new file mode 100644 index 0000000000..d8ea6f70ba --- /dev/null +++ b/de/news/_posts/2020-03-31-ruby-2-7-1-released.md @@ -0,0 +1,53 @@ +--- +layout: news_post +title: "Ruby 2.7.1 veröffentlicht" +author: "naruse" +translator: "Marvin Gülker" +date: 2020-03-31 12:00:00 +0000 +lang: de +--- + +Ruby 2.7.1 ist veröffentlicht worden. + +Diese Version behebt einige Sicherheitslücken. Siehe die folgenden Links für Details. + +* [CVE-2020-10663: Sicherheitslücke bei der Objekterstellung in JSON (weiterer Fehler behoben)]({% link de/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10933: Heap kann durch Sicherheitslücke in Socket-Bibliothek ausgelesen werden]({% link de/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) + +Siehe die [Commit-Logs](https://github.com/ruby/ruby/compare/v2_7_0...v2_7_1) für weitere Informationen. + +## Download + +{% assign release = site.data.releases | where: "version", "2.7.1" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Veröffentlichungskommentar + +Viele Beitragende, Entwickler und Nutzer, die Fehler meldeten, haben uns mit dieser Veröffentlichung geholfen. Danke für ihre Beiträge. From 42d53a940432e372f28743374a53b8c8a4989613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marvin=20G=C3=BClker?= Date: Sat, 18 Jul 2020 15:29:46 +0200 Subject: [PATCH 0077/1487] Translate 2.4 EOL post --- ...020-04-05-support-of-ruby-2-4-has-ended.md | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 de/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md diff --git a/de/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md b/de/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md new file mode 100644 index 0000000000..faa9c42fca --- /dev/null +++ b/de/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md @@ -0,0 +1,50 @@ +--- +layout: news_post +title: "Unterstützung für Ruby 2.4 beendet" +author: "usa" +translator: "Marvin Gülker" +date: 2020-04-05 12:00:00 +0000 +lang: de +--- + +Wir kündigen die Unterstützung für Rubys 2.4er-Serie ab. + +Seit Ende März letzten Jahres befand sich die Unterstützung von Rubys +2.4er-Serie in der Phase der Sicherheitsunterstützung. Nun, ein Jahr +später, ist diese Phase ausgelaufen. Daher wurde am 31. März 2020 +jegliche Unterstützung für Rubys 2.4er-Serie eingestellt. Es werden +daher weder Korrekturen für Sicherheitsprobleme noch für sonstige +Fehler aus neueren Ruby-Versionen nach Ruby 2.4 zurückportiert und es +wird für diese Version auch keine neuen Patch-Veröffentlichungen mehr +geben. Zwar haben wir am 31. März 2020 noch Ruby 2.4.10 +veröffentlicht, doch diente das nur dazu, Nutzern ein wenig Zeit für +die Aktualisierung auf neuere Versionen zu verschaffen. Wir empfehlen +Ihnen dringend, so schnell wie möglich auf neuere Ruby-Versionen zu +aktualisieren. + +## Über die aktuell unterstützten Ruby-Versionen + +### Ruby 2.7er-Serie + +Derzeit in der normalen Unterstützungsphase. +Wir portieren Fehlerkorrekturen zurück und veröffentlichen neue +Versionen mit den Fehlerkorrekturen wann immer nötig. Wenn eine +kritische Sicherheitslücke gefunden wird, beheben wir das Problem so +schnell wie möglich und veröffentlichen eine neue Version. + +### Ruby 2.6er-Serie + +Derzeit in der normalen Unterstützungsphase. +Wir portieren Fehlerkorrekturen zurück und veröffentlichen neue +Versionen mit den Fehlerkorrekturen wann immer nötig. Wenn eine +kritische Sicherheitslücke gefunden wird, beheben wir das Problem so +schnell wie möglich und veröffentlichen eine neue Version. + +### Ruby 2.5er-Serie + +Derzeit in der Phase der Sicherheitsunterstützung. +Wir portieren Korrekturen für Sicherheitsprobleme auf 2.5 zurück, aber +keine sonstigen Fehlerkorrekturen. Wenn eine +kritische Sicherheitslücke gefunden wird, beheben wir das Problem so +schnell wie möglich und veröffentlichen eine neue Version. +Wir planen, die Unterstützung für Rubys 2.5er-Serie Ende März 2021 einzustellen. From b8eaca0858f9105cebac4639dd1a19ebe33b1aa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marvin=20G=C3=BClker?= Date: Sat, 18 Jul 2020 15:29:54 +0200 Subject: [PATCH 0078/1487] Translate Fukuoka Award 2021 post (de) --- .../2020-07-16-fukuoka-ruby-award-2021.md | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 de/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md diff --git a/de/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md b/de/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md new file mode 100644 index 0000000000..e6ea061f05 --- /dev/null +++ b/de/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md @@ -0,0 +1,44 @@ +--- +layout: news_post +title: "Fukuoka Ruby Award 2021 — Einsendungen werden von Matz bewertet" +author: "Fukuoka Ruby" +translator: "Marvin Gülker" +date: 2020-07-16 00:00:00 +0000 +lang: de +--- + +An die Ruby-Enthusiasten: + +Die Regionalregierung von Fukuoka (Japan) und „Matz“ Matsumoto laden +Sie zur Teilnahme an dem nachfolgend geschilderten Ruby-Wettbewerb +ein. Wenn Sie ein interessantes Ruby-Programm entwickelt haben, seien +Sie mutig und reichen Sie es ein. + +Fukuoka Ruby Award 2021 — Großer Preis — 1 Million Yen! + +Einsendeschluss: 4. Dezember 2020 + +![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) + +Matz und eine Gruppe Juroren werden die Preisträger gemeinsam +auswählen; der Große Preis ist mit einer Million Yen (ca. 8.100 €) +dotiert. Frühere Preisträger waren unter anderem Rhomobile (USA) und +das APEC Climate Center (Korea). + +Die zum Wettbwerb eingereichten Programme müssen nicht gänzlich in Ruby +geschrieben sein, sollten aber Gebrauch von Rubys einzigartigen +Charakteristika machen. + +Um in Frage zu kommen, muss das eingereichte Programm allerdings +ungefähr während des letzten Jahres fertiggestellt oder aktualisiert +worden sein. Wenn Sie ein Programm einreichen wollen, lesen Sie +bitte die folgende Fukuoka-Webseite: + +[http://www.digitalfukuoka.jp/events/226](http://www.digitalfukuoka.jp/events/226) + +Richten Sie Ihre Bewerbung an award@f-ruby.com. + +„Matz wird Ihren Quellcode intensiv testen und prüfen, daher ist eine Teilnahme +sehr sinnvoll! Der Wettbewerb ist kostenlos.“ + +Danke! From 1cb72846ab457fcbccf8d0630477b4849fb72c30 Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Thu, 23 Jul 2020 14:27:12 +0300 Subject: [PATCH 0079/1487] Various corrections (en, es, id, ru, vi) --- en/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md | 2 +- es/about/index.md | 9 +++++++++ es/examples/i_love_ruby.md | 2 +- id/examples/i_love_ruby.md | 2 +- ru/downloads/index.md | 2 +- ru/news/_posts/2013-11-21-fukuoka-ruby-award-2014.md | 2 +- ru/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md | 2 +- ru/news/_posts/2020-03-19-json-dos-cve-2020-10663.md | 4 ++-- vi/examples/i_love_ruby.md | 2 +- 9 files changed, 18 insertions(+), 9 deletions(-) diff --git a/en/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md b/en/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md index 9570b694ba..0083c8ed44 100644 --- a/en/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md +++ b/en/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md @@ -9,7 +9,7 @@ lang: en Dear Ruby Enthusiasts, -The Government of Fukuoka, Japan together with "Matz" Matsumoto would like to invite you to enter the following Ruby competition.If you have developed an interesting Ruby program, please be encouraged to apply. +The Government of Fukuoka, Japan together with "Matz" Matsumoto would like to invite you to enter the following Ruby competition. If you have developed an interesting Ruby program, please be encouraged to apply. 2021 Fukuoka Ruby Award Competition - Grand Prize - 1 Million Yen! diff --git a/es/about/index.md b/es/about/index.md index 68407400f8..0eced7ddc0 100644 --- a/es/about/index.md +++ b/es/about/index.md @@ -229,3 +229,12 @@ del 2003. [linuxdevcenter]: http://www.linuxdevcenter.com/pub/a/linux/2001/11/29/ruby.html [artima]: http://www.artima.com/intv/closures2.html [tiobe]: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html +[jruby]: http://jruby.org +[rubinius]: http://rubini.us +[truffleruby]: https://github.com/oracle/truffleruby +[mruby]: http://www.mruby.org/ +[ironruby]: http://www.ironruby.net +[maglev]: http://maglev.github.io +[cardinal]: https://github.com/parrot/cardinal +[parrot]: http://parrot.org +[awesome-rubies]: https://github.com/planetruby/awesome-rubies diff --git a/es/examples/i_love_ruby.md b/es/examples/i_love_ruby.md index ae6de9db48..7b1f69e04b 100644 --- a/es/examples/i_love_ruby.md +++ b/es/examples/i_love_ruby.md @@ -11,7 +11,7 @@ puts expresion expresion['amo'] = "*amo*" puts expresion.upcase -# Salida "Yo *amo* Ruby +# Salida "Yo *amo* Ruby" # cinco veces 5.times { puts expresion } {% endhighlight %} diff --git a/id/examples/i_love_ruby.md b/id/examples/i_love_ruby.md index 2a6b8d3172..91c6f2a5bb 100644 --- a/id/examples/i_love_ruby.md +++ b/id/examples/i_love_ruby.md @@ -7,7 +7,7 @@ layout: null say = "Saya cinta Ruby" puts say -# Keluaran "Saya *CINTA* RUBY" +# Keluaran "SAYA *CINTA* RUBY" say['cinta'] = "*cinta*" puts say.upcase diff --git a/ru/downloads/index.md b/ru/downloads/index.md index ddbf0c5e37..6344775726 100644 --- a/ru/downloads/index.md +++ b/ru/downloads/index.md @@ -62,7 +62,7 @@ lang: ru Это архив свежайшего слепка текущей ветки `{{ snapshot.branch }}`.{% endfor %} * [Nightly-слепок]({{ site.data.downloads.nightly_snapshot.url.gz }}): Это архив того, что есть в Git, сделанный ночью. - Может содержать баги и прочие ошибки, используйте его на свой страх и риск. + Может содержать баги и прочие ошибки, используйте его на свой страх и риск! Для получения дополнительной информации по определенным релизам, в частности, про старые или предварительные релизы, diff --git a/ru/news/_posts/2013-11-21-fukuoka-ruby-award-2014.md b/ru/news/_posts/2013-11-21-fukuoka-ruby-award-2014.md index f92bec0daa..406e503134 100644 --- a/ru/news/_posts/2013-11-21-fukuoka-ruby-award-2014.md +++ b/ru/news/_posts/2013-11-21-fukuoka-ruby-award-2014.md @@ -21,7 +21,7 @@ lang: ru Matz и группа других участников выберут победителей соревнований. Главный приз в соревнованиях: 1 миллион йен. Среди предыдущих -победителувей соревнований Rhomobile (США) и APEC Climate Center (Корея). +победителей соревнований Rhomobile (США) и APEC Climate Center (Корея). Победители прошлого года: diff --git a/ru/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md b/ru/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md index 31d2fa8b02..5749046038 100644 --- a/ru/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md +++ b/ru/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md @@ -1,7 +1,7 @@ --- layout: news_post title: "2020 Конкурс Фукуока Ruby Award - работы будут оцениваться Matz" -author: "Фукуока Ruby" +author: "Fukuoka Ruby" translator: "shprotru" date: 2019-10-16 00:00:00 +0000 lang: ru diff --git a/ru/news/_posts/2020-03-19-json-dos-cve-2020-10663.md b/ru/news/_posts/2020-03-19-json-dos-cve-2020-10663.md index 330175efc7..79bb92c9fb 100644 --- a/ru/news/_posts/2020-03-19-json-dos-cve-2020-10663.md +++ b/ru/news/_posts/2020-03-19-json-dos-cve-2020-10663.md @@ -14,9 +14,9 @@ lang: ru При прочтении JSON-документов, гем json (включая встроенный в Ruby) может быть вынужден создать произвольные объекты в атакуемой системе. -Это та же проблема, что и [CVE-2013-0269](https://www.ruby-lang.org/en/news/2013/02/22/json-dos-cve-2013-0269/). Предыдущее исправление было неполным, которое касалось `JSON.parse(user_input)`, но не затрагивало некоторые другие типы прочтения JSON, включая `JSON(user_input)` и `JSON.parse(user_input, nil)`. +Это та же проблема, что и [CVE-2013-0269](https://www.ruby-lang.org/ru/news/2013/02/22/json-dos-cve-2013-0269/). Предыдущее исправление было неполным, которое касалось `JSON.parse(user_input)`, но не затрагивало некоторые другие типы прочтения JSON, включая `JSON(user_input)` и `JSON.parse(user_input, nil)`. -Подробнее смотрите [CVE-2013-0269](https://www.ruby-lang.org/en/news/2013/02/22/json-dos-cve-2013-0269/). Обратите внимание, что эта проблема могла быть использована для недоступности сервиса путём создания большого количества объектов-символов, которые не уничтожаются при сборке мусора, но этот вид атаки больше не действителен, поскольку объекты-символы теперь можно уничтожать при сборке мусора. Однако создание произвольных объектов может привести к серьёзным последствиям для безопасности в зависимости от кода приложения. +Подробнее смотрите [CVE-2013-0269](https://www.ruby-lang.org/ru/news/2013/02/22/json-dos-cve-2013-0269/). Обратите внимание, что эта проблема могла быть использована для недоступности сервиса путём создания большого количества объектов-символов, которые не уничтожаются при сборке мусора, но этот вид атаки больше не действителен, поскольку объекты-символы теперь можно уничтожать при сборке мусора. Однако создание произвольных объектов может привести к серьёзным последствиям для безопасности в зависимости от кода приложения. Пожалуйста, обновите гем json до версии 2.3.0 или новее. Вы можете использовать `gem update json` для его обновления. Если вы используете bundler, пожалуйста, добавьте `gem "json", ">= 2.3.0"` в ваш `Gemfile`. diff --git a/vi/examples/i_love_ruby.md b/vi/examples/i_love_ruby.md index 9ca2b8512e..dff861747f 100644 --- a/vi/examples/i_love_ruby.md +++ b/vi/examples/i_love_ruby.md @@ -11,6 +11,6 @@ puts nói nói['love'] = "*love*" puts nói.upcase -# In ra "I *love* Ruby " 5 lần +# In ra "I *love* Ruby" 5 lần 5.times { puts nói } {% endhighlight %} From 7d46d050c97eceafd0293e1b9255d007d8b627d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2020 18:26:22 +0000 Subject: [PATCH 0080/1487] Bump json from 2.2.0 to 2.3.1 Bumps [json](https://github.com/flori/json) from 2.2.0 to 2.3.1. - [Release notes](https://github.com/flori/json/releases) - [Changelog](https://github.com/flori/json/blob/master/CHANGES.md) - [Commits](https://github.com/flori/json/compare/v2.2.0...v2.3.1) Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 88fda76081..c324a62f12 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -34,7 +34,7 @@ GEM sassc (> 2.0.1, < 3.0) jekyll-watch (2.2.1) listen (~> 3.0) - json (2.2.0) + json (2.3.1) kgio (2.11.2) kramdown (2.1.0) kramdown-parser-gfm (1.1.0) From f34c12551a0e4cbd008a0e8ddceaab7925ca5779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20Ar=C4=B1l=C4=B1k?= Date: Fri, 31 Jul 2020 15:27:00 +0300 Subject: [PATCH 0081/1487] Follow 2465 (tr) (#2467) Co-authored-by: Ismail Arilik --- .../2020-07-16-fukuoka-ruby-award-2021.md | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 tr/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md diff --git a/tr/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md b/tr/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md new file mode 100644 index 0000000000..042ff0390d --- /dev/null +++ b/tr/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md @@ -0,0 +1,37 @@ +--- +layout: news_post +title: "2021 Fukuoka Ruby Ödül Yarışması - Girişler Matz tarafından değerlendirilecek" +author: "Fukuoka Ruby" +translator: "İsmail Arılık" +date: 2020-07-16 00:00:00 +0000 +lang: tr +--- + +Sevgili Ruby Hayranları, + +Fukuoka/Japonya Hükümeti, "Matz" ile birlikte sizi aşağıdaki Ruby yarışmasına katılmaya davet ediyor. +Eğer ilginç bir Ruby programı geliştirdiyseniz, lütfen başvurun. + +2020 Fukuoka Ruby Ödül Yarışması - Büyük Ödül - 1 Milyon Yen! + +Son Başvuru Tarihi: 4 Aralık 2020 + +![Fukuoka Ruby Ödülü](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) + +Matz ve bir grup oturum katılımcısı Fukuoka Yarışmasının kazananlarını belirleyecek. +Fukuoka Yarışması için büyük ödül 1 milyon yen'dir. +Önceki büyük ödül sahipleri arasında Rhomobile (ABD) ve APEC İklim Merkezi (Kore) bulunmaktadır. + +Yarışmaya giren programlar tümüyle Ruby ile yazılmak zorunda değildir fakat Ruby'nin eşsiz karakteristiklerinden faydalanmalıdır. + +Projeler, değerlendirmeye alınabilmeleri için, son 12 ayda geliştirilmiş ya da tamamlanmış olmalıdır. +Ek ayrıntılar ya da başvurmak için lütfen aşağıdaki Fukuoka websitesini ziyaret edin: + +[http://www.digitalfukuoka.jp/events/226](http://www.digitalfukuoka.jp/events/226) + +Lütfen başvuru formunu award@f-ruby.com'a gönderin. + +"Matz, kaynak kodunu test edecek ve gözden geçirecek, yani başvurman oldukça anlamlı! +Yarışmaya katılmak ücretsiz." + +Teşekkürler! From 4b3deed915bf7fe9c472abdc50e113f4361aff09 Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Mon, 3 Aug 2020 22:25:41 +0700 Subject: [PATCH 0082/1487] Translate CVE-2020-10663: Unsafe Object Creation Vulnerability in JSON (Additional fix) (id) (#2461) * Translate CVE-2020-10663: Unsafe Object Creation Vulnerability in JSON (Additional fix) (id) * Fix typo (id) --- .../2020-03-19-json-dos-cve-2020-10663.md | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 id/news/_posts/2020-03-19-json-dos-cve-2020-10663.md diff --git a/id/news/_posts/2020-03-19-json-dos-cve-2020-10663.md b/id/news/_posts/2020-03-19-json-dos-cve-2020-10663.md new file mode 100644 index 0000000000..12531ea06e --- /dev/null +++ b/id/news/_posts/2020-03-19-json-dos-cve-2020-10663.md @@ -0,0 +1,47 @@ +--- +layout: news_post +title: "CVE-2020-10663: Kerentanan Penciptaan Unsafe Object pada JSON (Perbaikan tambahan)" +author: "mame" +translator: "meisyal" +date: 2020-03-19 13:00:00 +0000 +tags: security +lang: id +--- + +Ada sebuah kerentanan penciptaan *unsafe object* pada *gem* json yang di-*bundle* +dengan Ruby. Kerentanan ini telah ditetapkan dengan penanda CVE [CVE-2020-10663](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10663). +Kami sangat menganjurkan untuk memperbarui *gem* json. + +## Detail + +Ketika mem-*parsing* suatu dokumen JSON, *gem* json (termasuk yang di-*bundle* +dengan Ruby) dapat disalahgunakan untuk membuat objek tertentu pada sistem +yang dituju. + +Masalah ini sama dengan [CVE-2013-0269](https://www.ruby-lang.org/en/news/2013/02/22/json-dos-cve-2013-0269/). +Perbaikan sebelumnya belum selesai, yang membahas `JSON.parse(user_input)`, +tetapi tidak membahas beberapa gaya JSON *parsing* lainnya, seperti +`JSON(user_input)` dan `JSON.parse(user_input, nil)`. + +Lihat [CVE-2013-0269](https://www.ruby-lang.org/en/news/2013/02/22/json-dos-cve-2013-0269/) +untuk detail. Catat bahwa masalah ini bisa dieksploitasi yang menyebabkan +*Denial of Service* dengan membuat banyak objek *garbage-uncollectable Symbol*, +tetapi penyerangan semacam ini tidak lagi valid karena objek *Symbol* sekarang +*garbage-collectable*. Namun demikian, pembuatan objek tertentu bisa menyebabkan +masalah keamanan tergantung pada kode aplikasi. + +Mohon perbarui *gem* json ke versi 2.3.0 atau setelahnya. Anda dapat menggunakan +`gem update json` untuk memperbarui. Jika Anda menggunakan *bundler*, mohon +tambahkan `gem "json", ">= 2.3.0"` pada `Gemfile` Anda. + +## Versi terimbas + +* *gem* JSON 2.2.0 atau sebelumnya + +## Rujukan + +Terima kasih kepada Jeremy Evans yang telah menemukan masalah ini. + +## Riwayat + +* Semula dipublikasikan pada 2020-03-19 13:00:00 (UTC) From b98ecd53092eb540914b1f0d55ec409f49730e48 Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Fri, 31 Jul 2020 22:39:19 +0700 Subject: [PATCH 0083/1487] Translate Ruby 2.4.10 released news (id) --- .../_posts/2020-03-31-ruby-2-4-10-released.md | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 id/news/_posts/2020-03-31-ruby-2-4-10-released.md diff --git a/id/news/_posts/2020-03-31-ruby-2-4-10-released.md b/id/news/_posts/2020-03-31-ruby-2-4-10-released.md new file mode 100644 index 0000000000..3e662befaa --- /dev/null +++ b/id/news/_posts/2020-03-31-ruby-2-4-10-released.md @@ -0,0 +1,58 @@ +--- +layout: news_post +title: "Ruby 2.4.10 Dirilis" +author: "usa" +translator: "meisyal" +date: 2020-03-31 12:00:00 +0000 +lang: id +--- + +Ruby 2.4.10 telah dirilis. + +Rilis ini mencakup sebuah perbaikan keamanan. Mohon cek topik di bawah ini +untuk lebih detail. + +* [CVE-2020-10663: Kerentanan Penciptaan Unsafe Object pada JSON (Perbaikan tambahan)]({% link id/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) + +Ruby 2.4 saat ini berada pada fase perawatan keamanan hingga akhir bulan Maret 2020. +Setelah bulan tersebut, perawatan Ruby 2.4 akan berakhir. +Sehingga, rilis ini merupakan rilis terakhir dari rangkaian Ruby 2.4. +Kami merekomendasikan Anda untuk segera memperbarui Ruby ke versi terbaru, +seperti 2.7 atau 2.6 atau 2.5. + +## Unduh + +{% assign release = site.data.releases | where: "version", "2.4.10" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Komentar Rilis + +Terima kasih kepada semua yang telah membantu rilis ini, khususnya kepada +pelapor kerentanan ini. From 61c7bc7871ad925b4e1f41d313d75a0ff9022735 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 Aug 2020 22:43:01 +0000 Subject: [PATCH 0084/1487] Bump kramdown from 2.1.0 to 2.3.0 Bumps [kramdown](https://github.com/gettalong/kramdown) from 2.1.0 to 2.3.0. - [Release notes](https://github.com/gettalong/kramdown/releases) - [Changelog](https://github.com/gettalong/kramdown/blob/master/doc/news.page) - [Commits](https://github.com/gettalong/kramdown/commits) Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index c324a62f12..899b8a8d60 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -36,7 +36,8 @@ GEM listen (~> 3.0) json (2.3.1) kgio (2.11.2) - kramdown (2.1.0) + kramdown (2.3.0) + rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) lanyon (0.4.1) @@ -67,6 +68,7 @@ GEM rb-fsevent (0.10.3) rb-inotify (0.10.0) ffi (~> 1.0) + rexml (3.2.4) rouge (3.12.0) safe_yaml (1.0.5) sassc (2.2.1) From 79d5ef0abc0e93b8fbf43e2e3e914ef6af4bf21c Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Sun, 16 Aug 2020 21:37:58 +0700 Subject: [PATCH 0085/1487] Translate Ruby 2.5.8 released news (id) --- .../_posts/2020-03-31-ruby-2-5-8-released.md | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 id/news/_posts/2020-03-31-ruby-2-5-8-released.md diff --git a/id/news/_posts/2020-03-31-ruby-2-5-8-released.md b/id/news/_posts/2020-03-31-ruby-2-5-8-released.md new file mode 100644 index 0000000000..7d5a52468f --- /dev/null +++ b/id/news/_posts/2020-03-31-ruby-2-5-8-released.md @@ -0,0 +1,55 @@ +--- +layout: news_post +title: "Ruby 2.5.8 Dirilis" +author: "usa" +translator: "meisyal" +date: 2020-03-31 12:00:00 +0000 +lang: id +--- + +Ruby 2.5.8 telah dirilis. + +Rilis ini mencakup perbaikan keamanan. +Mohon cek topik-topik di bawah ini untuk lebih detail. + +* [CVE-2020-10663: Kerentanan Penciptaan Unsafe Object pada JSON (Perbaikan tambahan)]({% link id/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10933: Kerentanan tereksposnya heap pada pustaka socket]({% link id/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) + +Lihat [commit logs](https://github.com/ruby/ruby/compare/v2_5_7...v2_5_8) untuk detail. + +## Unduh + +{% assign release = site.data.releases | where: "version", "2.5.8" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Komentar Rilis + +Terima kasih kepada semua yang telah membantu rilis ini, khususnya kepada +pelapor kerentanan. From 4845cc95721ef3cf4512bddd611e9e896157101b Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Sat, 29 Aug 2020 21:23:04 +0700 Subject: [PATCH 0086/1487] Translate Ruby 2.6.6 released news (id) --- .../_posts/2020-03-31-ruby-2-6-6-released.md | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 id/news/_posts/2020-03-31-ruby-2-6-6-released.md diff --git a/id/news/_posts/2020-03-31-ruby-2-6-6-released.md b/id/news/_posts/2020-03-31-ruby-2-6-6-released.md new file mode 100644 index 0000000000..9821de1094 --- /dev/null +++ b/id/news/_posts/2020-03-31-ruby-2-6-6-released.md @@ -0,0 +1,55 @@ +--- +layout: news_post +title: "Ruby 2.6.6 Dirilis" +author: "nagachika" +translator: "meisyal" +date: 2020-03-31 12:00:00 +0000 +lang: id +--- + +Ruby 2.6.6 telah dirilis. + +Rilis ini mencakup perbaikan keamanan. +Mohon cek topik-topik di bawah ini untuk lebih detail. + +* [CVE-2020-10663: Kerentanan Penciptaan Unsafe Object pada JSON (Perbaikan tambahan)]({% link id/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10933: Kerentanan tereksposnya heap pada pustaka socket]({% link id/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) + +Lihat [commit logs](https://github.com/ruby/ruby/compare/v2_6_5...v2_6_6) untuk detail. + +## Unduh + +{% assign release = site.data.releases | where: "version", "2.6.6" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Komentar Rilis + +Banyak *committer*, pengembang, dan pengguna yang menyediakan laporan *bug* +telah membantuk kami membuat rilis ini. Terima kasih kontribusinya. From 88b839e08d69f228558f5f3734cadf62d47eefb8 Mon Sep 17 00:00:00 2001 From: Diego Viniegra Date: Wed, 9 Sep 2020 14:03:21 -0500 Subject: [PATCH 0087/1487] Fix typo in starter guide (#2476) This MR fixes a tiny typo in the las page of 20 minutes starter guide. https://www.ruby-lang.org/es/documentation/quickstart/4/ --- es/documentation/quickstart/4/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/es/documentation/quickstart/4/index.md b/es/documentation/quickstart/4/index.md index 750501f926..64c61f61be 100644 --- a/es/documentation/quickstart/4/index.md +++ b/es/documentation/quickstart/4/index.md @@ -127,7 +127,7 @@ otras listas, todo funcionará como fue planeado. ## Arrancando el Script Así que eso es la clase MegaAnfitrion, el resto del archivo sólo llama a -los métodos de la clase. Hy un último truco para tener en cuenta, y es +los métodos de la clase. Hay un último truco para tener en cuenta, y es la linea: {% highlight ruby %} From 6c482eb461f3ca02bfed1adf93cfacba840884da Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Thu, 17 Sep 2020 08:44:43 +0300 Subject: [PATCH 0088/1487] Translate Fukuoka Ruby Award 2021 post (ru) (#2468) * Translate Fukuoka Ruby Award 2021 post (ru) * Update 2020-07-16-fukuoka-ruby-award-2021.md Co-authored-by: Alexey Pyltsyn --- .../2020-07-16-fukuoka-ruby-award-2021.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 ru/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md diff --git a/ru/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md b/ru/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md new file mode 100644 index 0000000000..c5f99988c7 --- /dev/null +++ b/ru/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md @@ -0,0 +1,32 @@ +--- +layout: news_post +title: "Соревнование 2021 Fukuoka Ruby Award - судить участников будет Matz" +author: "Fukuoka Ruby" +translator: "aleksandrilyin" +date: 2020-07-16 00:00:00 +0000 +lang: ru +--- + +Дорогие Ruby-энтузиасты, + +Правительство Фукуоки, Япония, вместе с "Matz" Мацумото приглашают вас принять участие в следующем соревновании по Ruby. Если вы разработали интересную программу на Ruby, пожалуйста, просим вас подать заявку. + +Соревнование 2021 Fukuoka Ruby Award, главный приз - 1 миллион иен! + +Последний день подачи заявки на участие: 4 декабря 2020 года. + +![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) + +Matz и группа участников дискуссии выберут победителей соревнования Фукуоки. Главный приз в соревновании Фукуоки - 1 миллион иен. Среди предыдущих обладателей главного приза Rhomobile (США) и APEC Climate Center (Корея). + +Программы, участвующие в соревновании, не обязательно должны быть написаны целиком на Ruby, но должны использовать уникальные особенности Ruby. + +Программа должна быть разработана или обновлена в прошлом году или около того. Пожалуйста, посетите следующий сайт Фукуоки, чтобы войти. + +[http://www.digitalfukuoka.jp/events/226](http://www.digitalfukuoka.jp/events/226) + +Пожалуйста, отправьте заявку по электронной почте на award@f-ruby.com. + +"Matz будет тщательно проверять и просматривать ваш исходный код, так что участие значит очень много! Любой может принять участие в соревновании." + +Спасибо! From 14078aaeed2ea0968c45a370fc1bb047f36619e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20T=C3=A1mara=20Pati=C3=B1o?= Date: Tue, 22 Sep 2020 12:19:58 -0500 Subject: [PATCH 0089/1487] Translate Fukuoka Ruby Award 2021 post (es) (#2475) --- .../2020-07-16-fukuoka-ruby-award-2021.md | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 es/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md diff --git a/es/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md b/es/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md new file mode 100644 index 0000000000..97728de457 --- /dev/null +++ b/es/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md @@ -0,0 +1,44 @@ +--- +layout: news_post +title: "Concurso Galardon Ruby Fukuoka 2021 - Los programas participantes serán juzgados por Matz" +author: "Fukuoka Ruby" +translator: vtamara +date: 2020-07-16 00:00:00 +0000 +lang: es +--- + +Estimado entusiasta Ruby + +El Gobierno de Fukuoka, Japón junto con "Matz" Matsumoto quisieran invitarlo +a participar en el siguiente concurso de Ruby. Si ha desarrollado un +programa en Ruby interesante, por favor animese a aplicar. + +Concurso Galardon Ruby Fukuoka 2020 - Premio Mayor - 1 Millon Yenes! + +Fecha límite: 4 de diciembre de 2020 + +![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) + + +Matz y un grupo de panelistas seleccionarán los ganadores del Concurso +Fukuoka. El premio mayor de la Compentencia Fukuoka es de 1 millón de yenes. +Los ganadores del premio mayor en versiones anteriores incluyen a +Rhomobile (USA) y Centro de Clima APEC (Korea). + +Los programas que ingresen al concurso no tienen que estar escritos +enteramente en Ruby, pero debo aprovechar las características únicas de Ruby. + +Los programas deben haber sido desarrollados o actualizados en el último +año. Por favor visite el siguiente sitio web de Fukuoka para ingresar: + +[http://www.digitalfukuoka.jp/events/226](http://www.digitalfukuoka.jp/events/226) + +Por favor envie por correo electrónico el formulario de aplicación a +award@f-ruby.com + + +"¡Matz estará probando y revisando su código fuente, así que aplicar es +muy significativo! El ingreso al concurso es gratuito." + + +Gracias! From 888695fca8a9cc20845b544d23442bc4f49f5b50 Mon Sep 17 00:00:00 2001 From: "NARUSE, Yui" Date: Fri, 25 Sep 2020 23:41:31 +0900 Subject: [PATCH 0090/1487] Ruby 3.0.0 Preview 1 Released --- _data/branches.yml | 5 + _data/downloads.yml | 1 + _data/releases.yml | 35 +++ ...2020-09-25-ruby-3-0-0-preview1-released.md | 243 ++++++++++++++++++ 4 files changed, 284 insertions(+) create mode 100644 en/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md diff --git a/_data/branches.yml b/_data/branches.yml index 6bd57c1980..8c7d486e4a 100644 --- a/_data/branches.yml +++ b/_data/branches.yml @@ -8,6 +8,11 @@ # date: date of first stable release (YYYY-MM-DD) # eol_date: date of EOL (YYYY-MM-DD) +- name: 3.0 + status: preview + date: + eol_date: + - name: 2.7 status: normal maintenance date: 2019-12-25 diff --git a/_data/downloads.yml b/_data/downloads.yml index c0d5dec6f8..d9a42470ed 100644 --- a/_data/downloads.yml +++ b/_data/downloads.yml @@ -4,6 +4,7 @@ # optional preview: + - 3.0.0-preview1 stable: diff --git a/_data/releases.yml b/_data/releases.yml index 6e7152c8d2..59e84c8384 100644 --- a/_data/releases.yml +++ b/_data/releases.yml @@ -19,6 +19,41 @@ # In order to get the release listed on the downloads page, # you also need to add an entry to `_data/downloads.yml'. +# 3.0 series + +- version: 3.0.0-preview1 + date: 2020-09-25 + post: /en/news/2020/09/25/ruby-3-0-0-preview1-released/ + stats: + files_changed: 3385 + insertions: 150159 + deletions: 124949 + url: + gz: https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.0-preview1.tar.gz + zip: https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.0-preview1.zip + bz2: https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.0-preview1.tar.bz2 + xz: https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.0-preview1.tar.xz + size: + gz: 17747808 + zip: 22002645 + bz2: 15538340 + xz: 12703060 + sha1: + gz: 2842d2af2568d74c8d4071f5f536889a6b149202 + zip: 4b5b61066373daf0a947d3fafe2645788504a164 + bz2: 032697f3ace0a697cd72f68bac0032c31a8328d4 + xz: 91d9fbe87504924148deeec90199d6ff4d7dcf56 + sha256: + gz: ce8bd7534e7ec2a870b24d2145ea20e9bbe5b2d76b7dfa1102dbee5785253105 + zip: a39a48ed9a8ca2c83d65d225a1bb3db331c6587a77ba156c20e630c1b4bfc23b + bz2: 013bdc6e859d76d67a6fcd990d401ed57e6e25896bab96d1d0648a877f556dbb + xz: aa7cce0c99f4ea2145fef9b78d74a44857754396790cd23bad75d759811e7a2a + sha512: + gz: b94892951f842a1538f4b99022606ac2c0b5031f1ede7eef3833a8caa9ed63e9b22868509173bfefb406f263c65211db75597b152b61f49e5ba2a875fce63a27 + zip: 10f6f28715a52093d7d9da82d1678147091b45e2f279e463626adea8efbf181485daa42565e5086057ffb45a097ffb8ff395c572b247b6b5da27d85933cf58a8 + bz2: 3a6a6458d9c5f06555ab8705160f6b071f4dbe9d2a91cd7848852633657b495c480d74e4b2ff2cebddda556118d26bbb271160c989bc970bb1b5cb234e868d2f + xz: dca5dcc965c434371947c100864090e29e649e19ae24b8bb2e88a534ebd8220c5a086035a999b1e8b1cd5ec154a6985a8d8dfea56095d712d62aeea7a2054f7d + # 2.7 series - version: 2.7.1 diff --git a/en/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md b/en/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md new file mode 100644 index 0000000000..3416fd5f90 --- /dev/null +++ b/en/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md @@ -0,0 +1,243 @@ +--- +layout: news_post +title: "Ruby 3.0.0 Preview 1 Released" +author: "naruse" +translator: +date: 2020-09-25 00:00:00 +0000 +lang: en +--- + +We are pleased to announce the release of Ruby 3.0.0-preview1. + +It introduces a number of new features and performance improvements. + +## RBS + +RBS is a language to describe the types of Ruby programs. +Type checkers including type-profiler and other tools supporting RBS will understand Ruby programs much better with RBS definitions. + +You can write down the definition of classes and modules: methods defined in the class, instance variables and their types, and inheritance/mix-in relations. +The goal of RBS is to support commonly seen patterns in Ruby programs and it allows writing advanced types including union types, method overloading, and generics. It also supports duck typing with _interface types_. + +Ruby 3.0 ships with `rbs` gem, which allows parsing and processing type definitions written in RBS. + +The following is a small example of RBS. + +{% highlight rbs %} +module ChatApp + VERSION: String + + class Channel + attr_reader name: String + attr_reader messages: Array[Message] + attr_reader users: Array[User | Bot] # `|` means union types, `User` or `Bot`. + + def initialize: (String) -> void + + def post: (String, from: User | Bot) -> Message # Method overloading is supported. + | (File, from: User | Bot) -> Message + end +end +{% endhighlight %} + +See [README of rbs gem](https://github.com/ruby/rbs) for more detail. + +## Ractor (experimental) + +Ractor is an Actor-model like concurrent abstraction designed to provide a parallel execution feature without thread-safety concerns. + +You can make multiple ractors and you can run them in parallel. Ractor enables to make thread-safe parallel programs because ractors can not share normal objects. Communication between ractors are supported by message passing. + +To limit sharing objects, Ractor introduces several restrictions to the Ruby's syntax (without multiple Ractors, there is no changes). + +The specification and implmentation are not matured and changed in future, so this feature is marked as experimental and show the experimental feature warning if Ractor is created. + +The following small program calculates `prime?` in parallel with two ractors and about x2 times faster with two or more cores than sequential program. + +{% highlight ruby %} +require 'prime' + +# n.prime? with sent integers in r1, r2 run in parallel +r1, r2 = *(1..2).map do + Ractor.new do + n = Ractor.recv + n.prime? + end +end + +# send parameters +r1.send 2**61 - 1 +r2.send 2**61 + 15 + +# wait for the results of expr1, expr2 +p r1.take #=> true +p r2.take #=> true +{% endhighlight %} + +see [doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md) for more detail. + +## Scheduler (Experimental) + +`Thread#scheduler` is introduced for intercepting blocking operations. This allows for light-weight concurrency without changing existing code. + +Currently supported classes/methods: + +- `Mutex#lock`, `Mutex#unlock`, `Mutex#sleep` +- `ConditionVariable#wait` +- `Queue#pop`, `SizedQueue#push` +- `Thread#join` +- `Kernel#sleep` +- `IO#wait`, `IO#read`, `IO#write` and related methods (e.g. `#wait_readable`, `#gets`, `#puts` and so on). +- `IO#select` is *not supported*. + +The current entry point for concurrency is `Fiber.schedule{...}` however this is subject to change by the time Ruby 3 is released. + +Currently, there is a test scheduler available in [`Async::Scheduler`](https://github.com/socketry/async/pull/56). See [`doc/scheduler.md`](https://github.com/ruby/ruby/blob/master/doc/scheduler.md) for more details. [Feature #16786] + +**CAUTION**: This feature is strongly experimental. Both the name and feature will change in next preview release. + +## Other Notable New Features + +* Rightward assignment statement is added. + {% highlight ruby %} + fib(10) => x + p x #=> 55 + {% endhighlight %} + +* Endless method definition is added. + {% highlight ruby %} + def square(x) = x * x + {% endhighlight %} + +* Find pattern is added. + {% highlight ruby %} + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + {% endhighlight %} + +* `Hash#except` is now built-in. + {% highlight ruby %} + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + {% endhighlight %} + +* Memory view is added as an experimental feature + + * This is a new C-API set to exchange a raw memory area, such as a numeric array and a bitmap image, between extension libraries. The extension libraries can share also the metadata of the memory area that consists of the shape, the element format, and so on. Using these kinds of metadata, the extension libraries can share even a multidimensional array appropriately. This feature is designed by referring to Python's buffer protocol. + +## Performance improvements + +* Many improvements were implemented in MJIT. See NEWS in detail. + +## Other notable changes since 2.7 + +* Keyword arguments are separated from other arguments. + * In principle, code that prints a warning on Ruby 2.7 won't work. See the [document](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/) in detail. + * By the way, arguments forwarding now supports leading arguments. + {% highlight ruby %} + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end + {% endhighlight %} + +* The feature of `$SAFE` was completely removed; now it is a normal global variable. + +* The order of backtrace had been reversed at Ruby 2.5, but it was cancelled. Now it behaves like Ruby 2.4; an error message and the line number where the exception occurs are printed first, and its callers are printed later. + +* Some standard libraries are updated. + * RubyGems 3.2.0.rc.1 + * Bundler 2.2.0.rc.1 + * IRB 1.2.6 + * Reline 0.1.5 + +* The following libraries are no longer bundled gems. + Install corresponding gems to use these features. + * net-telnet + * xmlrpc + +* Promote default gems to bundled gems. + * rexml + * rss + +* Promote stdlib to default gems. The following default gems were published on rubygems.org + * abbrev + * base64 + * English + * erb + * find + * io-nonblock + * io-wait + * net-ftp + * net-http + * net-imap + * net-protocol + * nkf + * open-uri + * optparse + * resolv + * resolv-replace + * rinda + * securerandom + * set + * shellwords + * tempfile + * time + * tmpdir + * tsort + * weakref + +See [NEWS](https://github.com/ruby/ruby/blob/v3_0_0/NEWS) +or [commit logs](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0) +for more details. + +{% assign release = site.data.releases | where: "version", "3.0.0-preview1" | first %} + +With those changes, [{{ release.stats.files_changed }} files changed, {{ release.stats.insertions }} insertions(+), {{ release.stats.deletions }} deletions(-)](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0) +since Ruby 2.7.0! + +Please try Ruby 3.0.0-preview1, and give us any feedback! + +## Download + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## 3.0.0-preview2 trailer + +We plan to include ["type-profiler"](https://github.com/mame/ruby-type-profiler) that is a static type analysis feature. Stay tuned! + +## What is Ruby + +Ruby was first developed by Matz (Yukihiro Matsumoto) in 1993, +and is now developed as Open Source. It runs on multiple platforms +and is used all over the world especially for web development. From acee0f0090c6f9a3f1b66213089c2323ab8a6a01 Mon Sep 17 00:00:00 2001 From: aycabta Date: Sat, 26 Sep 2020 10:57:36 +0900 Subject: [PATCH 0091/1487] Fix NEWS link of 3.0.0-preview1 --- en/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md b/en/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md index 3416fd5f90..72605f03d9 100644 --- a/en/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md +++ b/en/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md @@ -191,7 +191,7 @@ Currently, there is a test scheduler available in [`Async::Scheduler`](https://g * tsort * weakref -See [NEWS](https://github.com/ruby/ruby/blob/v3_0_0/NEWS) +See [NEWS](https://github.com/ruby/ruby/blob/v3_0_0_preview1/NEWS.md) or [commit logs](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0) for more details. From 26e6351b5e6e55c1a31d2dc7d19a4c967b1e2a6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlio=20Campos?= Date: Mon, 28 Sep 2020 17:11:05 -0300 Subject: [PATCH 0092/1487] Translate Ruby 3.0.0 Preview 1 Released post (pt) --- ...2020-09-25-ruby-3-0-0-preview1-released.md | 243 ++++++++++++++++++ 1 file changed, 243 insertions(+) create mode 100644 pt/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md diff --git a/pt/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md b/pt/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md new file mode 100644 index 0000000000..9915fd80df --- /dev/null +++ b/pt/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md @@ -0,0 +1,243 @@ +--- +layout: news_post +title: "Lançado Ruby 3.0.0 Preview 1" +author: "naruse" +translator: "jcserracampos" +date: 2020-09-25 00:00:00 +0000 +lang: pt +--- + +Temos o prazer de anunciar o lançamento do Ruby 3.0.0-preview1. + +Ele apresenta uma série de novos recursos e melhorias de desempenho. + +## RBS + +RBS é uma linguagem para descrever os tipos de programas Ruby. +Os verificadores de tipo, incluindo criador de perfil de tipos e outras ferramentas de suporte ao RBS, compreenderão os programas Ruby muito melhor com as definições do RBS. + +Você pode escrever a definição de classes e módulos: métodos definidos na classe, variáveis de instância e seus tipos e relações de herança / mix-in. +O objetivo do RBS é oferecer suporte a padrões comumente vistos em programas Ruby e permite escrever tipos avançados, incluindo tipos de união, sobrecarga de método e genéricos. Ele também oferece suporte à _duck typing_ com _tipos de interface_. + +Ruby 3.0 vem com gem `rbs`, que permite analisar e processar definições de tipo escritas em RBS. + +A seguir está um pequeno exemplo de RBS. + +{% highlight rbs %} +module ChatApp + VERSION: String + + class Channel + attr_reader name: String + attr_reader messages: Array[Message] + attr_reader users: Array[User | Bot] # `|` significa união de tipos, `User` ou `Bot`. + + def initialize: (String) -> void + + def post: (String, from: User | Bot) -> Message # Sobrecarga de método é suportada. + | (File, from: User | Bot) -> Message + end +end +{% endhighlight %} + +Veja [README da gem rbs](https://github.com/ruby/rbs) para mais detalhes. + +## Ractor (experimental) + +Ractor é uma abstração concorrente semelhante a um modelo de ator, projetada para fornecer um recurso de execução paralela sem preocupações com a segurança do thread. + +Você pode fazer vários ractores e executá-los em paralelo. Ractor permite fazer programas paralelos thread-safe porque ractors não podem compartilhar objetos normais. A comunicação entre os ractores é apoiada pela troca de mensagens. + +Para limitar o compartilhamento de objetos, o Ractor apresenta várias restrições à sintaxe do Ruby (sem vários Ractors, não há mudanças). + +A especificação e implementação não estão amadurecidas e serão alteradas no futuro, portanto, esse recurso é marcado como experimental e mostra o aviso de recurso experimental se um Ractor for criado. + +O pequeno programa a seguir calcula `prime?` em paralelo com dois ractores e cerca de x2 vezes mais rápido com dois ou mais núcleos do que o programa sequencial. + +{% highlight ruby %} +require 'prime' + +# n.prime? com inteiros r1 e r2 enviados rodando em parelelo +r1, r2 = *(1..2).map do + Ractor.new do + n = Ractor.recv + n.prime? + end +end + +# envio de parâmetros +r1.send 2**61 - 1 +r2.send 2**61 + 15 + +# aguardando os resultados de expr1, expr2 +p r1.take #=> true +p r2.take #=> true +{% endhighlight %} + +Veja [doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md) para mais detalhes. + +## Scheduler (Experimental) + +`Thread#scheduler` é introduzido para interceptar operações bloqueantes. Isso permite concorrência leve sem alterar o código existente. + +Classes/métodos atualmente suportados: + +- `Mutex#lock`, `Mutex#unlock`e `Mutex#sleep` +- `ConditionVariable#wait` +- `Queue#pop` e `SizedQueue#push` +- `Thread#join` +- `Kernel#sleep` +- `IO#wait`, `IO#read`, `IO#write` e métodos correlatos (ex.: `#wait_readable`, `#gets`, `#puts` etc.). +- `IO#select` *não é suportado*. + +O ponto de entrada atual para concorrência é `Fiber.schedule {...}` no entanto, está sujeito a alterações no momento em que o Ruby 3 for lançado. + +Atualmente, existe um agendador de teste disponível em [`Async::Scheduler`](https://github.com/socketry/async/pull/56). Veja [`doc/scheduler.md`](https://github.com/ruby/ruby/blob/master/doc/scheduler.md) para mais detalhes. [Feature #16786] + +**cuidado**: Este recurso é fortemente experimental. O nome e o recurso serão alterados na próxima versão de prévia. + +## Outros novos recursos notáveis + +* A instrução de atribuição para a direita foi adicionada. + {% highlight ruby %} + fib(10) => x + p x #=> 55 + {% endhighlight %} + +* A definição de método sem fim foi adicionada. + {% highlight ruby %} + def square(x) = x * x + {% endhighlight %} + +* Find pattern foi adicionada. + {% highlight ruby %} + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + {% endhighlight %} + +* `Hash#except` agora é nativo. + {% highlight ruby %} + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + {% endhighlight %} + +* A visualização da memória é adicionada como um recurso experimental + + * Este é um novo conjunto C-API para trocar uma área de memória bruta, como uma matriz numérica e uma imagem de bitmap, entre bibliotecas de extensão. As bibliotecas de extensão também podem compartilhar os metadados da área de memória que consiste na forma, no formato do elemento e assim por diante. Usando esses tipos de metadados, as bibliotecas de extensão podem compartilhar até mesmo uma matriz multidimensional de forma adequada. Este recurso é projetado com referência ao protocolo de buffer do Python. + +## Melhorias de desempenho + +* Muitas melhorias foram implementadas no MJIT. Veja NEWS em detalhes. + +## Outras mudanças notáveis desde 2.7 + +* Os argumentos de palavra-chave são separados de outros argumentos. + * Em princípio, códigos que imprimem um aviso no Ruby 2.7 não funciona. Veja o [documento](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/) em detalhe. + * A propósito, o encaminhamento de argumentos agora suporta argumentos principais. + {% highlight ruby %} + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end + {% endhighlight %} + +* O recurso de `$SAFE` foi completamente removido; agora é uma variável global normal. + +* A ordem de backtrace foi revertida em Ruby 2.5, mas foi cancelada. Agora ele se comporta como Ruby 2.4; uma mensagem de erro e o número da linha onde ocorre a exceção são impressos primeiro e seus chamadores são impressos posteriormente. + +* Algumas bibliotecas padrão são atualizadas. + * RubyGems 3.2.0.rc.1 + * Bundler 2.2.0.rc.1 + * IRB 1.2.6 + * Reline 0.1.5 + +* As seguintes bibliotecas não são mais gem padrão. + Instale as gems correspondentes para usar esses recursos. + * net-telnet + * xmlrpc + +* Promove gems padrão para gems nativas. + * rexml + * rss + +* Promova stdlib para gem padrão. As seguintes gems padrão foram publicadas em rubygems.org + * abbrev + * base64 + * English + * erb + * find + * io-nonblock + * io-wait + * net-ftp + * net-http + * net-imap + * net-protocol + * nkf + * open-uri + * optparse + * resolv + * resolv-replace + * rinda + * securerandom + * set + * shellwords + * tempfile + * time + * tmpdir + * tsort + * weakref + +Veja [NEWS](https://github.com/ruby/ruby/blob/v3_0_0_preview1/NEWS.md) +ou [commit logs](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0) +para mais detalhes. + +{% assign release = site.data.releases | where: "version", "3.0.0-preview1" | first %} + +Com essas mudanças, [{{ release.stats.files_changed }} arquivos alterados, {{ release.stats.insertions }} inserções(+), {{ release.stats.deletions }} deleções(-)](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0) +desde Ruby 2.7.0! + +Por favor, experimente Ruby 3.0.0-preview1 e nos dê qualquer feedback! + +## Download + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## 3.0.0-preview2 trailer + +Planejamos incluir ["type-profiler"] (https://github.com/mame/ruby-type-profiler) que é um recurso de análise de tipo estático. Fique ligado! + +## O que é Ruby + +Ruby foi desenvolvido pela primeira vez por Matz (Yukihiro Matsumoto) em 1993, +e agora é desenvolvido como Open Source. Ele roda em várias plataformas +e é usado em todo o mundo, especialmente para desenvolvimento web. From 60cde32aa22e537d1eda07fec79a033482db9b17 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Mon, 28 Sep 2020 00:41:21 +0900 Subject: [PATCH 0093/1487] CVE-2020-25613: Potential HTTP Request Smuggling Vulnerability in WEBrick --- ...0-http-request-smuggling-cve-2020-25613.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 en/news/_posts/2020-09-30-http-request-smuggling-cve-2020-25613.md diff --git a/en/news/_posts/2020-09-30-http-request-smuggling-cve-2020-25613.md b/en/news/_posts/2020-09-30-http-request-smuggling-cve-2020-25613.md new file mode 100644 index 0000000000..1aa98f9cd5 --- /dev/null +++ b/en/news/_posts/2020-09-30-http-request-smuggling-cve-2020-25613.md @@ -0,0 +1,32 @@ +--- +layout: news_post +title: "CVE-2020-25613: Potential HTTP Request Smuggling Vulnerability in WEBrick" +author: "mame" +translator: +date: 2020-09-30 12:00:00 +0000 +tags: security +lang: en +--- + +A potential HTTP request smuggling vulnerability in WEBrick was reported. This vulnerability has been assigned the CVE idenfitifer [CVE-2020-25613](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-25613). We strongly recommend upgrading the webrick gem. + +## Details + +WEBrick was too tolerant against an invalid Transfer-Encoding header. This may lead to inconsistent interpretation between WEBrick and some HTTP proxy servers, which may allow the attacker to "smuggle" a request. See [CWE-444](https://cwe.mitre.org/data/definitions/444.html) in detail. + +Please update the webrick gem to version 1.6.1 or later. You can use `gem update webrick` to update it. If you are using bundler, please add `gem "webrick", ">= 1.6.1"` to your `Gemfile`. + +## Affected versions + +* webrick gem 1.6.0 or prior +* bundled versions of webrick in ruby 2.7.1 or prior +* bundled versions of webrick in ruby 2.6.6 or prior +* bundled versions of webrick in ruby 2.5.8 or prior + +## Credits + +Thanks to [piao](https://hackerone.com/piao) for discovering this issue. + +## History + +* Originally published at 2020-09-30 12:00:00 (UTC) From 7ac77d02a1542cc119caa693431bcf98872b5520 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Tue, 29 Sep 2020 15:38:14 +0900 Subject: [PATCH 0094/1487] Fix the date --- ...md => 2020-09-29-http-request-smuggling-cve-2020-25613.md} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename en/news/_posts/{2020-09-30-http-request-smuggling-cve-2020-25613.md => 2020-09-29-http-request-smuggling-cve-2020-25613.md} (93%) diff --git a/en/news/_posts/2020-09-30-http-request-smuggling-cve-2020-25613.md b/en/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md similarity index 93% rename from en/news/_posts/2020-09-30-http-request-smuggling-cve-2020-25613.md rename to en/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md index 1aa98f9cd5..891f5e47ad 100644 --- a/en/news/_posts/2020-09-30-http-request-smuggling-cve-2020-25613.md +++ b/en/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md @@ -3,7 +3,7 @@ layout: news_post title: "CVE-2020-25613: Potential HTTP Request Smuggling Vulnerability in WEBrick" author: "mame" translator: -date: 2020-09-30 12:00:00 +0000 +date: 2020-09-29 06:30:00 +0000 tags: security lang: en --- @@ -29,4 +29,4 @@ Thanks to [piao](https://hackerone.com/piao) for discovering this issue. ## History -* Originally published at 2020-09-30 12:00:00 (UTC) +* Originally published at 2020-09-29 06:30:00 (UTC) From df341d7b391bfffd5553d059198b2c24d41241d2 Mon Sep 17 00:00:00 2001 From: nagachika Date: Fri, 2 Oct 2020 07:29:24 +0900 Subject: [PATCH 0095/1487] Draft for 'Ruby 2.7.2. released' --- _data/downloads.yml | 2 +- _data/releases.yml | 29 ++++++++++ .../_posts/2020-10-02-ruby-2-7-2-released.md | 58 +++++++++++++++++++ .../_posts/2020-10-02-ruby-2-7-2-released.md | 58 +++++++++++++++++++ 4 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 en/news/_posts/2020-10-02-ruby-2-7-2-released.md create mode 100644 ja/news/_posts/2020-10-02-ruby-2-7-2-released.md diff --git a/_data/downloads.yml b/_data/downloads.yml index d9a42470ed..1e3198d52f 100644 --- a/_data/downloads.yml +++ b/_data/downloads.yml @@ -8,7 +8,7 @@ preview: stable: - - 2.7.1 + - 2.7.2 - 2.6.6 # optional diff --git a/_data/releases.yml b/_data/releases.yml index 59e84c8384..85157b88a0 100644 --- a/_data/releases.yml +++ b/_data/releases.yml @@ -56,6 +56,35 @@ # 2.7 series +- version: 2.7.2 + date: 2020-10-01 + post: "/en/news/2020/10/01/ruby-2-7-2-released/" + url: + bz2: https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.2.tar.bz2 + gz: https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.2.tar.gz + xz: https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.2.tar.xz + zip: https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.2.zip + size: + bz2: + gz: + xz: + zip: + sha1: + bz2: + gz: + xz: + zip: + sha256: + bz2: + gz: + xz: + zip: + sha512: + bz2: + gz: + xz: + zip: + - version: 2.7.1 date: 2020-03-31 post: "/en/news/2020/03/31/ruby-2-7-1-released/" diff --git a/en/news/_posts/2020-10-02-ruby-2-7-2-released.md b/en/news/_posts/2020-10-02-ruby-2-7-2-released.md new file mode 100644 index 0000000000..5670383f99 --- /dev/null +++ b/en/news/_posts/2020-10-02-ruby-2-7-2-released.md @@ -0,0 +1,58 @@ +--- +layout: news_post +title: "Ruby 2.7.2 Released" +author: "nagachika" +translator: +date: 2020-10-02 12:00:00 +0000 +lang: en +--- + +Ruby 2.7.2 has been released. + +This release contains intentional incompatibility. The deprecated warnings are off by default on 2.7.2 and later. +You can turn on the deprecated warnings by specifing command line option -w or -W:deprecated. +Please check the topics below for details. + + +* [Feature #17000 2.7.2 turns off deprecation warnings by default](https://bugs.ruby-lang.org/issues/17000) +* [Feature #16345 Don't emit deprecation warnings by default.](https://bugs.ruby-lang.org/issues/16345) +* https://github.com/ruby/ruby/pull/3481 + +See the [commit logs](https://github.com/ruby/ruby/compare/v2_7_1...v2_7_2) for other changes. + +## Download + +{% assign release = site.data.releases | where: "version", "2.7.2" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Release Comment + +Many committers, developers, and users who provided bug reports helped us make this release. +Thanks for their contributions. diff --git a/ja/news/_posts/2020-10-02-ruby-2-7-2-released.md b/ja/news/_posts/2020-10-02-ruby-2-7-2-released.md new file mode 100644 index 0000000000..e21910adda --- /dev/null +++ b/ja/news/_posts/2020-10-02-ruby-2-7-2-released.md @@ -0,0 +1,58 @@ +--- +layout: news_post +title: "Ruby 2.7.2 リリース" +author: "nagachika" +translator: +date: 2020-10-02 12:00:00 +0000 +lang: ja +--- + +Ruby 2.7.2 がリリースされました。 + +このリリースでは depreceted カテゴリの警告についての意図的な非互換が含まれています。 +2.7.2 以降では deprecated カテゴリの警告はデフォルトの状態で出力が抑制されます。 +コマンドラインオプション -w や -W:deprecated を明示的に指定することで deprecated 警告が出力されます。 +詳しくは以下のチケットなどを参照してください。 + + +* [Feature #17000 2.7.2 turns off deprecation warnings by default](https://bugs.ruby-lang.org/issues/17000) +* [Feature #16345 Don't emit deprecation warnings by default.](https://bugs.ruby-lang.org/issues/16345) +* https://github.com/ruby/ruby/pull/3481 + +その他の変更については [commit log](https://github.com/ruby/ruby/compare/v2_7_1...v2_7_2) を参照してください。 + +## ダウンロード + +{% assign release = site.data.releases | where: "version", "2.7.1" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## リリースコメント + +このリリースにあたり、多くのコミッター、開発者、バグ報告をしてくれたユーザーの皆様に感謝を申し上げます。 From 5841f70e5dc428a8a89b0acf421ce4a85b07dd47 Mon Sep 17 00:00:00 2001 From: Chikanaga Tomoyuki Date: Fri, 2 Oct 2020 08:56:20 +0900 Subject: [PATCH 0096/1487] Add link for article about CVE-2020-25613 --- en/news/_posts/2020-10-02-ruby-2-7-2-released.md | 5 ++++- ja/news/_posts/2020-10-02-ruby-2-7-2-released.md | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/en/news/_posts/2020-10-02-ruby-2-7-2-released.md b/en/news/_posts/2020-10-02-ruby-2-7-2-released.md index 5670383f99..e09c03c504 100644 --- a/en/news/_posts/2020-10-02-ruby-2-7-2-released.md +++ b/en/news/_posts/2020-10-02-ruby-2-7-2-released.md @@ -13,11 +13,14 @@ This release contains intentional incompatibility. The deprecated warnings are o You can turn on the deprecated warnings by specifing command line option -w or -W:deprecated. Please check the topics below for details. - * [Feature #17000 2.7.2 turns off deprecation warnings by default](https://bugs.ruby-lang.org/issues/17000) * [Feature #16345 Don't emit deprecation warnings by default.](https://bugs.ruby-lang.org/issues/16345) * https://github.com/ruby/ruby/pull/3481 +This release contains the new version of webrick with a security fix described in the article. + +* [CVE-2020-25613: Potential HTTP Request Smuggling Vulnerability in WEBrick](/en/news/2019/09/29/http-request-smuggling-cve-2020-25613/) + See the [commit logs](https://github.com/ruby/ruby/compare/v2_7_1...v2_7_2) for other changes. ## Download diff --git a/ja/news/_posts/2020-10-02-ruby-2-7-2-released.md b/ja/news/_posts/2020-10-02-ruby-2-7-2-released.md index e21910adda..5197837116 100644 --- a/ja/news/_posts/2020-10-02-ruby-2-7-2-released.md +++ b/ja/news/_posts/2020-10-02-ruby-2-7-2-released.md @@ -14,11 +14,14 @@ Ruby 2.7.2 がリリースされました。 コマンドラインオプション -w や -W:deprecated を明示的に指定することで deprecated 警告が出力されます。 詳しくは以下のチケットなどを参照してください。 - * [Feature #17000 2.7.2 turns off deprecation warnings by default](https://bugs.ruby-lang.org/issues/17000) * [Feature #16345 Don't emit deprecation warnings by default.](https://bugs.ruby-lang.org/issues/16345) * https://github.com/ruby/ruby/pull/3481 +またこのリリースでは標準添付されている webrick の以下の脆弱性修正を含む新バージョンへの更新も含まれています。 + +* [CVE-2020-25613: Potential HTTP Request Smuggling Vulnerability in WEBrick](/en/news/2019/09/29/http-request-smuggling-cve-2020-25613/) + その他の変更については [commit log](https://github.com/ruby/ruby/compare/v2_7_1...v2_7_2) を参照してください。 ## ダウンロード From 918a72967c635110440bb4770386cd732869547a Mon Sep 17 00:00:00 2001 From: Chikanaga Tomoyuki Date: Fri, 2 Oct 2020 09:41:29 +0900 Subject: [PATCH 0097/1487] fix version number in ja article. --- ja/news/_posts/2020-10-02-ruby-2-7-2-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ja/news/_posts/2020-10-02-ruby-2-7-2-released.md b/ja/news/_posts/2020-10-02-ruby-2-7-2-released.md index 5197837116..9801951c16 100644 --- a/ja/news/_posts/2020-10-02-ruby-2-7-2-released.md +++ b/ja/news/_posts/2020-10-02-ruby-2-7-2-released.md @@ -26,7 +26,7 @@ Ruby 2.7.2 がリリースされました。 ## ダウンロード -{% assign release = site.data.releases | where: "version", "2.7.1" | first %} +{% assign release = site.data.releases | where: "version", "2.7.2" | first %} * <{{ release.url.bz2 }}> From 3c4d9bb78c5b2ffee8539e8dac02cca60616d304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20Ar=C4=B1l=C4=B1k?= Date: Fri, 2 Oct 2020 08:03:12 +0300 Subject: [PATCH 0098/1487] Translate Ruby 3.0.0 Preview 1 Released post (tr) (#2481) * Translate Ruby 3.0.0 Preview 1 Released post (tr) * CRLF -> LF Co-authored-by: Ismail Arilik --- ...2020-09-25-ruby-3-0-0-preview1-released.md | 254 ++++++++++++++++++ 1 file changed, 254 insertions(+) create mode 100644 tr/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md diff --git a/tr/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md b/tr/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md new file mode 100644 index 0000000000..f3df489991 --- /dev/null +++ b/tr/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md @@ -0,0 +1,254 @@ +--- +layout: news_post +title: "Ruby 3.0.0 Önizleme 1 Yayınlandı" +author: "naruse" +translator: "ismailarilik" +date: 2020-09-25 00:00:00 +0000 +lang: tr +--- + +Ruby 3.0.0-preview1'in yayınlandığını duyurmaktan memnuniyet duyuyoruz. + +Bu sürüm birçok yeni özellik ve performans iyileştirmesi içermektedir. + +## RBS + +RBS, Ruby programlarındaki tipleri tanımlamada kullanılan bir dildir. +RBS'yi destekleyen tip kontrol edicileri (tip profil oluşturucuları da dahil) ve diğer araçlar, RBS tanımlamaları ile birlikte Ruby programlarını çok daha iyi anlayacaklardır. + +RBS ile sınıfların ve modüllerin tanımını yazabilirsiniz: bir sınıfta tanımlanmış metodlar, örnek değişkenleri ve bu değişkenlerin tipleri, ve miras/mix-in ilişkisi. +RBS'nin amacı Ruby programlarında sıkça görülen desenleri desteklemektir. +RBS, union tiplerinin de dahil olduğu gelişmiş tipleri, metod aşırı yüklemeyi, ve genelleyicileri yazmaya izin verir. +Ayrıca _arayüz tipleri_ ile ördek tiplemesini de destekler. + +Ruby 3.0 `rbs` gem'i ile gelmektedir, bu gem RBS ile yazılmış tip tanımlarını ayrıştırma ve işlemeye izin verir. + +Aşağıdaki kod RBS için küçük bir örnektir. + +{% highlight rbs %} +module ChatApp + VERSION: String + + class Channel + attr_reader name: String + attr_reader messages: Array[Message] + attr_reader users: Array[User | Bot] # `|`, union tip anlamına gelmektedir, `User` ya da `Bot`. + + def initialize: (String) -> void + + def post: (String, from: User | Bot) -> Message # Metod aşırı yükleme destekleniyor. + | (File, from: User | Bot) -> Message + end +end +{% endhighlight %} + +Daha fazla ayrıntı için [rbs gem'inin README](https://github.com/ruby/rbs)'sine bakınız. + +## Ractor (deneysel) + +Ractor, thread güvenliği endişeleri olmadan paralel çalıştırma özelliğini sağlamak için tasarlanan eşzamanlı soyutlama gibi bir aktör-modeldir. + +Birden fazla ractor yapabilirsiniz ve bunları paralelde çalıştırabilirsiniz. +Ractor thread-güvenli paralel programlar yapmanıza izin verir çünkü ractor'lar normal nesneleri paylaşmazlar. +Ractor'lar arasındaki iletişim mesaj geçirme ile desteklenir. + +Nesnelerin paylaşılmasını kısıtlamak için Ractor, Ruby'nin sözdizimine bazı kısıtlamalar getirir (birden fazla Ractor yoksa, değişiklik yoktur). + +Belirtim ve gerçekleme henüz tam oturmamıştır ve ileride değişecektir, bu sebeple bu özellik deneysel olarak işaretlenmiştir ve eğer bir Ractor oluşturulursa, deneysel özellik uyarısı gösterilir. + +Aşağıdaki küçük program `prime?`'ı iki ractor ile paralelde hesaplar ve iki ya da daha fazla çekirdekte ardışık bir programa göre aşağı yukarı 2 kat daha hızlıdır. + +{% highlight ruby %} +require 'prime' + +# r1 ve r2'deki, tamsayıların gönderildiği n.prime? paralelde çalışır +r1, r2 = *(1..2).map do + Ractor.new do + n = Ractor.recv + n.prime? + end +end + +# parametreleri gönder +r1.send 2**61 - 1 +r2.send 2**61 + 15 + +# 1. ve 2. deyimin sonuçlarını bekle +p r1.take #=> true +p r2.take #=> true +{% endhighlight %} + +Daha fazla ayrıntı için [doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md)'ye bakınız. + +## Zamanlayıcı (Deneysel) + +`Thread#scheduler` bloklayan işlemleri kesmek için tanıtılmıştır. +Bu, var olan kodu değiştirmeden hafif eşzamanlılığa izin verir. + +Şu anda desteklenen sınıf ve metodlar: + +- `Mutex#lock`, `Mutex#unlock`, `Mutex#sleep` +- `ConditionVariable#wait` +- `Queue#pop`, `SizedQueue#push` +- `Thread#join` +- `Kernel#sleep` +- `IO#wait`, `IO#read`, `IO#write` ve ilişkili metodlar (yani `#wait_readable`, `#gets`, `#puts` vb.). +- `IO#select` *desteklenmemektedir*. + +Eşzamanlılık için şu anki giriş noktası `Fiber.schedule{...}`'dır, fakat Ruby 3 yayınlandığı zaman bu durum değişebilir. + +Şu anda [`Async::Scheduler`](https://github.com/socketry/async/pull/56)'da bir test zamanlayıcısı vardır. +Daha fazla ayrıntı için [`doc/scheduler.md`](https://github.com/ruby/ruby/blob/master/doc/scheduler.md)'ye bakınız. [Özellik #16786] + +**DİKKAT**: Bu özellik deneyseldir. +İsim de özellik de sonraki önizleme sürümlerinde değişecektir. + +## Diğer Dikkate Değer Yeni Özellikler + +* Sağ atama ifadesi eklendi. + {% highlight ruby %} + fib(10) => x + p x #=> 55 + {% endhighlight %} + +* Sonsuz metod tanımı eklendi. + {% highlight ruby %} + def square(x) = x * x + {% endhighlight %} + +* Bulma deseni eklendi. + {% highlight ruby %} + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + {% endhighlight %} + +* `Hash#except` şimdi gömülü. + {% highlight ruby %} + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + {% endhighlight %} + +* Hafıza görünümü deneysel bir özellik olarak eklendi. + + * Bu, uzantı kütüphaneleri arasında sayısal bir dizi ve bir biteşlem görüntüsü gibi ham bir hafıza alanını takas etmek için yeni bir C-API'ıdır. + Uzantı kütüphaneleri ayrıca şekil, öğe biçimi, vb. içeren hafıza alanlarının üstverilerini de paylaşır. + Bu gibi üstverileri kullanarak, uzantı kütüphaneleri çok boyutlu dizileri bile uygun şekilde paylaşabilirler. + Bu özellik Python'ın tampon protokolüne danışılarak tasarlanmıştır. + +## Performans iyileştirmeleri + +* Birçok geliştirme MJIT'te gerçeklenmiştir. +Ayrıntılar için NEWS'e bakınız. + +## 2.7'den bu yana diğer dikkate değer değişiklikler + +* Anahtar sözcük argümanları diğer argümanlardan ayrılmıştır. + * Prensipte, Ruby 2.7'de bir uyarı yazdıran kod çalışmayacaktır. + Ayrıntılar için [belgeye](https://www.ruby-lang.org/tr/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/) bakınız. + * Bu arada argüman yönlendirme artık sondaki argümanları da destekliyor. + {% highlight ruby %} + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end + {% endhighlight %} + +* `$SAFE` özelliği tamamiyle silindi; şimdi sadece normal bir global değişken. + +* Geriizleme sırası Ruby 2.5'te tersine çevrildi, fakat bu iptal edildi. +Şimdi Ruby 2.4'teki gibi bir davranış söz konusu; hata mesajı ve istisnanın meydana geldiği satır numarası ilk olarak yazdırılır, daha sonra ise çağırıcıları yazdırılır. + +* Bazı standart kütüphaneler güncellendi. + * RubyGems 3.2.0.rc.1 + * Bundler 2.2.0.rc.1 + * IRB 1.2.6 + * Reline 0.1.5 + +* Aşağıdaki kütüphaneler artık paketlenmiyor. +Bu özellikleri kullanmak için denk gelen gem'leri kurun. + * net-telnet + * xmlrpc + +* Şu varsayılan gem'ler paketlenmiş gem'ler olarak düzenlendi. + * rexml + * rss + +* stdlib varsayılan gemler olarak düzenlendi. +Aşağıdaki varsayılan gem'ler rubygems.org'da yayınlandı. + * abbrev + * base64 + * English + * erb + * find + * io-nonblock + * io-wait + * net-ftp + * net-http + * net-imap + * net-protocol + * nkf + * open-uri + * optparse + * resolv + * resolv-replace + * rinda + * securerandom + * set + * shellwords + * tempfile + * time + * tmpdir + * tsort + * weakref + +Daha fazla ayrıntı için [NEWS](https://github.com/ruby/ruby/blob/v3_0_0_preview1/NEWS.md)'e ya da [işleme loglarına](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0) bakınız. + +{% assign release = site.data.releases | where: "version", "3.0.0-preview1" | first %} + +Bu değişikliklerle birlikte, 2.7.0'dan bu yana [{{ release.stats.files_changed }} dosya değişti, {{ release.stats.insertions }} ekleme(+) yapıldı, {{ release.stats.deletions }} silme(-) yapıldı](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0)! + +Lütfen Ruby 3.0.0-preview1'i deneyin, ve bize herhangi bir geri bildirim verin! + +## İndirin + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## 3.0.0-preview2 tanıtımı + +Bir statik tip ayrıştırması özelliği olan ["type-profiler"](https://github.com/mame/ruby-type-profiler)'ı dahil etmeyi düşünüyoruz. +Takipte kalın! + +## Ruby nedir + +Ruby ilk olarak Matz (Yukihiro Matsumoto) tarafından 1993'te geliştirilmiştir, ve şu anda Açık Kaynak olarak geliştirilmektedir. +Birçok platformda çalışır ve tüm dünyada genellikle web geliştirmesi için kullanılır. From 4aeca61abe06689dd010758400b5c5217302512b Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Fri, 2 Oct 2020 12:17:23 +0700 Subject: [PATCH 0099/1487] Translate Ruby 2.7.1 released news (id) (#2478) --- .../_posts/2020-03-31-ruby-2-7-1-released.md | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 id/news/_posts/2020-03-31-ruby-2-7-1-released.md diff --git a/id/news/_posts/2020-03-31-ruby-2-7-1-released.md b/id/news/_posts/2020-03-31-ruby-2-7-1-released.md new file mode 100644 index 0000000000..80222ae2c6 --- /dev/null +++ b/id/news/_posts/2020-03-31-ruby-2-7-1-released.md @@ -0,0 +1,55 @@ +--- +layout: news_post +title: "Ruby 2.7.1 Dirilis" +author: "naruse" +translator: "meisyal" +date: 2020-03-31 12:00:00 +0000 +lang: id +--- + +Ruby 2.7.1 telah dirilis. + +Rilis ini mencakup perbaikan keamanan. +Mohon cek topik-topik di bawah ini untuk lebih detail. + +* [CVE-2020-10663: Kerentanan Penciptaan Unsafe Object pada JSON (Perbaikan tambahan)]({% link id/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10933: Kerentanan tereksposnya heap pada pustaka socket]({% link id/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) + +Lihat [commit logs](https://github.com/ruby/ruby/compare/v2_7_0...v2_7_1) untuk detail. + +## Unduh + +{% assign release = site.data.releases | where: "version", "2.7.1" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Komentar Rilis + +Banyak *committer*, pengembang, dan pengguna yang telah menyediakan laporan +*bug* membantu kami membuat rilis ini. Terima kasih atas kontribusinya. From ba0cf51ba42d0b805bcf026ff2b94f6c0cec931d Mon Sep 17 00:00:00 2001 From: Chikanaga Tomoyuki Date: Fri, 2 Oct 2020 16:16:09 +0900 Subject: [PATCH 0100/1487] Update _data/releases.yml --- _data/releases.yml | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/_data/releases.yml b/_data/releases.yml index 85157b88a0..39f327ba6d 100644 --- a/_data/releases.yml +++ b/_data/releases.yml @@ -57,33 +57,34 @@ # 2.7 series - version: 2.7.2 - date: 2020-10-01 - post: "/en/news/2020/10/01/ruby-2-7-2-released/" + date: 2020-10-02 + post: "/en/news/2020/10/02/ruby-2-7-2-released/" url: bz2: https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.2.tar.bz2 gz: https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.2.tar.gz xz: https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.2.tar.xz zip: https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.2.zip + size: - bz2: - gz: - xz: - zip: + bz2: 14708724 + gz: 16836767 + xz: 12037052 + zip: 20618242 sha1: - bz2: - gz: - xz: - zip: + bz2: 7e30ca324464eab2f4c2a56d8ab4a37174998062 + gz: cb9731a17487e0ad84037490a6baf8bfa31a09e8 + xz: 82a1fe683460caa8edb6199707f2905634e5ffcc + zip: 9acee3d4e9399c3a2ddc2dd078dd2ee26327cc8f sha256: - bz2: - gz: - xz: - zip: + bz2: 65a590313d244d48dc2ef9a9ad015dd8bc6faf821621bbb269aa7462829c75ed + gz: 6e5706d0d4ee4e1e2f883db9d768586b4d06567debea353c796ec45e8321c3d4 + xz: 1b95ab193cc8f5b5e59d2686cb3d5dcf1ddf2a86cb6950e0b4bdaae5040ec0d6 + zip: c6b8597e5414f2b01a7cb25095319f2b0e780c95a98fee1ccf1ef022acf93dcc sha512: - bz2: - gz: - xz: - zip: + bz2: f07592cce4de3532c0fa1c84d53a134527d28ba95e310cd3487ac321c49ee680faeace285de544ee6db432a90aa7538a1d49ff10c72b235968ca362ef9be621d + gz: e80dc16b60149d0d6fedf0ba7b556ae460ff328ee63e9d9e41f5021f67addcc98159cb27bddccaebd6e4b1cddf29266f1c01c32d9ec8bb665aed63c0a2295f2f + xz: 7972278b096aa768c7adf2befd26003e18781a29ca317640317d30d93d6e963ded197724c8e2f1dfe1e838c5647176d414a74732a62e931fb50d6f2e0f777349 + zip: 5f3a8d78bbd3d9700e5f0434d0cec2072816c02f5d5b55f24d4f9f0621c0c89f796e9ada32ed65f052a321845dd29709a1b76170c7dd0250bea6f8c18953a366 - version: 2.7.1 date: 2020-03-31 From b32f14979025b3312c4fae5a946297ce26494940 Mon Sep 17 00:00:00 2001 From: Chikanaga Tomoyuki Date: Fri, 2 Oct 2020 20:09:01 +0900 Subject: [PATCH 0101/1487] Accelerate release date an hour. --- en/news/_posts/2020-10-02-ruby-2-7-2-released.md | 2 +- ja/news/_posts/2020-10-02-ruby-2-7-2-released.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/en/news/_posts/2020-10-02-ruby-2-7-2-released.md b/en/news/_posts/2020-10-02-ruby-2-7-2-released.md index e09c03c504..b8e5a30b46 100644 --- a/en/news/_posts/2020-10-02-ruby-2-7-2-released.md +++ b/en/news/_posts/2020-10-02-ruby-2-7-2-released.md @@ -3,7 +3,7 @@ layout: news_post title: "Ruby 2.7.2 Released" author: "nagachika" translator: -date: 2020-10-02 12:00:00 +0000 +date: 2020-10-02 11:00:00 +0000 lang: en --- diff --git a/ja/news/_posts/2020-10-02-ruby-2-7-2-released.md b/ja/news/_posts/2020-10-02-ruby-2-7-2-released.md index 9801951c16..4af8516290 100644 --- a/ja/news/_posts/2020-10-02-ruby-2-7-2-released.md +++ b/ja/news/_posts/2020-10-02-ruby-2-7-2-released.md @@ -3,7 +3,7 @@ layout: news_post title: "Ruby 2.7.2 リリース" author: "nagachika" translator: -date: 2020-10-02 12:00:00 +0000 +date: 2020-10-02 11:00:00 +0000 lang: ja --- From 6908ab72ca2829e384d5b42de0b484bacd702ef0 Mon Sep 17 00:00:00 2001 From: Chikanaga Tomoyuki Date: Fri, 2 Oct 2020 20:21:37 +0900 Subject: [PATCH 0102/1487] Fix link for webrick cve article. --- en/news/_posts/2020-10-02-ruby-2-7-2-released.md | 3 +-- ja/news/_posts/2020-10-02-ruby-2-7-2-released.md | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/en/news/_posts/2020-10-02-ruby-2-7-2-released.md b/en/news/_posts/2020-10-02-ruby-2-7-2-released.md index b8e5a30b46..9b7384f515 100644 --- a/en/news/_posts/2020-10-02-ruby-2-7-2-released.md +++ b/en/news/_posts/2020-10-02-ruby-2-7-2-released.md @@ -15,11 +15,10 @@ Please check the topics below for details. * [Feature #17000 2.7.2 turns off deprecation warnings by default](https://bugs.ruby-lang.org/issues/17000) * [Feature #16345 Don't emit deprecation warnings by default.](https://bugs.ruby-lang.org/issues/16345) -* https://github.com/ruby/ruby/pull/3481 This release contains the new version of webrick with a security fix described in the article. -* [CVE-2020-25613: Potential HTTP Request Smuggling Vulnerability in WEBrick](/en/news/2019/09/29/http-request-smuggling-cve-2020-25613/) +* [CVE-2020-25613: Potential HTTP Request Smuggling Vulnerability in WEBrick](/en/news/2020/09/29/http-request-smuggling-cve-2020-25613/) See the [commit logs](https://github.com/ruby/ruby/compare/v2_7_1...v2_7_2) for other changes. diff --git a/ja/news/_posts/2020-10-02-ruby-2-7-2-released.md b/ja/news/_posts/2020-10-02-ruby-2-7-2-released.md index 4af8516290..95be4b84b2 100644 --- a/ja/news/_posts/2020-10-02-ruby-2-7-2-released.md +++ b/ja/news/_posts/2020-10-02-ruby-2-7-2-released.md @@ -16,11 +16,10 @@ Ruby 2.7.2 がリリースされました。 * [Feature #17000 2.7.2 turns off deprecation warnings by default](https://bugs.ruby-lang.org/issues/17000) * [Feature #16345 Don't emit deprecation warnings by default.](https://bugs.ruby-lang.org/issues/16345) -* https://github.com/ruby/ruby/pull/3481 またこのリリースでは標準添付されている webrick の以下の脆弱性修正を含む新バージョンへの更新も含まれています。 -* [CVE-2020-25613: Potential HTTP Request Smuggling Vulnerability in WEBrick](/en/news/2019/09/29/http-request-smuggling-cve-2020-25613/) +* [CVE-2020-25613: Potential HTTP Request Smuggling Vulnerability in WEBrick](/en/news/2020/09/29/http-request-smuggling-cve-2020-25613/) その他の変更については [commit log](https://github.com/ruby/ruby/compare/v2_7_1...v2_7_2) を参照してください。 From 7f00dbf2943c215066d692727f6e9fd3b38d49e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlio=20Campos?= Date: Fri, 2 Oct 2020 10:12:55 -0300 Subject: [PATCH 0103/1487] Improve and fix Ruby 3 preview translation --- pt/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pt/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md b/pt/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md index 9915fd80df..98de94f5c7 100644 --- a/pt/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md +++ b/pt/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md @@ -104,7 +104,7 @@ Atualmente, existe um agendador de teste disponível em [`Async::Scheduler`](htt p x #=> 55 {% endhighlight %} -* A definição de método sem fim foi adicionada. +* A definição de método sem a keyword _end_ foi adicionada. {% highlight ruby %} def square(x) = x * x {% endhighlight %} @@ -232,9 +232,9 @@ Por favor, experimente Ruby 3.0.0-preview1 e nos dê qualquer feedback! SHA256: {{ release.sha256.zip }} SHA512: {{ release.sha512.zip }} -## 3.0.0-preview2 trailer +## Trailer de 3.0.0-preview2 -Planejamos incluir ["type-profiler"] (https://github.com/mame/ruby-type-profiler) que é um recurso de análise de tipo estático. Fique ligado! +Planejamos incluir ["type-profiler"](https://github.com/mame/ruby-type-profiler) que é um recurso de análise de tipo estático. Fique ligado! ## O que é Ruby From b84332dfc6633f341da1f1bcceff391ff00da85a Mon Sep 17 00:00:00 2001 From: Emmanuel Hayford Date: Fri, 2 Oct 2020 16:17:30 +0200 Subject: [PATCH 0104/1487] Improve wording on sentences --- en/news/_posts/2020-10-02-ruby-2-7-2-released.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/en/news/_posts/2020-10-02-ruby-2-7-2-released.md b/en/news/_posts/2020-10-02-ruby-2-7-2-released.md index 9b7384f515..6161d858c7 100644 --- a/en/news/_posts/2020-10-02-ruby-2-7-2-released.md +++ b/en/news/_posts/2020-10-02-ruby-2-7-2-released.md @@ -9,14 +9,14 @@ lang: en Ruby 2.7.2 has been released. -This release contains intentional incompatibility. The deprecated warnings are off by default on 2.7.2 and later. -You can turn on the deprecated warnings by specifing command line option -w or -W:deprecated. +This release contains intentional incompatibility. Deprecation warnings are off by default on 2.7.2 and later. +You can turn on deprecation warnings by specifying the -w or -W:deprecated option at the command-line. Please check the topics below for details. * [Feature #17000 2.7.2 turns off deprecation warnings by default](https://bugs.ruby-lang.org/issues/17000) * [Feature #16345 Don't emit deprecation warnings by default.](https://bugs.ruby-lang.org/issues/16345) -This release contains the new version of webrick with a security fix described in the article. +This release contains the new version of WEBrick with a security fix described in the article. * [CVE-2020-25613: Potential HTTP Request Smuggling Vulnerability in WEBrick](/en/news/2020/09/29/http-request-smuggling-cve-2020-25613/) @@ -56,5 +56,4 @@ See the [commit logs](https://github.com/ruby/ruby/compare/v2_7_1...v2_7_2) for ## Release Comment -Many committers, developers, and users who provided bug reports helped us make this release. -Thanks for their contributions. +Thanks to the many committers, developers and users who provided bug reports and contributions that made this release possible. From e3b19f62d13b24fb729342baf842501614762880 Mon Sep 17 00:00:00 2001 From: Chayoung You Date: Sun, 4 Oct 2020 09:48:41 +0900 Subject: [PATCH 0105/1487] Add rubyapi.org link in documentation section (ko) (#2488) --- ko/documentation/index.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ko/documentation/index.md b/ko/documentation/index.md index 63b67f73c1..3fb9c898a9 100644 --- a/ko/documentation/index.md +++ b/ko/documentation/index.md @@ -89,6 +89,9 @@ lang: ko [APIdock][18] (영문) : 유저의 댓글이 달린 루비, 레일즈, RSpec의 문서입니다. +[Ruby API][40] (영문) +: 루비 클래스, 모듈, 메서드를 편하게 찾고 탐색하세요. + ### 편집기와 IDE 루비를 코딩할 때 운영체제의 기본 편집기를 사용할 수 있습니다. 하지만, @@ -166,6 +169,7 @@ lang: ko [37]: http://www.sublimetext.com/ [38]: https://learncodethehardway.org/ruby/ [39]: http://kapeli.com/dash +[40]: https://rubyapi.org/ [docs-rlo-en]: https://docs.ruby-lang.org/en/ [atom]: https://atom.io/ [vscode]: https://code.visualstudio.com/ From 80cf6ff453b2d22c4b1280e0bb86b420aff97676 Mon Sep 17 00:00:00 2001 From: Chayoung You Date: Sun, 4 Oct 2020 10:30:05 +0900 Subject: [PATCH 0106/1487] Translate "Separation of positional and keyword arguments ..." (ko) (#2487) * Import original article * Translate "Separation of positional and keyword arguments ..." (ko) --- ...ional-and-keyword-arguments-in-ruby-3-0.md | 435 ++++++++++++++++++ 1 file changed, 435 insertions(+) create mode 100644 ko/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md diff --git a/ko/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/ko/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md new file mode 100644 index 0000000000..3d087b3ed5 --- /dev/null +++ b/ko/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -0,0 +1,435 @@ +--- +layout: news_post +title: "루비 3.0의 위치 인자와 키워드 인자 분리" +author: "mame" +translator: "yous" +date: 2019-12-12 12:00:00 +0000 +lang: ko +--- + +루비 3.0에 계획된 키워드 인자에 대한 호환되지 않는 변경에 대해 설명합니다. + +## 요약 + +루비 3.0에서 위치 인자와 키워드 인자는 분리됩니다. 루비 2.7은 루비 3.0에서 +변하는 동작에 대해 경고합니다. 다음 경고를 본다면 코드를 업데이트해야 합니다. + +* `Using the last argument as keyword parameters is deprecated`, 또는 +* `Passing the keyword argument as the last hash parameter is deprecated`, 또는 +* `Splitting the last argument into positional and keyword parameters is deprecated` + +대부분의 경우 _이중 스플랫(double splat)_ 연산자를 추가해서 호환성 문제를 해결할 +수 있습니다. 이는 명시적으로 `Hash` 객체 대신 키워드 인자를 넘깁니다. 마찬가지로 +`{}` 중괄호를 추가해서 명시적으로 키워드 인자 대신 `Hash` 객체를 넘길 수 +있습니다. 자세한 내용은 아래의 '대표 사례' 섹션을 보세요. + +루비 3에서 인자 모두를 델리게이트하는 메서드는 반드시 위치 인자에 더해 키워드 +인자를 명시적으로 델리게이트해야 합니다. 루비 2.7 이전의 위치 인자에 적용되던 +델리게이트 동작을 유지하려면 `ruby2_keywords`를 사용하세요. 자세한 내용은 아래의 +'인자 델리게이트 다루기' 섹션을 보세요. + +## 대표 사례 +{: #typical-cases } + +가장 대표적인 사례입니다. Hash 대신 키워드를 넘기려면 이중 스플랫(double splat) +연산자(`**`)를 사용할 수 있습니다. + +{% highlight ruby %} +# 이 메서드는 키워드 인자 하나만을 받습니다 +def foo(k: 1) + p k +end + +h = { k: 42 } + +# 이 메서드 호출은 Hash 위치 인자 하나를 넘깁니다 +# 루비 2.7: Hash는 자동으로 키워드 인자로 변환됩니다 +# 루비 3.0: 이 호출은 ArgumentError를 발생시킵니다 +foo(h) + # => demo.rb:11: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call + # demo.rb:2: warning: The called method `foo' is defined here + # 42 + +# 루비 3.0에서 동작을 유지하려면 이중 스플랫(double splat)을 사용하세요 +foo(**h) #=> 42 +{% endhighlight %} + +다른 사례입니다. 키워드 대신 명시적으로 Hash를 넘기려면 중괄호(`{}`)를 사용할 수 +있습니다. + +{% highlight ruby %} +# 이 메서드는 위치 인자 하나와 나머지 키워드 인자 하나를 받습니다 +def bar(h, **kwargs) + p h +end + +# 이 호출은 키워드 인자 하나만 넘기고 위치 인자를 넘기지 않습니다 +# 루비 2.7: 키워드는 Hash 위치 인자로 변환됩니다 +# 루비 3.0: 이 호출은 ArgumentError를 발생시킵니다 +bar(k: 42) + # => demo2.rb:9: warning: Passing the keyword argument as the last hash parameter is deprecated + # demo2.rb:2: warning: The called method `bar' is defined here + # {:k=>42} + +# 루비 3.0에서 동작을 유지하려면 중괄호를 써서 명시적인 Hash를 만드세요 +bar({ k: 42 }) # => {:k=>42} +{% endhighlight %} + +## 제거 예정된 기능은 무엇인가요? +{: #what-is-deprecated } + +루비 2에서 키워드 인자는 마지막 Hash 위치 인자로 간주될 수 있고, 마지막 Hash +위치 인자는 키워드 인자로 간주될 수 있습니다. + +이는 마지막 섹션에 설명한 것처럼 자동 변환이 가끔은 너무 복잡하고 힘들기 +때문입니다. 그래서 루비 2.7에서는 제거 예정된 기능이고 루비 3에서 제거됩니다. +다시 말해서, 키워드 인자는 루비 3에서 위치 인자와 완전히 분리됩니다. 키워드 +인자를 넘기고 싶다면 항상 `foo(k: expr)` 또는 `foo(**expr)`를 사용해야 합니다. +키워드 인자를 받고 싶다면 원칙적으로 항상 `def foo(k: default)`, `def foo(k:)`, +`def foo(**kwargs)`를 사용해야 합니다. + +루비 3.0은 키워드 인자를 받지 않는 메서드를 키워드 인자와 함께 호출했을 때 +다르게 동작하지 않습니다. 예를 들어, 다음과 같은 경우는 제거 예정되지 않았고 +루비 3.0에서도 계속 동작합니다. 키워드 인자는 계속 Hash 위치 인자로 간주됩니다. + +{% highlight ruby %} +def foo(kwargs = {}) + kwargs +end + +foo(k: 1) #=> {:k=>1} +{% endhighlight %} + +이는 이런 형태가 굉장히 많이 사용되고, 인자가 어떻게 간주되어야 하는지에 대한 +모호함이 없기 때문입니다. 이런 변환을 금지하면 추가적인 호환성 문제가 생기는 데 +반해 얻는 이득은 작습니다. + +하지만 이런 형태를 새 코드에 사용하는 건 추천하지 않습니다. Hash를 위치 인자로 +넘기면서 키워드 인자를 사용하는 게 자주 있는 일이 아니라면 말이죠. 그 대신 이중 +스플랫(double splat)을 사용하세요. + +{% highlight ruby %} +def foo(**kwargs) + kwargs +end + +foo(k: 1) #=> {:k=>1} +{% endhighlight %} + +## 제 코드가 루비 2.7에서 동작하지 않게 되나요? +{: #break-on-ruby-2-7 } + +짧게 대답하자면 '아마도 아닙니다'. + +루비 2.7의 변경은 3.0으로 옮기는 과정이 되도록 디자인되었습니다. 원칙적으로 루비 +2.7은 루비 3에서 변경될 동작에 대해 경고만 하지만, 사소하다고 생각되는 몇몇 +호환되지 않는 변경도 포함하고 있습니다. 자세한 내용은 '그 외 사소한 변경' +섹션을 보세요. + +경고와 사소한 변경을 제외하고, 루비 2.7은 루비 2.6과 호환성을 유지하려고 +했습니다. 여러분의 코드는 경고를 발생시킬지는 몰라도 아마 루비 2.7에서도 동작할 +겁니다. 루비 2.7에서 코드를 실행하는 것으로 여러분의 코드가 루비 3.0에 대해 +준비되었는지 확인할 수 있습니다. + +제거 예정 경고를 끄고 싶다면 커맨드 라인 인자`-W:no-deprecated`를 사용하거나, +코드에 `Warning[:deprecated] = false`를 추가하세요. + +## 인자 델리게이트 다루기 +{: #delegation } + +### 루비 2.6 이전 +{: #delegation-ruby-2-6-or-prior } + +루비 2에서는 `*rest` 인자와 `&block` 인자를 받아 대상 메서드에 넘기는 델리게이트 +메서드를 만들 수 있습니다. 여기에서 키워드 인자는 암묵적으로 위치 인자나 키워드 +인자로 자동 변환되어 처리됩니다. + +{% highlight ruby %} +def foo(*args, &block) + target(*args, &block) +end +{% endhighlight %} + +### 루비 3 +{: #delegation-ruby-3 } + +키워드 인자를 명시적으로 델리게이트해야 합니다. + +{% highlight ruby %} +def foo(*args, **kwargs, &block) + target(*args, **kwargs, &block) +end +{% endhighlight %} + +루비 2.6 이전 버전과의 호환성이 필요하지 않고 아무 인자도 수정하지 않는다면 루비 +2.7에서 도입된 새로운 델리게이트 문법(`...`)을 사용할 수 있습니다. + +{% highlight ruby %} +def foo(...) + target(...) +end +{% endhighlight %} + +### 루비 2.7 +{: #delegation-ruby-2-7 } + +요약: `Module#ruby2_keywords`를 사용하고 `*args, &block`을 델리게이트하세요. + +{% highlight ruby %} +ruby2_keywords def foo(*args, &block) + target(*args, &block) +end +{% endhighlight %} + +`ruby2_keywords`는 키워드 인자를 마지막 Hash 인자로 받고, 다른 메서드를 호출할 +때 이를 키워드 인자로 넘깁니다. + +사실 루비 2.7은 많은 경우에 새로운 형태의 델리게이트를 허용하지만, 알려진 예외가 +있습니다. 다음 섹션을 보세요. + +### 루비 2.6, 2.7, 루비 3에서 호환되는 델리게이트 +{: #a-compatible-delegation } + +요약: 이번에도 `Module#ruby2_keywords`를 사용하세요. + +{% highlight ruby %} +ruby2_keywords def foo(*args, &block) + target(*args, &block) +end +{% endhighlight %} + +안타깝게도 루비 2.6 이전 버전은 새로운 형태의 델리게이트를 제대로 처리할 수 없기 +때문에 예전 형태의 델리게이트(즉, `**kwargs` 없음)를 사용해야 합니다. 이는 +키워드 인자를 분리하게 된 이유 중 하나입니다. 자세한 내용은 마지막 섹션에 +설명되어 있습니다. `ruby2_keywords`는 루비 2.7과 3.0에서도 예전 형태가 동작하게 +합니다. 루비 2.6 이전 버전엔 `ruby2_keywords`가 정의되어 있지 않기 때문에, +[ruby2_keywords 젬](https://rubygems.org/gems/ruby2_keywords)을 사용하거나 직접 +정의하세요. + +{% highlight ruby %} +def ruby2_keywords(*) +end if RUBY_VERSION < "2.7" +{% endhighlight %} + +--- + +코드가 루비 2.6 이전 버전에서 동작할 필요가 없다면 루비 2.7에 도입된 새로운 +형태를 시도해보세요. 대부분의 경우에 동작하지만, 안타깝게도 다음 예외가 +존재합니다. + +{% highlight ruby %} +def target(*args) + p args +end + +def foo(*args, **kwargs, &block) + target(*args, **kwargs, &block) +end + +foo({}) #=> 루비 2.7: [] ({}는 무시됩니다) +foo({}, **{}) #=> 루비 2.7: [{}] (명시적으로 키워드 '없이' 넘겨서 {}를 넘길 수 있습니다) +{% endhighlight %} + +빈 Hash 인자는 자동으로 변환되어 `**kwargs`에 병합됩니다. 델리게이트 호출은 빈 +키워드 해시를 제거하여 `target`에는 아무 인자도 넘기지 않습니다. 우리가 아는 한 +예외는 이것뿐입니다. + +마지막 줄에서 언급한 것처럼 이 문제는 `**{}`를 사용해서 해결할 수 있습니다. + +이식성이 걱정된다면 `ruby2_keywords`를 사용하세요.(루비 2.6 이전 버전은 키워드 +인자에 관한 예외가 굉장히 많다는 걸 알아두세요. :-) +`ruby2_keywords`는 루비 2.6이 유지보수 종료된 후 제거될 수 있습니다. 그 시점에는 +키워드 인자를 명시적으로 델리게이트하는 것을 추천합니다(위의 루비 3 코드를 +보세요). + +## 그 외 사소한 변경 +{: #other-minor-changes } + +루비 2.7에 키워드 인자와 관련된 사소한 변경 세 가지가 있습니다. + +### 1. 키워드 인자에 Symbol이 아닌 키 허용 +{: #other-minor-changes-non-symbol-keys } + +루비 2.6 이전 버전은 키워드 인자에 Symbol 키만 사용할 수 있습니다. 루비 +2.7에서는 키워드 인자에 Symbol이 아닌 키를 사용할 수 있습니다. + +{% highlight ruby %} +def foo(**kwargs) + kwargs +end +foo("key" => 42) + #=> 루비 2.6 이전: ArgumentError: wrong number of arguments + #=> 루비 2.7 이후: {"key"=>42} +{% endhighlight %} + +메서드가 옵셔널 인자와 키워드 인자 모두 받는 경우, 루비 2.6에서 Symbol 키와 +Symbol이 아닌 키 모두를 갖고 있는 Hash는 둘로 나뉘었습니다. 루비 2.7에서는 +Symbol이 아닌 키를 허용하기 때문에 둘 다 키워드로 받습니다. + +{% highlight ruby %} +def bar(x=1, **kwargs) + p [x, kwargs] +end + +bar("key" => 42, :sym => 43) + #=> 루비 2.6: [{"key"=>42}, {:sym=>43}] + #=> 루비 2.7: [1, {"key"=>42, :sym=>43}] + +# 동작을 유지하려면 중괄호를 사용하세요 +bar({"key" => 42}, :sym => 43) + #=> 루비 2.6 및 2.7: [{"key"=>42}, {:sym=>43}] +{% endhighlight %} + +루비 2.7은 명시적 키워드를 받지만 나머지 키워드 인자(`**kwargs`)는 받지 않는 +메서드를, Symbol과 Symbol이 아닌 키 모두를 갖는 Hash 또는 키워드 인자를 넘겨 +호출한 경우 여전히 해시를 나누고 경고를 발생시킵니다. 이 동작은 루비 3에서 +제거되고 `ArgumentError`를 발생시킵니다. + +{% highlight ruby %} +def bar(x=1, sym: nil) + p [x, sym] +end + +bar("key" => 42, :sym => 43) +# 루비 2.6 및 2.7: => [{"key"=>42}, 43] +# 루비 2.7: warning: Splitting the last argument into positional and keyword parameters is deprecated +# warning: The called method `bar' is defined here +# 루비 3.0: ArgumentError +{% endhighlight %} + +### 2. 이중 스플랫(double splat)을 사용한 빈 해시(`**{}`)는 아무 인자도 넘기지 않음 +{: #other-minor-changes-empty-hash } + +루비 2.6 이전 버전은 `**empty_hash`를 넘기면 위치 인자로 빈 Hash를 넘깁니다. +루비 2.7 이후 버전은 아무 인자도 넘기지 않습니다. + +{% highlight ruby %} +def foo(*args) + args +end + +empty_hash = {} +foo(**empty_hash) + #=> 루비 2.6 이전: [{}] + #=> 루비 2.7 이후: [] +{% endhighlight %} + +`foo(**{})`는 루비 2.6과 2.7 모두 아무것도 넘기지 않습니다. 루비 2.6 이전 버전은 +파서에 의해 `**{}`를 제거하고, 루비 2.7 이후 버전은 `**empty_hash`와 동일하게 +간주되어, 메서드에 아무 키워드 인자도 넘기지 않는 쉬운 방법을 제공합니다. + +루비 2.7에서는 필요한 위치 인자 개수보다 적은 인자를 넘겨 메서드를 호출했을 때, +루비 2.6과의 호환성을 위해 `foo(**empty_hash)`에서 빈 해시를 넘기고 경고를 +발생시킵니다. 이 동작은 3.0에서 제거됩니다. + +{% highlight ruby %} +def foo(x) + x +end + +empty_hash = {} +foo(**empty_hash) + #=> 루비 2.6 이전: {} + #=> 루비 2.7: warning: Passing the keyword argument as the last hash parameter is deprecated + # warning: The called method `foo' is defined here + #=> 루비 3.0: ArgumentError: wrong number of arguments +{% endhighlight %} + +### 3. 키워드 인자 없음 문법(`**nil`) 도입 +{: #other-minor-changes-double-splat-nil } + +메서드가 키워드 인자를 받지 않는다는 것을 명시적으로 나타내기 위해 메서드 정의에 `**nil`을 사용할 수 있습니다. 이러한 메서드를 키워드 인자와 함께 호출하면 `ArgumentError`가 발생합니다.(이건 새 기능이고, 호환되지 않는 기능이 아닙니다) + +{% highlight ruby %} +def foo(*args, **nil) +end + +foo(k: 1) + #=> 루비 2.7 이후: no keywords accepted (ArgumentError) +{% endhighlight %} + +메서드가 키워드 인자를 받지 않는다는 것을 명시적으로 만들 때 유용합니다. 이렇게 +하지 않으면 위의 예제에서 키워드는 나머지 인자에 병합됩니다. 메서드가 키워드 +인자를 받도록 확장하면 메서드는 다음과 같은 호환성 문제를 갖게 될 수 있습니다. + +{% highlight ruby %} +# 메서드가 나머지 인자를 받고 `**nil`이 없는 경우 +def foo(*args) + p args +end + +# 키워드를 넘기면 Hash 객체로 변환됩니다(루비 3.0도 마찬가지) +foo(k: 1) #=> [{:k=>1}] + +# 메서드가 키워드를 받도록 확장된 경우 +def foo(*args, mode: false) + p args +end + +# 기존의 호출이 동작하지 않을 수 있습니다 +foo(k: 1) #=> ArgumentError: unknown keyword k +{% endhighlight %} + +## 자동 변환이 제거 예정된 이유 +{: #why-deprecated } + +처음에 자동 변환은 좋은 아이디어처럼 보였고, 많은 경우에 잘 동작했습니다. 하지만 +너무 많은 예외가 존재했고, 이 동작에 관한 많은 버그 제보를 받았습니다. + +자동 변환은 메서드가 옵셔널 위치 인자와 키워드 인자를 받는 경우 잘 동작하지 +않습니다. 어떤 사람들은 마지막 Hash 객체가 위치 인자로 간주될 거라고 생각하고, +또 어떤 사람들은 키워드 인자로 변환될 거라고 생각합니다. + +이는 가장 헷갈리는 경우 중 하나입니다. + +{% highlight ruby %} +def foo(x, **kwargs) + p [x, kwargs] +end + +def bar(x=1, **kwargs) + p [x, kwargs] +end + +foo({}) => [{}, {}] +bar({}) => [1, {}] + +bar({}, **{}) => expected: [{}, {}], actual: [1, {}] +{% endhighlight %} + +루비 2에서 `foo({})`는 빈 해시를 일반적인 인자로 넘기지만(즉, `{}`는 `x`에 대입됩니다), `bar({})`는 키워드 인자를 넘깁니다(즉, `{}`는 `kwargs`에 대입됩니다). 그래서 `any_method({})`는 굉장히 모호합니다. + +`bar({}, **{})`가 빈 해시를 명시적으로 `x`에 넘길 거라고 생각할 수 있습니다. 놀랍게도 이는 생각한 대로 동작하지 않고 루비 2.6에서 여전히 `[1, {}]`를 출력합니다. 루비 2.6에서 `**{}`가 파서에 의해 무시되고, 첫 번째 인자 `{}`는 키워드(`**kwargs`)로 자동 변환되기 때문입니다. 이 경우에 `bar({}, {})`를 호출해야 하는데, 아주 이상하죠. + +같은 문제가 나머지 인자와 키워드 인자를 받는 메서드에도 적용됩니다. 이는 키워드 인자의 명시적인 델리게이트가 동작하지 않게 합니다. + +{% highlight ruby %} +def target(*args) + p args +end + +def foo(*args, **kwargs, &block) + target(*args, **kwargs, &block) +end + +foo() #=> 루비 2.6 이전: [{}] + #=> 루비 2.7 이후: [] +{% endhighlight %} + +`foo()`는 아무 인자도 넘기지 않지만 루비 2.6에서 `target`은 빈 해시 인자를 +받습니다. `foo` 메서드가 키워드(`**kwargs`)를 명시적으로 델리게이트하기 +때문입니다. `foo()`가 호출되었을 때 `args`는 빈 Array, `kwargs`는 빈 Hash, +`block`은 `nil`입니다. 그 후 `target(*args, **kwargs, &block)`은 빈 Hash를 +인자로 넘기는데, `**kwargs`가 Hash 위치 인자로 자동 변환되기 때문입니다. + +자동 변환은 사람을 혼란스럽게 할 뿐만 아니라 메서드의 확장성도 떨어뜨립니다. 이 +동작 변경에 대한 근거와 구현과 관련된 선택이 이루어진 이유에 대한 자세한 내용은 +[[Feature #14183]](https://bugs.ruby-lang.org/issues/14183)을 보세요. + +## 감사의 글 + +이 글을 리뷰해 준(그리고 같이 작성해 준) Jeremy Evans와 Benoit Daloze에게 감사를 표합니다. + +## 수정 이력 + +* 2019-12-25 수정: 2.7.0-rc2에서 경고 메시지가 약간 수정되었고, 경고를 끄는 API를 추가했습니다. From 186710566c7473db3b41e7d1eeeb4ed22803076a Mon Sep 17 00:00:00 2001 From: Chayoung You Date: Sun, 4 Oct 2020 10:31:26 +0900 Subject: [PATCH 0107/1487] Translate "CVE-2020-10933: Heap exposure ..." (ko) (#2490) * Import original article * Translate "CVE-2020-10933: Heap exposure ..." (ko) * Apply suggestions --- ...-heap-exposure-in-socket-cve-2020-10933.md | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 ko/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md diff --git a/ko/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md b/ko/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md new file mode 100644 index 0000000000..d7ea9f9678 --- /dev/null +++ b/ko/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md @@ -0,0 +1,38 @@ +--- +layout: news_post +title: "CVE-2020-10933: 소켓 라이브러리의 힙 메모리 노출 취약점" +author: "mame" +translator: "yous" +date: 2020-03-31 12:00:00 +0000 +tags: security +lang: ko +--- + +소켓 라이브러리에서 힙 메모리 노출 취약점이 발견되었습니다. +이 취약점에 [CVE-2020-10933](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10933)이 할당되었습니다. +루비를 업그레이드하는 것을 강력히 권장합니다. + +## 세부 내용 + +`BasicSocket#recv_nonblock`과 `BasicSocket#read_nonblock`이 크기와 버퍼 인자와 +함께 호출되었을 때, 버퍼를 지정한 크기로 재조정합니다. 작업이 블로킹될 것 같으면 +아무 데이터도 복사하지 않고 반환합니다. 이 때문에 버퍼 문자열은 힙의 임의의 +데이터를 포함하고 있고, 인터프리터의 민감한 데이터가 노출될 수 있습니다. + +이 문제는 Linux에서만 공격 가능합니다. 루비 2.5.0부터 존재한 문제고, 2.4 +버전대는 취약하지 않습니다. + +## 해당 버전 + +* 루비 2.5 버전대: 2.5.7 이하 +* 루비 2.6 버전대: 2.6.5 이하 +* 루비 2.7 버전대: 2.7.0 +* 61b7f86248bd121be2e83768be71ef289e8e5b90 커밋 전의 master + +## 도움을 준 사람 + +이 문제를 발견해 준 Samuel Williams에게 감사를 표합니다. + +## 수정 이력 + +* 2020-03-31 12:00:00 (UTC) 최초 공개 From 2d8731b482719b4573b887eb178cc2664b82bd41 Mon Sep 17 00:00:00 2001 From: Chayoung You Date: Sun, 4 Oct 2020 10:31:58 +0900 Subject: [PATCH 0108/1487] Translate "CVE-2020-10663: Unsafe Object Creation ..." (ko) (#2489) * Import original article * Translate "CVE-2020-10663: Unsafe Object Creation ..." (ko) * Apply suggestion --- .../2020-03-19-json-dos-cve-2020-10663.md | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 ko/news/_posts/2020-03-19-json-dos-cve-2020-10663.md diff --git a/ko/news/_posts/2020-03-19-json-dos-cve-2020-10663.md b/ko/news/_posts/2020-03-19-json-dos-cve-2020-10663.md new file mode 100644 index 0000000000..091a28062d --- /dev/null +++ b/ko/news/_posts/2020-03-19-json-dos-cve-2020-10663.md @@ -0,0 +1,45 @@ +--- +layout: news_post +title: "CVE-2020-10663: JSON의 안전하지 않은 객체 생성 취약점(추가 수정)" +author: "mame" +translator: "yous" +date: 2020-03-19 13:00:00 +0000 +tags: security +lang: ko +--- + +루비에 포함된 json 젬에 안전하지 않은 객체 생성 취약점이 있습니다. +이 취약점에 [CVE-2020-10663](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10663)이 할당되었습니다. +json 젬을 업그레이드하는 것을 강력히 권장합니다. + +## 세부 내용 + +특정 JSON 문서를 파싱할 때, json 젬(루비에 포함된 젬을 포함해서)이 대상 시스템에 +임의의 객체를 생성하도록 강요될 수 있습니다. + +이는 [CVE-2013-0269](https://www.ruby-lang.org/en/news/2013/02/22/json-dos-cve-2013-0269/)와 +같은 문제입니다. 이전 수정이 완전하지 않아서 `JSON.parse(user_input)`는 고쳤지만 +`JSON(user_input)`과 `JSON.parse(user_input, nil)`을 포함한 다른 유형의 JSON +파싱은 고치지 않았습니다. + +자세한 내용은 +[CVE-2013-0269](https://www.ruby-lang.org/en/news/2013/02/22/json-dos-cve-2013-0269/)를 +참조하세요. 이 문제는 가비지 컬렉션이 불가능한 Symbol 객체를 다수 생성하여 +서비스 거부 공격(DoS)을 일으키도록 공격할 수 있었습니다. 하지만 Symbol 객체가 +가비지 컬렉션이 가능해져서 이런 유형의 공격은 더 이상 가능하지 않습니다. + +json 젬을 2.3.0 이후 버전으로 업데이트해주세요. `gem update json`으로 업데이트할 +수 있습니다. bundler를 사용한다면 `Gemfile`에 `gem "json", ">= 2.3.0"`을 +추가하세요. + +## 해당 버전 + +* JSON 젬 2.2.0 이하 + +## 도움을 준 사람 + +이 문제를 발견해 준 Jeremy Evans에게 감사를 표합니다. + +## 수정 이력 + +* 2020-03-19 13:00:00 (UTC) 최초 공개 From ef56b99111edbafb454d4b39a3bfff021c47a0fc Mon Sep 17 00:00:00 2001 From: Chayoung You Date: Sun, 4 Oct 2020 13:29:04 +0900 Subject: [PATCH 0109/1487] Translate 2020-03-31 news (ko) (#2491) * Import original articles * Translate 2020-03-31 news (ko) --- .../_posts/2020-03-31-ruby-2-4-10-released.md | 55 +++++++++++++++++++ .../_posts/2020-03-31-ruby-2-5-8-released.md | 54 ++++++++++++++++++ .../_posts/2020-03-31-ruby-2-6-6-released.md | 55 +++++++++++++++++++ .../_posts/2020-03-31-ruby-2-7-1-released.md | 55 +++++++++++++++++++ 4 files changed, 219 insertions(+) create mode 100644 ko/news/_posts/2020-03-31-ruby-2-4-10-released.md create mode 100644 ko/news/_posts/2020-03-31-ruby-2-5-8-released.md create mode 100644 ko/news/_posts/2020-03-31-ruby-2-6-6-released.md create mode 100644 ko/news/_posts/2020-03-31-ruby-2-7-1-released.md diff --git a/ko/news/_posts/2020-03-31-ruby-2-4-10-released.md b/ko/news/_posts/2020-03-31-ruby-2-4-10-released.md new file mode 100644 index 0000000000..bc42919611 --- /dev/null +++ b/ko/news/_posts/2020-03-31-ruby-2-4-10-released.md @@ -0,0 +1,55 @@ +--- +layout: news_post +title: "루비 2.4.10 릴리스" +author: "usa" +translator: "yous" +date: 2020-03-31 12:00:00 +0000 +lang: ko +--- + +루비 2.4.10이 릴리스되었습니다. + +이 릴리스는 보안 수정을 포함합니다. 자세한 사항은 아래 글을 확인해보세요. + +* [CVE-2020-10663: JSON의 안전하지 않은 객체 생성 취약점(추가 수정)]({% link ko/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) + +루비 2.4는 현재 보안 유지보수 단계이고, 기한은 2020년 3월입니다. +이날 이후 루비 2.4의 유지보수는 종료됩니다. +따라서 이번 릴리스가 루비 2.4 버전대의 마지막 릴리스가 될 것입니다. +루비 2.7, 2.6, 2.5 등의 새 루비 버전으로 즉시 업그레이드하기 바랍니다. + +## 다운로드 + +{% assign release = site.data.releases | where: "version", "2.4.10" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## 릴리스 코멘트 + +이 릴리스를 만드는 데 도움을 준 모든 분, 특히 취약점을 보고해 준 분에게 감사드립니다. diff --git a/ko/news/_posts/2020-03-31-ruby-2-5-8-released.md b/ko/news/_posts/2020-03-31-ruby-2-5-8-released.md new file mode 100644 index 0000000000..23df1b794c --- /dev/null +++ b/ko/news/_posts/2020-03-31-ruby-2-5-8-released.md @@ -0,0 +1,54 @@ +--- +layout: news_post +title: "루비 2.5.8 릴리스" +author: "usa" +translator: "yous" +date: 2020-03-31 12:00:00 +0000 +lang: ko +--- + +루비 2.5.8이 릴리스되었습니다. + +이 릴리스는 보안 수정을 포함합니다. +자세한 사항은 아래 글을 확인해보세요. + +* [CVE-2020-10663: JSON의 안전하지 않은 객체 생성 취약점(추가 수정)]({% link ko/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10933: 소켓 라이브러리의 힙 메모리 노출 취약점]({% link ko/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) + +자세한 내용은 [커밋 로그](https://github.com/ruby/ruby/compare/v2_5_7...v2_5_8)를 확인해주세요. + +## 다운로드 + +{% assign release = site.data.releases | where: "version", "2.5.8" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## 릴리스 코멘트 + +이 릴리스를 만드는 데 도움을 준 모든 분, 특히 취약점을 보고해 준 분에게 감사드립니다. diff --git a/ko/news/_posts/2020-03-31-ruby-2-6-6-released.md b/ko/news/_posts/2020-03-31-ruby-2-6-6-released.md new file mode 100644 index 0000000000..9824f89e2f --- /dev/null +++ b/ko/news/_posts/2020-03-31-ruby-2-6-6-released.md @@ -0,0 +1,55 @@ +--- +layout: news_post +title: "루비 2.6.6 릴리스" +author: "nagachika" +translator: "yous" +date: 2020-03-31 12:00:00 +0000 +lang: ko +--- + +루비 2.6.6이 릴리스되었습니다. + +이 릴리스는 보안 수정을 포함합니다. +자세한 사항은 아래 글을 확인해보세요. + +* [CVE-2020-10663: JSON의 안전하지 않은 객체 생성 취약점(추가 수정)]({% link ko/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10933: 소켓 라이브러리의 힙 메모리 노출 취약점]({% link ko/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) + +자세한 내용은 [커밋 로그](https://github.com/ruby/ruby/compare/v2_6_5...v2_6_6)를 확인해주세요. + +## 다운로드 + +{% assign release = site.data.releases | where: "version", "2.6.6" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## 릴리스 코멘트 + +많은 커미터, 개발자, 버그를 보고해 준 사용자들이 이 릴리스를 만드는 데 도움을 주었습니다. +그들의 기여에 감사드립니다. diff --git a/ko/news/_posts/2020-03-31-ruby-2-7-1-released.md b/ko/news/_posts/2020-03-31-ruby-2-7-1-released.md new file mode 100644 index 0000000000..2d76cb90e5 --- /dev/null +++ b/ko/news/_posts/2020-03-31-ruby-2-7-1-released.md @@ -0,0 +1,55 @@ +--- +layout: news_post +title: "루비 2.7.1 릴리스" +author: "naruse" +translator: "yous" +date: 2020-03-31 12:00:00 +0000 +lang: ko +--- + +루비 2.7.1이 릴리스되었습니다. + +이 릴리스는 보안 수정을 포함합니다. +자세한 사항은 아래 글을 확인해보세요. + +* [CVE-2020-10663: JSON의 안전하지 않은 객체 생성 취약점(추가 수정)]({% link ko/news/_posts/2020-03-19-json-dos-cve-2020-10663.md %}) +* [CVE-2020-10933: 소켓 라이브러리의 힙 메모리 노출 취약점]({% link ko/news/_posts/2020-03-31-heap-exposure-in-socket-cve-2020-10933.md %}) + +자세한 내용은 [커밋 로그](https://github.com/ruby/ruby/compare/v2_7_0...v2_7_1)를 확인해주세요. + +## 다운로드 + +{% assign release = site.data.releases | where: "version", "2.7.1" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## 릴리스 코멘트 + +많은 커미터, 개발자, 버그를 보고해 준 사용자들이 이 릴리스를 만드는 데 도움을 주었습니다. +그들의 기여에 감사드립니다. From 83034d89f48ad51dd11e2f1f17ac9a439102b329 Mon Sep 17 00:00:00 2001 From: Emmanuel Hayford Date: Sun, 4 Oct 2020 10:04:32 +0200 Subject: [PATCH 0110/1487] Fix webrick gem name --- en/news/_posts/2020-10-02-ruby-2-7-2-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/news/_posts/2020-10-02-ruby-2-7-2-released.md b/en/news/_posts/2020-10-02-ruby-2-7-2-released.md index 6161d858c7..921aae2d50 100644 --- a/en/news/_posts/2020-10-02-ruby-2-7-2-released.md +++ b/en/news/_posts/2020-10-02-ruby-2-7-2-released.md @@ -16,7 +16,7 @@ Please check the topics below for details. * [Feature #17000 2.7.2 turns off deprecation warnings by default](https://bugs.ruby-lang.org/issues/17000) * [Feature #16345 Don't emit deprecation warnings by default.](https://bugs.ruby-lang.org/issues/16345) -This release contains the new version of WEBrick with a security fix described in the article. +This release contains the new version of webrick with a security fix described in the article. * [CVE-2020-25613: Potential HTTP Request Smuggling Vulnerability in WEBrick](/en/news/2020/09/29/http-request-smuggling-cve-2020-25613/) From f28cdd31521ba0295c7c594977a5431f9539ad25 Mon Sep 17 00:00:00 2001 From: Shia Date: Tue, 6 Oct 2020 07:50:50 +0900 Subject: [PATCH 0111/1487] Translate 2020-04-05-support-of-ruby-2-4-has-ended (ko) (#2495) * Copy from en * Translate 2020-04-05-support-of-ruby-2-4-has-ended(ko) * Update ko/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md Co-authored-by: Chayoung You Co-authored-by: Chayoung You --- ...020-04-05-support-of-ruby-2-4-has-ended.md | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 ko/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md diff --git a/ko/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md b/ko/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md new file mode 100644 index 0000000000..3e25818a0e --- /dev/null +++ b/ko/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md @@ -0,0 +1,39 @@ +--- +layout: news_post +title: "루비 2.4 유지보수 종료" +author: "usa" +translator: "shia" +date: 2020-04-05 12:00:00 +0000 +lang: ko +--- + +루비 2.4 시리즈의 모든 유지보수가 종료됩니다. + +작년 3월 말 이후로 루비 2.4 시리즈는 보안 유지보수 단계였습니다. +이제 1년이 지나 이 단계가 종료됩니다. +그러므로 2020년 3월 31일을 기점으로 루비 2.4 시리즈의 모든 유지보수가 종료됩니다. +버그 수정, 보안 패치는 더 이상 2.4에 백포트되지 않으며, 더 이상 패치가 릴리스되지 않습니다. +루비 2.4.10이 2020년 3월 31일에 릴리스되었습니다만, 이는 새 버전으로 넘어가기 위한 +시간을 조금 더 주기 위함입니다. +가능한 한 빠르게 새 버전의 루비로 업그레이드하시길 강력히 권합니다. + +## 현재 유지보수 중인 루비 버전에 대해 + +### 루비 2.7 시리즈 + +현재 일반 유지보수 단계입니다. +버그 수정을 백포트하며, 필요한 시점에 이를 포함한 릴리스가 이루어집니다. +그리고 심각한 보안 문제가 발견되면 이를 위한 긴급 패치를 릴리스할 것입니다. + +### 루비 2.6 시리즈 + +현재 일반 유지보수 단계입니다. +버그 수정을 백포트하며, 필요한 시점에 이를 포함한 릴리스가 이루어집니다. +그리고 심각한 보안 문제가 발견되면 이를 위한 긴급 패치를 릴리스할 것입니다. + +### 루비 2.5 시리즈 + +현재 보안 유지보수 단계입니다. +보안 패치를 제외한 어떠한 버그 수정도 루비 2.5에 백포트되지 않을 것입니다. +심각한 보안 문제가 발견되면 이를 위한 긴급 패치를 릴리스할 것입니다. +루비 2.5의 유지보수 종료는 2021년 3월 말로 계획되어 있습니다. From 86ee82dd92a699b1a81bfbff03f9651e090a1274 Mon Sep 17 00:00:00 2001 From: Shia Date: Tue, 6 Oct 2020 07:51:09 +0900 Subject: [PATCH 0112/1487] Translate 2020-07-16-fukuoka-ruby-award-2021 (ko) (#2496) * co {en,ko}/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md * Translate 2020-07-16-fukuoka-ruby-award-2021 (ko) * Update ko/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md Co-authored-by: Chayoung You Co-authored-by: Chayoung You --- .../2020-07-16-fukuoka-ruby-award-2021.md | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 ko/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md diff --git a/ko/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md b/ko/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md new file mode 100644 index 0000000000..3a82a152bd --- /dev/null +++ b/ko/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md @@ -0,0 +1,37 @@ +--- +layout: news_post +title: "2021 후쿠오카 루비 경진대회 - Matz가 심사합니다" +author: "Fukuoka Ruby" +translator: "shia" +date: 2020-07-16 00:00:00 +0000 +lang: ko +--- + +루비스트 여러분께, + +일본 후쿠오카 현은 'Matz' 마츠모토 씨와 함께 여러분을 다음 경진대회에 초대합니다. +흥미로운 루비 프로그램을 개발하셨다면 한번 지원해보세요. + +2021 후쿠오카 루비 경진대회 - 대상 - 백만 엔! + +접수 마감: 2020년 12월 4일 + +![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) + +Matz를 포함한 패널들이 후쿠오카 경진대회의 우승자를 선택합니다. +후쿠오카 경진대회의 대상에게는 백만 엔의 상금이 주어집니다. +이전 이 대회의 우승자로는 Rhomobile(미국)과 APEC 기후 센터(한국)가 있습니다. + +대회에 참가하는 프로그램은 완전히 루비로 작성될 필요는 없습니다. +하지만 루비의 특징을 살려야 합니다. + +프로그램은 지난 12개월 동안 개발되거나 업데이트된 것만이 유효합니다. +추가 설명이나 참가를 원하신다면 다음 웹사이트를 방문하세요. + +[http://www.digitalfukuoka.jp/events/226](http://www.digitalfukuoka.jp/events/226) + +지원서는 award@f-ruby.com으로 보내주세요. + +"Matz는 코드를 주의깊게 테스트하고 읽어볼 것이므로, 지원할 만한 충분한 가치가 있을 것입니다! 대회 참가는 무료입니다." + +감사합니다! From 7457d77b09f80b916b4ae6918231a2fcf59780c3 Mon Sep 17 00:00:00 2001 From: Shia Date: Wed, 7 Oct 2020 13:06:50 +0900 Subject: [PATCH 0113/1487] Translate 2020-10-02-ruby-2-7-2-released.md (ko) (#2498) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * cp {en,ko}/news/_posts/2020-10-02-ruby-2-7-2-released.md * Translate 2020-10-02-ruby-2-7-2-released.md (ko) * %s/밀수/스머글링/g * %s/폐기 경고/폐기 예정 경고/g * Fix translation --- .../_posts/2020-10-02-ruby-2-7-2-released.md | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 ko/news/_posts/2020-10-02-ruby-2-7-2-released.md diff --git a/ko/news/_posts/2020-10-02-ruby-2-7-2-released.md b/ko/news/_posts/2020-10-02-ruby-2-7-2-released.md new file mode 100644 index 0000000000..78d89e9a9b --- /dev/null +++ b/ko/news/_posts/2020-10-02-ruby-2-7-2-released.md @@ -0,0 +1,60 @@ +--- +layout: news_post +title: "루비 2.7.2 릴리스" +author: "nagachika" +translator: "shia" +date: 2020-10-02 11:00:00 +0000 +lang: ko +--- + +루비 2.7.2가 릴리스되었습니다. + +이 릴리스는 의도적인 비호환이 있습니다. 2.7.2 이후로 기본 설정에서는 폐기 예정 경고를 출력하지 않습니다. +폐기 예정 경고를 활성화하려면 실행시에 `-w`나 `-W:deprecated`를 넘기세요. +자세한 내용은 다음 티켓을 참고하세요. + +* [Feature #17000 2.7.2 turns off deprecation warnings by default](https://bugs.ruby-lang.org/issues/17000) +* [Feature #16345 Don't emit deprecation warnings by default.](https://bugs.ruby-lang.org/issues/16345) + +이 릴리스는 다음 글이 소개하고 있는 보안 수정이 적용된 webrick의 새 버전을 포함합니다. + +* [CVE-2020-25613: WEBrick의 잠재적인 HTTP 요청 스머글링 취약점](/ko/news/2020/09/29/http-request-smuggling-cve-2020-25613/) + +이 이외의 변경 사항은 [커밋 로그](https://github.com/ruby/ruby/compare/v2_7_1...v2_7_2)를 확인해주세요. + +## 다운로드 + +{% assign release = site.data.releases | where: "version", "2.7.2" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## 릴리스 코멘트 + +많은 커미터, 개발자, 버그를 보고해 준 사용자들이 이 릴리스를 만드는 데 도움을 주었습니다. +그들의 기여에 감사드립니다. From b1f165c5364da080325207a3754f365c78b13fa9 Mon Sep 17 00:00:00 2001 From: Shia Date: Wed, 7 Oct 2020 13:07:09 +0900 Subject: [PATCH 0114/1487] Translate http-request-smuggling-cve-2020-25613 (ko) (#2497) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * cp {en,ko}/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md * Translate http-request-smuggling-cve-2020-25613 (ko) * %s/밀수/스머글링/g --- ...9-http-request-smuggling-cve-2020-25613.md | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 ko/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md diff --git a/ko/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md b/ko/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md new file mode 100644 index 0000000000..a2de1385f7 --- /dev/null +++ b/ko/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md @@ -0,0 +1,36 @@ +--- +layout: news_post +title: "CVE-2020-25613: WEBrick의 잠재적인 HTTP 요청 스머글링 취약점" +author: "mame" +translator: "shia" +date: 2020-09-29 06:30:00 +0000 +tags: security +lang: ko +--- + +WEBrick에서 잠재적인 HTTP 요청 스머글링 취약점이 보고되었습니다. +이 취약점에 [CVE-2020-25613](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-25613)이 할당되었습니다. +webrick 젬을 업그레이드하는 것을 강력히 권장합니다. + +## 세부 내용 + +WEBrick은 유효하지 않은 Transfer-Encoding 헤더에 너무 관대했습니다. +이는 WEBrick과 몇몇 HTTP 프록시 서버들 사이에서 해석 불일치를 유발해 공격자가 어떤 요청을 몰래 끼워넣을 수 있도록 합니다. +자세한 설명은 [CWE-444](https://cwe.mitre.org/data/definitions/444.html)를 참고하세요. + +webrick 젬을 1.6.1 이상으로 업그레이드하기 바랍니다. 업그레이드하려면 `gem update webrick` 명령을 사용하세요. 만약 번들러를 사용하고 있다면 `Gemfile`에 `gem "webrick", ">= 1.6.1"`을 추가하세요. + +## 해당 버전 + +* webrick 젬 1.6.0 이하 +* 루비 2.7 버전대: 2.7.1 이하의 루비에 포함된 webrick +* 루비 2.6 버전대: 2.6.6 이하의 루비에 포함된 webrick +* 루비 2.5 버전대: 2.5.8 이하의 루비에 포함된 webrick + +## 도움을 준 사람 + +이 문제를 발견해 준 [piao](https://hackerone.com/piao)에게 감사를 표합니다. + +## 수정 이력 + +* 2020-09-29 06:30:00 (UTC) 최초 공개 From b44f65b1c5efb8413e49e9b97f9b4fe46d9adf68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20Ar=C4=B1l=C4=B1k?= Date: Fri, 9 Oct 2020 08:13:48 +0300 Subject: [PATCH 0115/1487] Translate CVE-2020-25613 post (tr) (#2493) * Translate CVE-2020-25613 post (tr) * CRLF -> LF Co-authored-by: Ismail Arilik --- ...9-http-request-smuggling-cve-2020-25613.md | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 tr/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md diff --git a/tr/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md b/tr/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md new file mode 100644 index 0000000000..2f5c60da0e --- /dev/null +++ b/tr/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md @@ -0,0 +1,38 @@ +--- +layout: news_post +title: "CVE-2020-25613: WEBrick'te Potansiyel HTTP İsteği Kaçakçılığı Zaafiyeti" +author: "mame" +translator: "ismailarilik" +date: 2020-09-29 06:30:00 +0000 +tags: security +lang: tr +--- + +WEBrick'te potansiyel bir HTTP isteği kaçakçılığı zaafiyeti bildirilmiştir. +Bu zaafiyet [CVE-2020-25613](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-25613) CVE belirtecine atanmıştır. +webrick gem'ini yükseltmenizi şiddetle tavsiye ederiz. + +## Ayrıntılar + +WEBrick geçersiz bir Transfer-Encoding öncüsüne karşı fazla toleranslıydı. +Bu, WEBrick ve bazı HTTP vekil sunucuları arasında tutarsız yorumlamaya neden oluyordu, ki bu da bir saldırganın bir isteği "kaçırmasına" izin verebilir. +Ayrıntılar için [CWE-444](https://cwe.mitre.org/data/definitions/444.html)'e bakınız. + +Lütfen webrick gem'ini 1.6.1 sürümüne veya sonrasına güncelleyiniz. +Bu gem'i güncellemek için `gem update webrick` komutunu kullanabilirsiniz. +Eğer bundler kullanıyorsanız, lütfen `gem "webrick", ">= 1.6.1"` satırını `Gemfile`'ınıza ekleyin. + +## Etkilenen sürümler + +* webrick gem'i 1.6.0 ya da öncesi +* ruby 2.7.1 veya öncesinde paketlenmiş webrick sürümleri +* ruby 2.6.6 veya öncesinde paketlenmiş webrick sürümleri +* ruby 2.5.8 veya öncesinde paketlenmiş webrick sürümleri + +## Teşekkürler + +Bu zaafiyeti ortaya çıkardığı için [piao](https://hackerone.com/piao)'ya teşekkür ederiz. + +## Geçmiş + +* İlk olarak 2020-09-29 06:30:00 (UTC) tarihinde yayınlanmıştır. From ae37d8f4c52687c6281526634a0d0b077db80b14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20Ar=C4=B1l=C4=B1k?= Date: Fri, 9 Oct 2020 08:14:11 +0300 Subject: [PATCH 0116/1487] Translate ruby 2 7 2 released tr (#2494) * Translate Ruby 2.7.2 Released post (tr) * Obey markdownlint Co-authored-by: Ismail Arilik --- .../_posts/2020-10-02-ruby-2-7-2-released.md | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 tr/news/_posts/2020-10-02-ruby-2-7-2-released.md diff --git a/tr/news/_posts/2020-10-02-ruby-2-7-2-released.md b/tr/news/_posts/2020-10-02-ruby-2-7-2-released.md new file mode 100644 index 0000000000..f920a69309 --- /dev/null +++ b/tr/news/_posts/2020-10-02-ruby-2-7-2-released.md @@ -0,0 +1,60 @@ +--- +layout: news_post +title: "Ruby 2.7.2 Yayınlandı" +author: "nagachika" +translator: "ismailarilik" +date: 2020-10-02 11:00:00 +0000 +lang: tr +--- + +Ruby 2.7.2 yayınlandı. + +Bu yayın kasıtlı uyumsuzluk içermektedir. +2.7.2 ve sonrasında kullanımdan kaldırma uyarıları varsayılan olarak kapalıdır. +Kullanımdan kaldırma uyarılarını komut satırında -w veya -W:deprecated seçeneğini belirterek açabilirsiniz. +Ayrıntılar için lütfen aşağıdaki konulara bakın. + +* [Feature #17000 2.7.2 kullanımdan kaldırma uyarılarını varsayılan olarak kapatıyor](https://bugs.ruby-lang.org/issues/17000) +* [Feature #16345 Varsayılan olarak kullanımdan kaldırma uyarılarını yayınlama.](https://bugs.ruby-lang.org/issues/16345) + +Bu yayın aşağıdaki makalede tanımlanan bir güvenlik düzeltmesi içeren, webrick'in yeni bir sürümü içermektedir. + +* [CVE-2020-25613: WEBrick'te Potansiyel HTTP İsteği Kaçakçılığı Zaafiyeti](/tr/news/2020/09/29/http-request-smuggling-cve-2020-25613/) + +Diğer değişiklikler için [işleme loglarına](https://github.com/ruby/ruby/compare/v2_7_1...v2_7_2) bakınız. + +## İndirin + +{% assign release = site.data.releases | where: "version", "2.7.2" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Yayın Yorumu + +Hata bildirimleri ve katkıları ile bu yayını mümkün kılan tüm işleyicilere, geliştiricilere ve kullanıcılara teşekkür ederiz. From 4bc6b9586df4ede0f9f6a02d910f3c7abc0e2c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20T=C3=A1mara=20Pati=C3=B1o?= Date: Mon, 12 Oct 2020 10:01:20 -0500 Subject: [PATCH 0117/1487] Translate ruby-3-0-0-preview1-released (es) (#2499) --- ...2020-09-25-ruby-3-0-0-preview1-released.md | 298 ++++++++++++++++++ 1 file changed, 298 insertions(+) create mode 100644 es/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md diff --git a/es/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md b/es/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md new file mode 100644 index 0000000000..8169f7ff73 --- /dev/null +++ b/es/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md @@ -0,0 +1,298 @@ +--- +layout: news_post +title: "Publicado Ruby 3.0.0 versión previa 1" +author: "naruse" +translator: vtamara +date: 2020-09-25 00:00:00 +0000 +lang: es +--- + +Nos complace anunciar la publicación de Ruby 3.0.0-preview1. + +Introduce una serie de características nuevas y mejoras en +desempeño. + +## RBS + +RBS es un lenguaje para describir los tipos de los programas Ruby. +Los verificadores de tipos, incluyendo perfiladores de tipos, y otras +herramientas que soporten RBS entenderán mejor los programas +Ruby con definiciones RBS. + +Usted puede escribir la definición de clases y módulos: métodos que se +definen en la clase, variables de instancia y sus tipos, y relaciones +herencia/mix-in. +El objetivo de RBS es soportar los patrones que comúnmente se ven +en programas en Ruby y permitir escribir tipos avanzados incluyendo +tipos unión, sobrecarga de métodos y genéricos. +También soporta tipado pato (duck typing) con _tipos de interfaz_. + +Ruby 3.0 se distribuye con la gema `rbs`, que permite analizar +y procesar definiciones de tipos escritas en RBS. + +El siguiente es un pequeño ejemplo de RBS. + +{% highlight rbs %} +module AplicacionMensajeria + VERSION: String + + class Channel + attr_reader nombre: String + attr_reader mensajes: Array[Mensaje] + attr_reader usaurios: Array[Usuario | Robot] # `|` significa tipos unión, `Usuario` or `Robot`. + + def initialize: (String) -> void + + def publicar: (String, de: Usuario | Robot) -> Mensaje # Se soporta sobrecarga de métodos. + | (File, de: Usuaurio | Robot) -> Mensaje + end +end +{% endhighlight %} + +Ver más detalles en el +[archivo README de la gema rbs](https://github.com/ruby/rbs). + +## Ractor (experimental) + +Un Ractor es una abstracción de concurrencia al estilo Actor-modelo, +diseñada para brindar una forma de ejecución en paralelo sin +preocuparse por la seguridad de los hilos de ejecución. + +Puede crear múltiples ractors y puede ejecutarlos en paralelo. +Un Ractor permite hacer programas paralelos con seguridad en los hilos +de ejecución porque los ractors no comparten objetos normales. +La comunicación entre ractors se soporta mediante envío de +mensajes. + +Para limitar los objetos que se comparten, Ractor introduce diversas +restricciones a la sintaxis de Ruby (no hay cambio cuando no hay múltiples +Ractors). + +La especificación e implementación no es madura y podría cambiar a +futuro, por eso esta característica se señala como experimental +y cuando se crea un Ractor se presenta una advertencia de característica +experimental. + +El siguiente pequeño programa calcula `prime?` en paralelo con dos +ractores y es casi 2 veces más rápido con dos o más núcleos +que el programa secuencial. + +{% highlight ruby %} +require 'prime' + +# n.prime? con enteros enviados en r1, r2 que corren en paralelo +r1, r2 = *(1..2).map do + Ractor.new do + n = Ractor.recv + n.prime? + end +end + +# send parameters +r1.send 2**61 - 1 +r2.send 2**61 + 15 + +# wait for the results of expr1, expr2 +p r1.take #=> true +p r2.take #=> true +{% endhighlight %} + +Ver más detalles en +[doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md). + +## Planificador (__Scheduler__ Experimental) + +Se introduce `Thread#scheduler` para interceptar operaciones +que bloquean. Esto permite una concurrencia liviana sin cambiar el +código existente. + +Los métodos y clases que se soportan en el momento son: + +- `Mutex#lock`, `Mutex#unlock`, `Mutex#sleep` +- `ConditionVariable#wait` +- `Queue#pop`, `SizedQueue#push` +- `Thread#join` +- `Kernel#sleep` +- `IO#wait`, `IO#read`, `IO#write` y métodos relacionados (e.g. + `#wait_readable`, `#gets`, `#puts` y así sucesivamente). +- `IO#select` *no es soportado*. + +El actual punto de entrada para la concurrencia es +`Fiber.schedule{...}` sin embargo está sujeto a cambios para +cuando se publique Ruby 3. + +En el momento, hay disponible un planificador de prueba en +[`Async::Scheduler`](https://github.com/socketry/async/pull/56). +Ver más detalles en +[`doc/scheduler.md`](https://github.com/ruby/ruby/blob/master/doc/scheduler.md). +[Feature #16786] + +**ADVERTENCIA**: Esta característica es altamente experimental. +Tanto el nombre como sus características cambiarán en la siguiente +versión prevía. + +## Otras características notables + +* Se agrega una asignación al lado derecho. + {% highlight ruby %} + fib(10) => x + p x #=> 55 + {% endhighlight %} + +* Se agrega una definición de métodos que no requiere `end`. + {% highlight ruby %} + def cuadrado(x) = x * x + {% endhighlight %} + +* Se agrega un patrón Encontrar (__Find__). + {% highlight ruby %} + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + {% endhighlight %} + +* `Hash#except` ahora es un método incorporado. + {% highlight ruby %} + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + {% endhighlight %} + +* Se agrega como característica experimental __Memory view__ + + * Este es un nuevo conjunto de llamados en la API de C para intercambiar + áreas de memoria puras entre las librerías que son extensiones, por + ejemplo para intercambiar un arreglo numérico con un mapa de bits. + Las librerías que son extensiones pueden compartir también los + metadatos del área de memoria que constan de la forma, el formato del + elemento y así sucesivamente. Usando esta clase de metadatos, las + librerías que son extensiones pueden compartir apropiadamente incluso un + rreglo multidimensional. Esta nueva característica se diseñó empleando + como referencia el protocolo de colchón (__buffer__ ) de Python. + +## Mejoras en desempeño + +* Se implemetaron muchas mejoras en MJIT. Ver detalles en el archivo + NEWS. + +## Otros cambios notables desde 2.7 + +* Los argumentos de palabra clave se separan de otros argumentos. + * En principio, el código que presente una advertencia en Ruby 2.7 no + funcionará. Ver detalles en la + [documentación](https://www.ruby-lang.org/es/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/). + * Por cierto, el re-envío de argumentos ahora soporta argumentos principales. + {% highlight ruby %} + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end + {% endhighlight %} + +* La característica `$SAFE` se eliminó por completo; ahora es una variable + global normal. + +* El orden de la traza de llamados (__backtrace__) se había revertido para ser + como en Ruby 2.5, pero esto se ha cancelado. Ahora se comporta como + Ruby 2.4; se imprime primero un mensaje de error y el número de línea donde + ocurrió la excepción; las funciones que había hecho la llamada se imprimen + después. + +* Se actualizaron algunas librerías estándar. + * RubyGems 3.2.0.rc.1 + * Bundler 2.2.0.rc.1 + * IRB 1.2.6 + * Reline 0.1.5 + +* Las siguientes librerías ya no son gemas distribuidas con Ruby. + Instale las gemas correspondientes para usar sus funcionalidades. + * net-telnet + * xmlrpc + +* Las siguientes gemas por omisión se volvieron gemas distribuidas + con Ruby. + * rexml + * rss + +* stdlib se volvió gema por omisión. Las siguientes gemas por omisión + se publicaron en rubygems.org + * abbrev + * base64 + * English + * erb + * find + * io-nonblock + * io-wait + * net-ftp + * net-http + * net-imap + * net-protocol + * nkf + * open-uri + * optparse + * resolv + * resolv-replace + * rinda + * securerandom + * set + * shellwords + * tempfile + * time + * tmpdir + * tsort + * weakref + +Ver más detalles en el archivo +[NEWS](https://github.com/ruby/ruby/blob/v3_0_0_preview1/NEWS.md) +o [en la bitácora de contribuciones](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0). + +{% assign release = site.data.releases | where: "version", "3.0.0-preview1" | first %} + +Con estos cambios, [{{ release.stats.files_changed }} archivos cambiados, {{ release.stats.insertions }} inserciones(+), {{ release.stats.deletions }} eliminaciones(-)](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0) +desde Ruby 2.7.0! + +¡Por favor pruebe Ruby 3.0.0-preview1, y denos cualquier retroalimentación! + +## Descargas + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Avance de 3.0.0-preview2 + +Planeamos incluir ["type-profiler"](https://github.com/mame/ruby-type-profiler) +que es un analizador de tipos estáticos. ¡Esté pendiente! + +## Qué es Ruby + +Ruby fue desarrollado inicialmente por Matz (Yukihiro Matsumoto) en 1993, +y ahora es desarrollado como código abierto. Corre en muchas +plataformas y se usa en todas partes del mundo especialmente para +desarrollos web. From 560cc6a332c97df04514f8729003746fd78f74f8 Mon Sep 17 00:00:00 2001 From: Chayoung You Date: Tue, 13 Oct 2020 17:03:21 +0900 Subject: [PATCH 0118/1487] Fix compare links for 3.0.0-preview1 --- en/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md | 4 ++-- es/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md | 4 ++-- pt/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md | 4 ++-- tr/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/en/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md b/en/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md index 72605f03d9..e89d9ff80c 100644 --- a/en/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md +++ b/en/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md @@ -192,12 +192,12 @@ Currently, there is a test scheduler available in [`Async::Scheduler`](https://g * weakref See [NEWS](https://github.com/ruby/ruby/blob/v3_0_0_preview1/NEWS.md) -or [commit logs](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0) +or [commit logs](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_preview1) for more details. {% assign release = site.data.releases | where: "version", "3.0.0-preview1" | first %} -With those changes, [{{ release.stats.files_changed }} files changed, {{ release.stats.insertions }} insertions(+), {{ release.stats.deletions }} deletions(-)](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0) +With those changes, [{{ release.stats.files_changed }} files changed, {{ release.stats.insertions }} insertions(+), {{ release.stats.deletions }} deletions(-)](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_preview1) since Ruby 2.7.0! Please try Ruby 3.0.0-preview1, and give us any feedback! diff --git a/es/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md b/es/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md index 8169f7ff73..3995c1029f 100644 --- a/es/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md +++ b/es/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md @@ -246,11 +246,11 @@ versión prevía. Ver más detalles en el archivo [NEWS](https://github.com/ruby/ruby/blob/v3_0_0_preview1/NEWS.md) -o [en la bitácora de contribuciones](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0). +o [en la bitácora de contribuciones](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_preview1). {% assign release = site.data.releases | where: "version", "3.0.0-preview1" | first %} -Con estos cambios, [{{ release.stats.files_changed }} archivos cambiados, {{ release.stats.insertions }} inserciones(+), {{ release.stats.deletions }} eliminaciones(-)](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0) +Con estos cambios, [{{ release.stats.files_changed }} archivos cambiados, {{ release.stats.insertions }} inserciones(+), {{ release.stats.deletions }} eliminaciones(-)](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_preview1) desde Ruby 2.7.0! ¡Por favor pruebe Ruby 3.0.0-preview1, y denos cualquier retroalimentación! diff --git a/pt/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md b/pt/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md index 98de94f5c7..787ca06eb5 100644 --- a/pt/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md +++ b/pt/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md @@ -192,12 +192,12 @@ Atualmente, existe um agendador de teste disponível em [`Async::Scheduler`](htt * weakref Veja [NEWS](https://github.com/ruby/ruby/blob/v3_0_0_preview1/NEWS.md) -ou [commit logs](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0) +ou [commit logs](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_preview1) para mais detalhes. {% assign release = site.data.releases | where: "version", "3.0.0-preview1" | first %} -Com essas mudanças, [{{ release.stats.files_changed }} arquivos alterados, {{ release.stats.insertions }} inserções(+), {{ release.stats.deletions }} deleções(-)](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0) +Com essas mudanças, [{{ release.stats.files_changed }} arquivos alterados, {{ release.stats.insertions }} inserções(+), {{ release.stats.deletions }} deleções(-)](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_preview1) desde Ruby 2.7.0! Por favor, experimente Ruby 3.0.0-preview1 e nos dê qualquer feedback! diff --git a/tr/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md b/tr/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md index f3df489991..0b543d1e86 100644 --- a/tr/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md +++ b/tr/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md @@ -205,11 +205,11 @@ Aşağıdaki varsayılan gem'ler rubygems.org'da yayınlandı. * tsort * weakref -Daha fazla ayrıntı için [NEWS](https://github.com/ruby/ruby/blob/v3_0_0_preview1/NEWS.md)'e ya da [işleme loglarına](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0) bakınız. +Daha fazla ayrıntı için [NEWS](https://github.com/ruby/ruby/blob/v3_0_0_preview1/NEWS.md)'e ya da [işleme loglarına](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_preview1) bakınız. {% assign release = site.data.releases | where: "version", "3.0.0-preview1" | first %} -Bu değişikliklerle birlikte, 2.7.0'dan bu yana [{{ release.stats.files_changed }} dosya değişti, {{ release.stats.insertions }} ekleme(+) yapıldı, {{ release.stats.deletions }} silme(-) yapıldı](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0)! +Bu değişikliklerle birlikte, 2.7.0'dan bu yana [{{ release.stats.files_changed }} dosya değişti, {{ release.stats.insertions }} ekleme(+) yapıldı, {{ release.stats.deletions }} silme(-) yapıldı](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_preview1)! Lütfen Ruby 3.0.0-preview1'i deneyin, ve bize herhangi bir geri bildirim verin! From 435cf5d0d19c15d102fe03fd2d3f9f8ac47feef2 Mon Sep 17 00:00:00 2001 From: Shia Date: Wed, 14 Oct 2020 11:41:45 +0900 Subject: [PATCH 0119/1487] Translate 'ruby-3-0-0-preview1-released' (ko) (#2502) * cp {en,ko}/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md * Translate 'ruby-3-0-0-preview1-released' (ko) * Apply suggestions from code review Co-authored-by: Chayoung You * Apply suggestions from code review Co-authored-by: Chayoung You * Translate comments * Better translation * Translate more comment * Update ko/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md Co-authored-by: Chayoung You * better translation Co-authored-by: Chayoung You --- ...2020-09-25-ruby-3-0-0-preview1-released.md | 242 ++++++++++++++++++ 1 file changed, 242 insertions(+) create mode 100644 ko/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md diff --git a/ko/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md b/ko/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md new file mode 100644 index 0000000000..2400fc03b7 --- /dev/null +++ b/ko/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md @@ -0,0 +1,242 @@ +--- +layout: news_post +title: "루비 3.0.0 Preview 1 릴리스" +author: "naruse" +translator: "shia" +date: 2020-09-25 00:00:00 +0000 +lang: ko +--- + +루비 3.0.0-preview1 릴리스를 알리게 되어 기쁩니다. + +이는 많은 새 기능과 성능 향상을 포함하고 있습니다. + +## RBS + +RBS는 루비 프로그램의 타입을 기술하기 위한 언어입니다. +RBS를 지원하기 위한 타입 프로파일러와 다른 도구들을 포함하는 타입 검사기는 RBS 정의를 통해 루비 프로그램을 더 잘 이해합니다. + +클래스나 모듈에 정의된 메서드, 인스턴스 변수와 타입, 상속이나 믹스인 관계에 대한 정의를 작성할 수 있습니다. +RBS의 목표는 루비 프로그램에서 흔히 보이는 패턴을 지원하는 것과 유니언 타입, 메서드 오버로딩, 제네릭을 포함하는 고급 타입을 지원하는 것입니다. 또한 _인터페이스 타입_을 이용해 덕타이핑을 지원합니다. + +루비 3.0은 RBS로 작성된 타입 정의를 해석하고 처리하는 `rbs` 젬을 포함합니다. + +다음은 RBS의 작은 예시입니다. + +{% highlight rbs %} +module ChatApp + VERSION: String + + class Channel + attr_reader name: String + attr_reader messages: Array[Message] + attr_reader users: Array[User | Bot] # `|`는 유니언 타입을 의미합니다. 여기에서는 `User` 또는 `Bot`이라는 의미입니다. + + def initialize: (String) -> void + + def post: (String, from: User | Bot) -> Message # 메서드 오버로딩이 지원됩니다. + | (File, from: User | Bot) -> Message + end +end +{% endhighlight %} + +더 자세한 내용은 [rbs 젬의 README](https://github.com/ruby/rbs)를 확인하세요. + +## Ractor (실험적) + +Ractor는 스레드 안전에 대한 걱정이 없는 병렬 실행을 제공하기 위해 설계된 액터 모델과 비슷한 동시 실행 추상화 모델입니다. + +여러 개의 ractor를 만들고 병렬로 실행할 수 있습니다. Ractor는 일반 객체를 공유할 수 없기 때문에 스레드 안전한 병렬 프로그램을 만들 수 있습니다. +ractor 간의 통신은 메시지 넘기기를 통해서 지원됩니다. + +객체 공유를 제한하기 위해, Ractor는 루비 문법에 여러 제한을 추가했습니다(여러 개의 ractor를 사용하지 않는다면 차이는 없습니다). + +명세와 구현은 아직 완성되지 않았으므로 앞으로 변경될 수 있습니다. 그러므로 이 기능은 실험적으로 제공되며 Ractor가 생성되면 실험적 기능을 사용하고 있다는 경고를 표시합니다. + +다음은 `prime?`을 2개의 ractor를 통해 계산하는 프로그램입니다. 이는 2개 이상의 코어를 사용하는 경우, 순차적으로 실행하는 프로그램보다 약 2배 빠릅니다. + +{% highlight ruby %} +require 'prime' + +# r1, r2에 보낸 정수들로 'n.prime?'을 병렬 실행 +r1, r2 = *(1..2).map do + Ractor.new do + n = Ractor.recv + n.prime? + end +end + +# 매개 변수를 송신 +r1.send 2**61 - 1 +r2.send 2**61 + 15 + +# r1, r2의 실행 결과 대기 +p r1.take #=> true +p r2.take #=> true +{% endhighlight %} + +더 자세한 내용은 [doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md)를 확인하세요. + +## 스케줄러 (실험적) + +블로킹 명령에 끼어들 수 있는 `Thread#scheduler`가 도입됩니다. +이는 기존에 존재하는 코드를 변경하지 않고 가벼운 동시성을 지원할 수 있게 합니다. + +현재 지원되는 클래스와 메서드는 다음과 같습니다. + +- `Mutex#lock`, `Mutex#unlock`, `Mutex#sleep` +- `ConditionVariable#wait` +- `Queue#pop`, `SizedQueue#push` +- `Thread#join` +- `Kernel#sleep` +- `IO#wait`, `IO#read`, `IO#write`와 관련 메서드(예: `#wait_readable`, `#gets`, `#puts` 등). +- `IO#select`는 *지원되지 않습니다*. + +현재 동시성을 위한 기점은 `Fiber.schedule{...}`입니다만, 이는 루비 3의 릴리스 때 변경될 가능성이 있습니다. + +현재 [`Async::Scheduler`](https://github.com/socketry/async/pull/56)의 테스트 스케줄러가 이용 가능합니다. +자세한 내용은 [`doc/scheduler.md`](https://github.com/ruby/ruby/blob/master/doc/scheduler.md)를 확인하세요. [Feature #16786] + +**주의**: 이 기능은 매우 실험적입니다. 이름과 기능 모두 다음 프리뷰 릴리스에서 변경될 수 있습니다. + +## 그 이외의 주목할 만한 기능 + +* 오른쪽으로 값을 할당하는 명령이 추가됩니다. + {% highlight ruby %} + fib(10) => x + p x #=> 55 + {% endhighlight %} + +* `end` 없는 메서드 정의가 추가됩니다. + {% highlight ruby %} + def square(x) = x * x + {% endhighlight %} + +* 검색 패턴이 추가됩니다. + {% highlight ruby %} + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + {% endhighlight %} + +* `Hash#except`가 내장됩니다. + {% highlight ruby %} + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + {% endhighlight %} + +* 메모리 뷰가 실험적인 기능으로 추가됩니다. + + * 이는 숫자 배열이나 비트맵 이미지와 같은 메모리 공간을 확장 라이브러리 간에 교환하기 위한 새로운 C-API 집합입니다. 확장 라이브러리는 모양, 요소의 형식 등으로 구성된 메모리 공간의 메타 정보를 공유할 수 있습니다. 이러한 메타 정보를 사용하여 확장 라이브러리는 다차원 배열을 적절하게 공유할 수 있습니다. 이 기능은 파이썬의 버퍼 프로토콜을 참고하여 설계되었습니다. + +## 성능 향상 + +* MJIT에 많은 개선이 추가되었습니다. 자세한 내용은 [NEWS](https://github.com/ruby/ruby/blob/v3_0_0_preview1/NEWS.md)를 확인하세요. + +## 그 이외의 2.7 이후로 주목할 만한 변경 + +* 키워드 인자가 다른 인자들로부터 분리됩니다. + * 원칙적으로 루비 2.7에서 경고를 출력하는 코드는 동작하지 않습니다. 자세한 내용은 [문서](https://www.ruby-lang.org/ko/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/)를 확인하세요. + * 한편, 인자를 전달할 때 앞쪽 인자를 사용할 수 있습니다. + {% highlight ruby %} + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end + {% endhighlight %} + +* `$SAFE` 기능이 완전히 제거됩니다. 이 값은 이제 일반 전역 변수입니다. + +* 루비 2.5에서 백트레이스의 순서가 역순이 되었습니다만, 이를 취소합니다. 이제 백트레이스는 루비 2.4와 동일하게 동작합니다. 예외가 발생한 곳의 에러 메시지와 줄 번호가 가장 먼저 출력되며, 이를 호출한 곳의 정보가 그 뒤에 출력됩니다. + +* 표준 라이브러리를 업데이트했습니다. + * RubyGems 3.2.0.rc.1 + * Bundler 2.2.0.rc.1 + * IRB 1.2.6 + * Reline 0.1.5 + +* 다음 라이브러리들은 이제 기본으로 포함되지 않습니다. + 각 기능이 필요한 경우에는 해당하는 젬을 설치해주세요. + * net-telnet + * xmlrpc + +* 기본 젬이 내장 젬으로 승격됩니다. + * rexml + * rss + +* 표준 라이브러리가 기본 젬으로 승격됩니다. 다음 기본 젬들이 rubygems.org에서 배포 중입니다. + * abbrev + * base64 + * English + * erb + * find + * io-nonblock + * io-wait + * net-ftp + * net-http + * net-imap + * net-protocol + * nkf + * open-uri + * optparse + * resolv + * resolv-replace + * rinda + * securerandom + * set + * shellwords + * tempfile + * time + * tmpdir + * tsort + * weakref + +더 자세한 내용은 [NEWS](https://github.com/ruby/ruby/blob/v3_0_0_preview1/NEWS.md)나 +[커밋 로그](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_preview1)를 확인해주세요. + +{% assign release = site.data.releases | where: "version", "3.0.0-preview1" | first %} + +이러한 변경사항에 따라, 루비 2.7.0 이후로 [파일 {{ release.stats.files_changed }}개 수정, {{ release.stats.insertions }}줄 추가(+), {{ release.stats.deletions }}줄 삭제](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_preview1)가 이루어졌습니다! + +루비 3.0.0-preview1을 사용해보시고, 피드백을 보내주세요! + +## 다운로드 + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## 3.0.0-preview2 예고 + +정적 타입 분석 기능을 위한 ["타입 프로파일러"](https://github.com/mame/ruby-type-profiler)를 포함할 예정입니다. 계속 지켜봐주세요! + +## 루비는 + +루비는 1993년에 Matz(마츠모토 유키히로)가 처음 개발했고, 현재는 오픈 소스로서 개발되고 있습니다. 이는 여러 플랫폼에서 동작하며, 특히 웹 개발에서 전 세계적으로 이용되고 있습니다. From 0c85f03a47bb2030da017c2bd1aab7bfeac90929 Mon Sep 17 00:00:00 2001 From: Shia Date: Wed, 14 Oct 2020 18:45:07 +0900 Subject: [PATCH 0120/1487] Fix italic text (#2505) --- ko/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ko/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md b/ko/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md index 2400fc03b7..4d07cb439b 100644 --- a/ko/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md +++ b/ko/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md @@ -17,7 +17,7 @@ RBS는 루비 프로그램의 타입을 기술하기 위한 언어입니다. RBS를 지원하기 위한 타입 프로파일러와 다른 도구들을 포함하는 타입 검사기는 RBS 정의를 통해 루비 프로그램을 더 잘 이해합니다. 클래스나 모듈에 정의된 메서드, 인스턴스 변수와 타입, 상속이나 믹스인 관계에 대한 정의를 작성할 수 있습니다. -RBS의 목표는 루비 프로그램에서 흔히 보이는 패턴을 지원하는 것과 유니언 타입, 메서드 오버로딩, 제네릭을 포함하는 고급 타입을 지원하는 것입니다. 또한 _인터페이스 타입_을 이용해 덕타이핑을 지원합니다. +RBS의 목표는 루비 프로그램에서 흔히 보이는 패턴을 지원하는 것과 유니언 타입, 메서드 오버로딩, 제네릭을 포함하는 고급 타입을 지원하는 것입니다. 또한 _인터페이스 타입_ 을 이용해 덕타이핑을 지원합니다. 루비 3.0은 RBS로 작성된 타입 정의를 해석하고 처리하는 `rbs` 젬을 포함합니다. From 9c3aefd6381aa099afada88043e8bd02b78969a0 Mon Sep 17 00:00:00 2001 From: Chayoung You Date: Thu, 15 Oct 2020 20:39:27 +0900 Subject: [PATCH 0121/1487] Fix italic text for Korean (#2506) --- ko/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ko/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md b/ko/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md index 4d07cb439b..2e37a811e9 100644 --- a/ko/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md +++ b/ko/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md @@ -17,7 +17,7 @@ RBS는 루비 프로그램의 타입을 기술하기 위한 언어입니다. RBS를 지원하기 위한 타입 프로파일러와 다른 도구들을 포함하는 타입 검사기는 RBS 정의를 통해 루비 프로그램을 더 잘 이해합니다. 클래스나 모듈에 정의된 메서드, 인스턴스 변수와 타입, 상속이나 믹스인 관계에 대한 정의를 작성할 수 있습니다. -RBS의 목표는 루비 프로그램에서 흔히 보이는 패턴을 지원하는 것과 유니언 타입, 메서드 오버로딩, 제네릭을 포함하는 고급 타입을 지원하는 것입니다. 또한 _인터페이스 타입_ 을 이용해 덕타이핑을 지원합니다. +RBS의 목표는 루비 프로그램에서 흔히 보이는 패턴을 지원하는 것과 유니언 타입, 메서드 오버로딩, 제네릭을 포함하는 고급 타입을 지원하는 것입니다. 또한 *인터페이스 타입*을 이용해 덕타이핑을 지원합니다. 루비 3.0은 RBS로 작성된 타입 정의를 해석하고 처리하는 `rbs` 젬을 포함합니다. From 3beb4b39be526f855f443efec1366146a65ec39e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20T=C3=A1mara=20Pati=C3=B1o?= Date: Thu, 15 Oct 2020 14:22:23 -0500 Subject: [PATCH 0122/1487] Translate HTTP Request smuggling CVE 2020-25613 (es) (#2500) * Translate HTTP Request smuggling CVE 2020-25613 (es) * No trailing whitespace --- ...9-http-request-smuggling-cve-2020-25613.md | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 es/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md diff --git a/es/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md b/es/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md new file mode 100644 index 0000000000..98e85a6e8d --- /dev/null +++ b/es/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md @@ -0,0 +1,42 @@ +--- +layout: news_post +title: "CVE-2020-25613: WEBrick potencialmente vulnerable a contrabando de solicitudes HTTP" +author: "mame" +translator: vtamara +date: 2020-09-29 06:30:00 +0000 +tags: security +lang: es +--- + +Se reportó una potencial vulnerabilidad en WEBrick a contrabando de solicitudes +HTTP. A esta vulnerabilidad se le ha asignado el identificador CVE +[CVE-2020-25613](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-25613). +Recomendamos enfáticamente actualizar la gema webrick. + +## Detalles + +WEBrick era demasiado tolerante a encabezados Transfer-Encoding inválidos. +Esto puede conducir a interpretaciones inconsistentes entre WEBrick y algunos +servidores proxy HTTP, que podría permitir a un atacante "contrabandear" una +solicitud. Ver en detalle +[CWE-444](https://cwe.mitre.org/data/definitions/444.html). + +Por favor actualice la gema webrick a la versión 1.6.1 o posterior. +Puede usar `gem update webrick` para actualizarla. Si está usando +bunler, por favor añada o actualice `gem "webrick", ">= 1.6.1"` a su +`Gemfile`. + +## Versiones afectadas + +* gema webrick 1.6.0 o anteriores +* versiones incorporadas de webrick en ruby 2.7.1 o anteriores +* versiones incorporadas de webrick en ruby 2.6.6 o anteriores +* versiones incorporadas de webrick en ruby 2.5.8 o anteriores + +## Créditos + +Agradecemos a [piao](https://hackerone.com/piao) por descubrir este problema. + +## Historia + +* Publicado originalmente el 2020-09-29 06:30:00 (UTC) From 8f0124313b6901a964c07916664d171acfe95464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20T=C3=A1mara=20Pati=C3=B1o?= Date: Thu, 15 Oct 2020 14:22:40 -0500 Subject: [PATCH 0123/1487] Translate Ruby 2.7.2 released (es) (#2501) --- .../_posts/2020-10-02-ruby-2-7-2-released.md | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 es/news/_posts/2020-10-02-ruby-2-7-2-released.md diff --git a/es/news/_posts/2020-10-02-ruby-2-7-2-released.md b/es/news/_posts/2020-10-02-ruby-2-7-2-released.md new file mode 100644 index 0000000000..e6958483bb --- /dev/null +++ b/es/news/_posts/2020-10-02-ruby-2-7-2-released.md @@ -0,0 +1,64 @@ +--- +layout: news_post +title: "Publicado Ruby 2.7.2" +author: "nagachika" +translator: vtamara +date: 2020-10-02 11:00:00 +0000 +lang: es +--- + +Ruby 2.7.2 ha sido publicado. + +Esta versión contiene incompatibilidades intencionales. Las advertencias +de obsolescencia están apagadas por omisión en 2.7.2 y posteriores. +Puede encender las advertencias de obsolescencia especificando la opción +-w o -W:deprecated en la línea de ordenes. Por favor revise detalles +en los temas siguientes. + +* [Característica #17000 2.7.2 turns off deprecation warnings by default](https://bugs.ruby-lang.org/issues/17000) +* [Característica #16345 Don't emit deprecation warnings by default.](https://bugs.ruby-lang.org/issues/16345) + +Esta versión contiene la nueva versión de webrick con una corrección +de seguridad descrita en el artículo + +* [CVE-2020-25613: WEBrick potencialmente vulnerable a contrabando de solicitudes HTTP](/es/news/2020/09/29/http-request-smuggling-cve-2020-25613/) + +Ver otros cambios en la [bitácora de contribuciones](https://github.com/ruby/ruby/compare/v2_7_1...v2_7_2). + +## Descargas + +{% assign release = site.data.releases | where: "version", "2.7.2" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Comentario de la versión + +Agradecemos a los muchos contribuyentes, desarrolladores y usuarios que +suministraron reportes de fallas y contribuciones que hicieron posible +esta versión. From cf12e685670aef0c8cedea53bc75e459a48301ab Mon Sep 17 00:00:00 2001 From: ismailarilik Date: Fri, 16 Oct 2020 15:01:15 +0300 Subject: [PATCH 0124/1487] Tk is not bundled anymore --- .../ruby-from-other-languages/to-ruby-from-java/index.md | 2 +- .../ruby-from-other-languages/to-ruby-from-java/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/en/documentation/ruby-from-other-languages/to-ruby-from-java/index.md b/en/documentation/ruby-from-other-languages/to-ruby-from-java/index.md index ad8bce1d08..25f0a165ec 100644 --- a/en/documentation/ruby-from-other-languages/to-ruby-from-java/index.md +++ b/en/documentation/ruby-from-other-languages/to-ruby-from-java/index.md @@ -26,7 +26,7 @@ Unlike Java, in Ruby,... * You don’t need to compile your code. You just run it directly. * There are several different popular third-party GUI toolkits. Ruby users can try [WxRuby][1], [FXRuby][2], [Ruby-GNOME2][3], - [Qt][4], or the bundled-in Ruby Tk for example. + [Qt][4], or [Ruby Tk](https://github.com/ruby/tk) for example. * You use the `end` keyword after defining things like classes, instead of having to put braces around blocks of code. * You have `require` instead of `import`. diff --git a/tr/documentation/ruby-from-other-languages/to-ruby-from-java/index.md b/tr/documentation/ruby-from-other-languages/to-ruby-from-java/index.md index da6de2d7b2..7ffc9e3209 100644 --- a/tr/documentation/ruby-from-other-languages/to-ruby-from-java/index.md +++ b/tr/documentation/ruby-from-other-languages/to-ruby-from-java/index.md @@ -26,7 +26,7 @@ Ruby’de Java’dan farklı olarak,... * Kodunuzu derlemeye gerek yoktur, direk olarak çalıştırırsınız. * Ruby kullanıcıları değişik GUI araçları kullanabilir [WxRuby][1], - [FXRuby][2], [Ruby-GNOME2][3], [Qt][4], ya da Ruby içinde yüklü gelen Tk + [FXRuby][2], [Ruby-GNOME2][3], [Qt][4], ya da [Ruby Tk](https://github.com/ruby/tk) bunların bazıları. * Sınıflar, metodlar gibi birşeyleri tanımlarken kod bloğunu süslü parantez içine almak yerine sonunda `end` deyimi kullanırsınız From 1ce01857b5ce066a5695d87e0bc06eb098a7cbc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlio=20Campos?= Date: Mon, 19 Oct 2020 09:08:18 -0300 Subject: [PATCH 0125/1487] Translate CVE-2020-25613 (pt) --- ...9-http-request-smuggling-cve-2020-25613.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 pt/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md diff --git a/pt/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md b/pt/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md new file mode 100644 index 0000000000..36308d0329 --- /dev/null +++ b/pt/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md @@ -0,0 +1,32 @@ +--- +layout: news_post +title: "CVE-2020-25613: Potencial Vulnerabilidade de Smuggling de Requisições HTTP no WEBrick" +author: "mame" +translator: "jcserracampos" +date: 2020-09-29 06:30:00 +0000 +tags: security +lang: pt +--- + +Uma potencial vulnerabilidade de __smuggling__ de requisições HTTP no WEBrick foi reportada. Essa vulnerabilidade recebeu o identificador CVE [CVE-2020-25613](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-25613). Nós recomendamos fortemente que atualize a gem webrick. + +## Detalhes + +WEBrick era muito tolerante contra um cabeçalho __Transfer-Encoding__ inválido. Isso pode levar interpretações inconsistentes entre WEBrick e alguns servidores de proxy HTTP, o que pode poermite que uma pessoa atacante "contrabandeie" uma requisição. Veja [CWE-444](https://cwe.mitre.org/data/definitions/444.html) em detalhes. + +Por favor, atualiaze a gem webrick para a versão 1.6.1 ou superior. Você pode usar `gem update webrick` para atualizá-la. Se você está usando bundle, por favor, adicione gem `"webrick", ">= 1.6.1"` ao seu `Gemfile`. + +## Versões afetadas + +* webrick gem 1.6.0 ou inferior +* versões empacotadas de webrick no ruby 2.7.1 ou inferior +* versões empacotadas de webrick no ruby 2.6.6 ou inferior +* versões empacotadas de webrick no ruby 2.5.8 ou inferior + +## Créditos + +Agradecimentos a [piao](https://hackerone.com/piao) por ter descoberto este problema. + +## Histórico + +* Originalmente publicado em 2020-09-29 06:30:00 (UTC) From 753c5698d42b8df35753540a50ff14c5100c4f05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlio=20Campos?= Date: Mon, 19 Oct 2020 09:15:27 -0300 Subject: [PATCH 0126/1487] Translate Ruby 2.7.2 Released (pt) --- .../_posts/2020-10-02-ruby-2-7-2-released.md | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 pt/news/_posts/2020-10-02-ruby-2-7-2-released.md diff --git a/pt/news/_posts/2020-10-02-ruby-2-7-2-released.md b/pt/news/_posts/2020-10-02-ruby-2-7-2-released.md new file mode 100644 index 0000000000..935a6e9b5b --- /dev/null +++ b/pt/news/_posts/2020-10-02-ruby-2-7-2-released.md @@ -0,0 +1,59 @@ +--- +layout: news_post +title: "Lançado Ruby 2.7.2" +author: "nagachika" +translator: "jcserracampos" +date: 2020-10-02 11:00:00 +0000 +lang: pt +--- + +Ruby 2.7.2 foi lançado. + +Esta versão contém incompatibilidade intencional. Alertas de depreciação estão desativadas por padrão no 2.7.2 em diante. +Você pode ativar esses alertas de depreciação especificando as opções -w ou -W:deprecated na linha de comando. +Por favor, veja os tópicos abaixo para detalhes. + +* [Feature #17000 2.7.2 turns off deprecation warnings by default](https://bugs.ruby-lang.org/issues/17000) +* [Feature #16345 Don't emit deprecation warnings by default.](https://bugs.ruby-lang.org/issues/16345) + +Esta versão contém a nova versão de webrick com uma correção de seguração descrita neste artigo. + +* [CVE-2020-25613: Potencial Vulnerabilidade de Smuggling de Requisições HTTP no WEBrick](/pt/news/2020/09/29/http-request-smuggling-cve-2020-25613/) + +Veja [commit logs](https://github.com/ruby/ruby/compare/v2_7_1...v2_7_2) para outras alterações. + +## Download + +{% assign release = site.data.releases | where: "version", "2.7.2" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Comentário de Versão + +Obrigado às várias pessoas que fizeram commits, pessoas desenvolvedoras e usuárias que informaram bugs e contribuíram para que esta versão fosse possível. From 10a27fdf128a05733120ffdff8c4b0f05fea25ba Mon Sep 17 00:00:00 2001 From: Vagish Vela Date: Tue, 20 Oct 2020 12:36:27 -0400 Subject: [PATCH 0127/1487] Fix mixed content error on Fukuoka Ruby Award The image linked is using http instead of https which is causing a mixed content error, which now results in a "Content not secure" near the padlock on modern browsers. --- de/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md | 2 +- de/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md | 2 +- de/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md | 2 +- de/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md | 2 +- de/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md | 2 +- en/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md | 2 +- en/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md | 2 +- en/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md | 2 +- en/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md | 2 +- en/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md | 2 +- es/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md | 2 +- es/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md | 2 +- es/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md | 2 +- es/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md | 2 +- id/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md | 2 +- id/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md | 2 +- id/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md | 2 +- id/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md | 2 +- ko/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md | 2 +- ko/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md | 2 +- ko/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md | 2 +- ko/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md | 2 +- ko/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md | 2 +- pt/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md | 2 +- pt/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md | 2 +- pt/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md | 2 +- pt/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md | 2 +- ru/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md | 2 +- ru/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md | 2 +- tr/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md | 2 +- tr/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md | 2 +- zh_cn/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md | 2 +- zh_cn/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md | 2 +- zh_tw/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md | 2 +- zh_tw/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md | 2 +- zh_tw/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md | 2 +- zh_tw/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md | 2 +- 37 files changed, 37 insertions(+), 37 deletions(-) diff --git a/de/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md b/de/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md index 2b040319b1..21dd611ac5 100644 --- a/de/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md +++ b/de/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md @@ -18,7 +18,7 @@ Fukuoka Ruby Award 2017 — Großer Preis — 1 Million Yen! Einsendeschluss: 27. Dezember 2016 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz und eine Gruppe Juroren werden die Preisträger gemeinsam auswählen; der Große Preis ist mit einer Million Yen (ca. 8.700 €) diff --git a/de/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md b/de/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md index 2175b77968..ab8b811fcb 100644 --- a/de/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md +++ b/de/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md @@ -18,7 +18,7 @@ Fukuoka Ruby Award 2018 — Großer Preis — 1 Million Yen! Einsendeschluss: 31. Januar 2018 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz und eine Gruppe Juroren werden die Preisträger gemeinsam auswählen; der Große Preis ist mit einer Million Yen (ca. 7.300 €) diff --git a/de/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md b/de/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md index 12e05a6c12..2e63d41baf 100644 --- a/de/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md +++ b/de/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md @@ -18,7 +18,7 @@ Fukuoka Ruby Award 2019 — Großer Preis — 1 Million Yen! Einsendeschluss: 31. Januar 2019 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz und eine Gruppe Juroren werden die Preisträger gemeinsam auswählen; der Große Preis ist mit einer Million Yen (ca. 7.800 €) diff --git a/de/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md b/de/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md index b8fa7a155c..bf2d1f4f9b 100644 --- a/de/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md +++ b/de/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md @@ -18,7 +18,7 @@ Fukuoka Ruby Award 2020 — Großer Preis — 1 Million Yen! Einsendeschluss: 11. Dezember 2019 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz und eine Gruppe Juroren werden die Preisträger gemeinsam auswählen; der Große Preis ist mit einer Million Yen (ca. 8.200 €) diff --git a/de/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md b/de/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md index e6ea061f05..5b8944bb85 100644 --- a/de/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md +++ b/de/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md @@ -18,7 +18,7 @@ Fukuoka Ruby Award 2021 — Großer Preis — 1 Million Yen! Einsendeschluss: 4. Dezember 2020 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz und eine Gruppe Juroren werden die Preisträger gemeinsam auswählen; der Große Preis ist mit einer Million Yen (ca. 8.100 €) diff --git a/en/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md b/en/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md index 90672f1b0e..1807ab8c9c 100644 --- a/en/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md +++ b/en/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md @@ -17,7 +17,7 @@ interesting Ruby program, please be encouraged to apply. Entry Deadline: December 27, 2016 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz and a group of panelists will select the winners of the Fukuoka Competition. The grand prize for the Fukuoka Competition is 1 million yen. diff --git a/en/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md b/en/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md index 2f6a4f4aaa..bf6716dc8e 100644 --- a/en/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md +++ b/en/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md @@ -17,7 +17,7 @@ an interesting Ruby program, please be encouraged to apply. Entry Deadline: January 31, 2018 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz and a group of panelists will select the winners of the Fukuoka Competition. The grand prize for the Fukuoka Competition diff --git a/en/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md b/en/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md index 5ebf6179e6..d756949c36 100644 --- a/en/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md +++ b/en/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md @@ -15,7 +15,7 @@ The Government of Fukuoka, Japan together with "Matz" Matsumoto would like to in Entry Deadline: January 31, 2019 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz and a group of panelists will select the winners of the Fukuoka Competition. The grand prize for the Fukuoka Competition is 1 million yen. Past grand prize winners include Rhomobile (USA) and APEC Climate Center (Korea). diff --git a/en/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md b/en/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md index 44c8d127a4..fdc275a96c 100644 --- a/en/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md +++ b/en/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md @@ -15,7 +15,7 @@ The Government of Fukuoka, Japan together with "Matz" Matsumoto would like to in Entry Deadline: December 11, 2019 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz and a group of panelists will select the winners of the Fukuoka Competition. The grand prize for the Fukuoka Competition is 1 million yen. Past grand prize winners include Rhomobile (USA) and APEC Climate Center (Korea). diff --git a/en/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md b/en/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md index 0083c8ed44..93e5634e6e 100644 --- a/en/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md +++ b/en/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md @@ -15,7 +15,7 @@ The Government of Fukuoka, Japan together with "Matz" Matsumoto would like to in Entry Deadline: December 4, 2020 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz and a group of panelists will select the winners of the Fukuoka Competition. The grand prize for the Fukuoka Competition is 1 million yen. Past grand prize winners include Rhomobile (USA) and APEC Climate Center (Korea). diff --git a/es/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md b/es/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md index c720fe9fd0..1962c825ce 100644 --- a/es/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md +++ b/es/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md @@ -17,7 +17,7 @@ programa interesante en Ruby, anímate a aplicar. Fecha límite: Diciembre 27, 2016 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz y un grupo de panelistas eligirán a los ganadores de la Fukuoka Competition. El gran premio para Fukuoka Competition es de un millón de yens. diff --git a/es/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md b/es/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md index 6988c38b07..3b88442cc2 100644 --- a/es/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md +++ b/es/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md @@ -17,7 +17,7 @@ Fukuoka Ruby Award 2019 - Premio Mayor - 1 Millon de Yenes! Fecha límite para participar: Enero 31, 2019 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz y un grupo de panelistas elegirán los ganadores de la Competencia Fukuoka. El premio mayor de la Competencia Fukuoka es 1 millon de yenes. Los ganadores del premio mayor anteriores incluyen a Rhomobile (USA) y al Centro Climático APEC (Korea). diff --git a/es/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md b/es/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md index c3e43eed71..162d38e0a4 100644 --- a/es/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md +++ b/es/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md @@ -17,7 +17,7 @@ Premios para la Competencia Fukuoka 2020 - Premio Mayor - 1 Millon Yenes! Fecha límite: 11 de diciembre de 2019 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz y un grupo de panelistas seleccionarán los ganadores de la Competencia Fukuoka. El premio mayor de la Compentencia Fukuoka es de 1 millón de yenes. diff --git a/es/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md b/es/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md index 97728de457..74fae3f951 100644 --- a/es/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md +++ b/es/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md @@ -17,7 +17,7 @@ Concurso Galardon Ruby Fukuoka 2020 - Premio Mayor - 1 Millon Yenes! Fecha límite: 4 de diciembre de 2020 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz y un grupo de panelistas seleccionarán los ganadores del Concurso diff --git a/id/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md b/id/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md index 4542215696..558acc74b7 100644 --- a/id/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md +++ b/id/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md @@ -18,7 +18,7 @@ kompetisi ini. Batas akhir masuk: 27 Desember 2016 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz dan sebuah grup dari panelis akan memilih pemenang kompetisi ini. Hadiah utama kompetisi ini adalah 1 juta yen. diff --git a/id/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md b/id/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md index b14d4df27d..2d441bc4a4 100644 --- a/id/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md +++ b/id/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md @@ -18,7 +18,7 @@ kompetisi ini. Batas akhir masuk: 31 Januari 2018 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz dan sebuah grup dari panelis akan memilih pemenang kompetisi ini. Hadiah utama dari kompetisi ini adalah 1 juta Yen. Hadiah pemenang sebelumnya diff --git a/id/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md b/id/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md index ce5b5d8806..4183491df1 100644 --- a/id/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md +++ b/id/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md @@ -17,7 +17,7 @@ sebuah program Ruby yang menarik, dianjurkan untuk mengikuti kompetisi ini. Batas akhir pendaftaran: 31 Januari 2019 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz dan sebuah grup panelis akan memilih pemenang kompetisi ini. Hadiah utama dari kompetisi ini adalah 1 juta Yen. Hadiah pemenang sebelumnya termasuk diff --git a/id/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md b/id/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md index 1fa719c065..9731460e5c 100644 --- a/id/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md +++ b/id/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md @@ -17,7 +17,7 @@ sebuah program Ruby yang menarik, dianjurkan untuk mengikuti kompetisi ini. Batas akhir pendaftaran: 11 Desember 2019 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz dan sebuah grup panelis akan memilih pemenang kompetisi ini. Hadiah utama dari kompetisi ini adalah 1 juta Yen. Hadiah pemenang sebelumnya termasuk diff --git a/ko/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md b/ko/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md index 90d78d12cc..ef26394a6b 100644 --- a/ko/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md +++ b/ko/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md @@ -15,7 +15,7 @@ lang: ko 접수 마감: 2016년 12월 27일 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz를 포함한 패널들이 후쿠오카 경진대회의 우승자를 선택합니다. 후쿠오카 경진대회의 대상에게는 백만 엔의 상금이 주어집니다. diff --git a/ko/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md b/ko/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md index 7bc05a060a..9ef13b65fc 100644 --- a/ko/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md +++ b/ko/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md @@ -15,7 +15,7 @@ lang: ko 접수 마감: 2018년 1월 31일 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz를 포함한 패널들이 후쿠오카 경진대회의 우승자를 선택합니다. 후쿠오카 경진대회의 대상에게는 백만 엔의 상금이 주어집니다. diff --git a/ko/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md b/ko/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md index 27d0e9afc5..d8d146017f 100644 --- a/ko/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md +++ b/ko/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md @@ -15,7 +15,7 @@ lang: ko 접수 마감: 2019년 1월 31일 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz를 포함한 패널들이 후쿠오카 경진대회의 우승자를 선택합니다. 후쿠오카 경진대회의 대상에게는 백만 엔의 상금이 주어집니다. 이전 이 대회의 우승자로는 Rhomobile(미국)과 APEC 기후 센터(한국)가 있습니다. diff --git a/ko/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md b/ko/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md index fdf94a1daa..4932d27441 100644 --- a/ko/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md +++ b/ko/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md @@ -16,7 +16,7 @@ lang: ko 접수 마감: 2019년 12월 11일 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz를 포함한 패널들이 후쿠오카 경진대회의 우승자를 선택합니다. 후쿠오카 경진대회의 대상에게는 백만 엔의 상금이 주어집니다. diff --git a/ko/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md b/ko/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md index 3a82a152bd..dcf5bccbb1 100644 --- a/ko/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md +++ b/ko/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md @@ -16,7 +16,7 @@ lang: ko 접수 마감: 2020년 12월 4일 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz를 포함한 패널들이 후쿠오카 경진대회의 우승자를 선택합니다. 후쿠오카 경진대회의 대상에게는 백만 엔의 상금이 주어집니다. diff --git a/pt/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md b/pt/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md index a8f7d0330f..a06bfd58af 100644 --- a/pt/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md +++ b/pt/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md @@ -17,7 +17,7 @@ programa Ruby interessante, por favor sinta-se encorajado a participar. Prazo de inscrição: 27 de dezembro de 2016 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz e um grupo de palestrantes selecionarão os vencedores da _Fukuoka Competition_. O grande prêmio para a Fukuoka Competition é um milhão de ienes. diff --git a/pt/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md b/pt/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md index 4c6ffcc64e..8435b97b5a 100644 --- a/pt/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md +++ b/pt/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md @@ -17,7 +17,7 @@ Fukuoka Ruby Award 2018 - Grande Prêmio - 1 milhão de ienes! Prazo de Inscrição: 31 de janeiro de 2018 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz e um grupo de painelista selecionarão os vencededores da Fukuoka Competition. O grande prêmio da Fukuoka Competition diff --git a/pt/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md b/pt/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md index bb1ba16fa1..244eb83901 100644 --- a/pt/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md +++ b/pt/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md @@ -15,7 +15,7 @@ Competição Fukuoka Ruby Award 2019 - Grande Prêmio - 1 Milhão de Ienes! Data máxima para aplicação: 31 de Janeiro de 2019 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz e um grupo de jurados selecionarão os vencedores da competição de Fukuoka. O grande prêmio para essa competição é 1 milhão de ienes. Fora o grande prêmio, outras premiações incluem Rhomobile (EUA) and APEC Climate Center (Coréia). diff --git a/pt/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md b/pt/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md index 82c4b0f68f..24691f2a54 100644 --- a/pt/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md +++ b/pt/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md @@ -15,7 +15,7 @@ O governo de Fukuoka, Japão, juntamente com "Matz" Matsumoto gostariam de lhe c Prazo para inscrição: 11 de dezembro de 2019 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz e um grupo de painelistas selecionarão os(as) vencedores(as) da Fukuoka Competition. O grande prêmio da Fukuoka Competition será 1 milhão de ienes. Ganhedores anteriores incluem Rhomobile (USA) e APEC Climate Center (Korea). diff --git a/ru/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md b/ru/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md index 5749046038..4532250f93 100644 --- a/ru/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md +++ b/ru/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md @@ -15,7 +15,7 @@ lang: ru Крайний Срок Подачи Заявок: 11 Декабря 2019 Года -![Фукуока Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Фукуока Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz и группа участников дискуссии выберут победителей конкурса Фукуоки. Главный приз конкурса от Фукуоки - 1 миллион иен. Прошлые обладатели призов: Rhomobile (США) и Климатический Центр APEC (Корея). diff --git a/ru/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md b/ru/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md index c5f99988c7..d43fb25e82 100644 --- a/ru/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md +++ b/ru/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md @@ -15,7 +15,7 @@ lang: ru Последний день подачи заявки на участие: 4 декабря 2020 года. -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz и группа участников дискуссии выберут победителей соревнования Фукуоки. Главный приз в соревновании Фукуоки - 1 миллион иен. Среди предыдущих обладателей главного приза Rhomobile (США) и APEC Climate Center (Корея). diff --git a/tr/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md b/tr/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md index 1e9f64061a..981e0e5504 100644 --- a/tr/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md +++ b/tr/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md @@ -16,7 +16,7 @@ Eğer ilginç bir Ruby programı geliştirdiyseniz, lütfen başvurun. Son Başvuru Tarihi: 11 Aralık 2019 -![Fukuoka Ruby Ödülü](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Ödülü](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz ve bir grup oturum katılımcısı Fukuoka Yarışmasının kazananlarını belirleyecek. Fukuoka Yarışması için büyük ödül 1 milyon yen'dir. diff --git a/tr/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md b/tr/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md index 042ff0390d..9013e4e2b0 100644 --- a/tr/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md +++ b/tr/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md @@ -16,7 +16,7 @@ Eğer ilginç bir Ruby programı geliştirdiyseniz, lütfen başvurun. Son Başvuru Tarihi: 4 Aralık 2020 -![Fukuoka Ruby Ödülü](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Ödülü](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz ve bir grup oturum katılımcısı Fukuoka Yarışmasının kazananlarını belirleyecek. Fukuoka Yarışması için büyük ödül 1 milyon yen'dir. diff --git a/zh_cn/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md b/zh_cn/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md index 2bd20e83e8..2758dbec9b 100644 --- a/zh_cn/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md +++ b/zh_cn/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md @@ -15,7 +15,7 @@ lang: zh_cn 截止日期:2019 年 1 月 31 日 -![福冈 Ruby 竞赛](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![福冈 Ruby 竞赛](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) 本次福冈竞赛由松本行弘与其他专家评选获胜者。本次福冈竞赛大奖是一百万日元。 历届获奖者包括 Rhomobile(美国) 和 APEC Climate Center(韩国) diff --git a/zh_cn/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md b/zh_cn/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md index dee46ce937..1a1d56b1cd 100644 --- a/zh_cn/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md +++ b/zh_cn/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md @@ -15,7 +15,7 @@ lang: zh_cn 截止日期:2019 年 12 月 11 日 -![福冈 Ruby 竞赛](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![福冈 Ruby 竞赛](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) 本次福冈竞赛由松本行弘与其他专家评选获胜者。本次福冈竞赛大奖是一百万日元。 历届获奖者包括 Rhomobile(美国) 和 APEC Climate Center(韩国) diff --git a/zh_tw/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md b/zh_tw/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md index f7d0483d89..9239916a12 100644 --- a/zh_tw/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md +++ b/zh_tw/news/_posts/2016-10-20-fukuoka-ruby-award-2017.md @@ -15,7 +15,7 @@ lang: zh_tw 截止日期:2016 年 12 月 27 日。 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz 與評審委員小組會選出本次大賽的優勝者。福岡 Ruby 大賽的最大獎是壹百萬日圓。過去的優勝者有來自美國的 Rhomobile 公司以及韓國釜山的亞太經貿氣候中心。 diff --git a/zh_tw/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md b/zh_tw/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md index 31b9d3af18..9e5536b16f 100644 --- a/zh_tw/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md +++ b/zh_tw/news/_posts/2017-12-27-fukuoka-ruby-award-2018.md @@ -15,7 +15,7 @@ lang: zh_tw 截止日期:2018 年 1 月 31 日。 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz 與評審委員小組會選出本次大賽的優勝者。福岡 Ruby 大賽的最大獎是壹百萬日圓。過去的優勝者有來自美國的 Rhomobile 公司以及韓國釜山的亞太經貿氣候中心。 diff --git a/zh_tw/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md b/zh_tw/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md index 9fbe713a46..5421603380 100644 --- a/zh_tw/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md +++ b/zh_tw/news/_posts/2018-11-29-fukuoka-ruby-award-2019.md @@ -15,7 +15,7 @@ lang: zh_tw 截止日期:2019 年 1 月 31 日。 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz 與評審委員小組會選出本次大賽的優勝者。福岡 Ruby 大賽的最大獎是壹百萬日圓。過去的優勝者有來自美國的 Rhomobile 公司以及韓國釜山的亞太經貿氣候中心。 diff --git a/zh_tw/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md b/zh_tw/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md index fff9a9369c..6e463bb537 100644 --- a/zh_tw/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md +++ b/zh_tw/news/_posts/2019-10-16-fukuoka-ruby-award-2020.md @@ -15,7 +15,7 @@ lang: zh_tw 截止日期:2019 年 12 月 11 日。 -![Fukuoka Ruby Award](http://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) Matz 與評審委員小組會選出本次大賽的優勝者。福岡 Ruby 大賽的最大獎是壹百萬日圓。過去的優勝者有來自美國的 Rhomobile 公司以及韓國釜山的亞太經貿氣候中心。 From b958b67728457470cc4905acb5eedb70a9858898 Mon Sep 17 00:00:00 2001 From: Vagish Vela Date: Tue, 20 Oct 2020 13:28:33 -0400 Subject: [PATCH 0128/1487] Remove link on RailsConf Europe The link is no longer there. --- bg/community/conferences/index.md | 2 +- en/community/conferences/index.md | 2 +- fr/community/conferences/index.md | 2 +- id/community/conferences/index.md | 2 +- ko/community/conferences/index.md | 2 +- pt/community/conferences/index.md | 2 +- ru/community/conferences/index.md | 2 +- vi/community/conferences/index.md | 2 +- zh_cn/community/conferences/index.md | 2 +- zh_tw/community/conferences/index.md | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bg/community/conferences/index.md b/bg/community/conferences/index.md index e3264b2db9..2f01d9a29d 100644 --- a/bg/community/conferences/index.md +++ b/bg/community/conferences/index.md @@ -53,7 +53,7 @@ Valley Ruby Conference. Ruby присъства на [O’Reilly Open Source Conference][10] (OSCON) от 2004 г. Някои от конференциите, свързани с [Ruby on Rails][11], са: Ruby Central’s -[RailsConf][12], [RailsConf Europe][13] (през 2006 г. с помощта на Ruby +[RailsConf][12], RailsConf Europe (през 2006 г. с помощта на Ruby Central и [Skills Matter][14], и през 2007 г. с помощта на Ruby Central и O’Reilly), както и Canada on Rails и Scotland on Rails. diff --git a/en/community/conferences/index.md b/en/community/conferences/index.md index 7d424bd9ba..c890bb93c9 100644 --- a/en/community/conferences/index.md +++ b/en/community/conferences/index.md @@ -67,7 +67,7 @@ There has been a Ruby track at the [O’Reilly Open Source Conference][10] (OSCON) since 2004, and an increasing presence on the part of Ruby and Rubyists at other non-Ruby-specific gatherings. A number of conferences have also been devoted to [Ruby on Rails][11], including Ruby Central’s -[RailsConf][12], [RailsConf Europe][13] (co-produced in 2006 by Ruby +[RailsConf][12], RailsConf Europe (co-produced in 2006 by Ruby Central and [Skills Matter][14], and in 2007 by Ruby Central and O’Reilly), and Canada on Rails. diff --git a/fr/community/conferences/index.md b/fr/community/conferences/index.md index 803d609b27..3271cc4e0e 100644 --- a/fr/community/conferences/index.md +++ b/fr/community/conferences/index.md @@ -64,7 +64,7 @@ Conference*][8] (OSCON) depuis 2004. Par ailleurs, les rubyistes maintiennent une très forte présence dans divers regroupements non directement liés à Ruby. De très nombreuses conférences ont été consacrées à [Ruby on Rails][9], à commencer par la [RailsConf][10] de -Ruby Central, la [RailsConf Europe][11] (co-produite en 2006 par Ruby +Ruby Central, la RailsConf Europe (co-produite en 2006 par Ruby Central et [Skills Matter][12], organisée en 2007 par Ruby Central et O’Reilly) et enfin *Canada on Rails*. diff --git a/id/community/conferences/index.md b/id/community/conferences/index.md index ad2723f13a..9ccff1708c 100644 --- a/id/community/conferences/index.md +++ b/id/community/conferences/index.md @@ -73,7 +73,7 @@ diadakan pada tahun 2017 di Jakarta. [O’Reilly Open Source Conference][10] (OSCON) telah mempunyai sesi Ruby sejak tahun 2004, dan juga mempunyai semakin banyak pendukung Ruby. Berbagai konferensi lain juga diadakan untuk [Ruby on Rails][11], -termasuk [RailsConf][12] oleh Ruby Central, [RailsConf Europe][13] +termasuk [RailsConf][12] oleh Ruby Central, RailsConf Europe (diselenggarakan bersama tahun 2006 oleh Ruby Central dan [Skills Matter][14], dan tahun 2007 oleh Ruby Central dan O’Reilly), dan Canada on Rails. diff --git a/ko/community/conferences/index.md b/ko/community/conferences/index.md index f63987c5e4..fe7af41f07 100644 --- a/ko/community/conferences/index.md +++ b/ko/community/conferences/index.md @@ -41,7 +41,7 @@ lang: ko 2004년부터 [오라일리 오픈소스 콘퍼런스][10](OSCON)에 루비 트랙이 생겼고 매년 다른 언어의 트랙에 비해 비중이 증가하는 추세입니다. Ruby Central의 -[RailsConf][12], [RailsConf Europe][13] (2006년엔 Ruby Central과 +[RailsConf][12], RailsConf Europe (2006년엔 Ruby Central과 [Skills Matter][14]에 의해 2007년엔 Ruby Central과 오라일리에 의해 공동기획), Canada on Rails 등등의 많은 콘퍼런스들은 [루비 온 레일즈][11]의 헌신 덕분에 가능했습니다. diff --git a/pt/community/conferences/index.md b/pt/community/conferences/index.md index 301676b7d4..be77faf1e3 100644 --- a/pt/community/conferences/index.md +++ b/pt/community/conferences/index.md @@ -67,7 +67,7 @@ Tem havido uma _track_ de Ruby na [O’Reilly Open Source Conference][9] Programadores Ruby em outros encontros não relacionados com Ruby. Tem havido também, um crescente número de conferências dedicadas a [Ruby on Rails][10], incluindo a [RailsConf][11] da Ruby Central, a -[RailsConf Europe][12] (co-realizada em 2006 pela Ruby Central e pela +RailsConf Europe (co-realizada em 2006 pela Ruby Central e pela [Skills Matter][13], e que em 2007 o será pela Ruby Central e O’Reilly) e, para finalizar a Canada on Rails. diff --git a/ru/community/conferences/index.md b/ru/community/conferences/index.md index 1824220070..2dc931b42f 100644 --- a/ru/community/conferences/index.md +++ b/ru/community/conferences/index.md @@ -56,7 +56,7 @@ Ruby on Rails. Событие проводится в Chicago сообществ С 2004 года часть конференции [O’Reilly Open Source Conference][10] посвящена темам Ruby. Также количество рубистов и тем о Ruby растет на других не Ruby-специфичных событиях. Некоторые конференции, посвященные -[Ruby on Rails][11]: [RailsConf][12] от Ruby Central, [RailsConf Europe][13] (Ruby +[Ruby on Rails][11]: [RailsConf][12] от Ruby Central, RailsConf Europe (Ruby Central и [Skills Matter][14] соучередители с 2006, и с 2007 года – Ruby Central и O’Reilly), и Canada on Rails. diff --git a/vi/community/conferences/index.md b/vi/community/conferences/index.md index 7e3975cb38..dda78840c1 100644 --- a/vi/community/conferences/index.md +++ b/vi/community/conferences/index.md @@ -76,7 +76,7 @@ một ngày. Có một số người quan tâm đến Ruby tại [hội thảo mã nguồn mở O’Reilly][10] (OSCON) từ năm 2004, và con số này không ngừng tăng lên qua các hội thảo khác. Một số hội thảo dành riêng cho [Ruby on Rails][11], gồm [RailsConf][12] của -Ruby Central, [RailsConf Europe][13] (đồng tổ chức bởi Ruby Central và +Ruby Central, RailsConf Europe (đồng tổ chức bởi Ruby Central và [Skills Matter][14] năm 2006, Ruby Central và O’Reilly năm 2007), và Canada on Rails. diff --git a/zh_cn/community/conferences/index.md b/zh_cn/community/conferences/index.md index 96479d1758..7c055ba01e 100644 --- a/zh_cn/community/conferences/index.md +++ b/zh_cn/community/conferences/index.md @@ -54,7 +54,7 @@ Ruby 相关的报道,而且我们总是对 Ruby 相关的内容更感兴趣。 自2004年起的 [O’Reilly Open Source Conference][10](OSCON) 研讨会包括了一整轨的 Ruby 演讲, Ruby 相关的内容都在逐年增加。许多研讨会都以 [Ruby on Rails][11] 为主题,包括 Ruby Central 的 -[RailsConf][12]、[RailsConf Europe][13](RubyCentral 和 [Skills Matter][14] 在2006年共同举办, +[RailsConf][12]、RailsConf Europe(RubyCentral 和 [Skills Matter][14] 在2006年共同举办, 2007年由 Ruby Central 和 O’Reilly 举办)以及 Canada on Rails。 diff --git a/zh_tw/community/conferences/index.md b/zh_tw/community/conferences/index.md index 4594a20128..d6b380788b 100644 --- a/zh_tw/community/conferences/index.md +++ b/zh_tw/community/conferences/index.md @@ -60,7 +60,7 @@ lang: zh_tw 自 2004 年起的 [O’Reilly Open Source Conference][10] (OSCON) 研討會也包括了一整軌的 Ruby 演講,並逐年增加中。 也有許多研討會以 [Ruby on Rails][11] 為主題,包括了 Ruby Central 的 -[RailsConf][12]、[RailsConf Europe][13] +[RailsConf][12]、RailsConf Europe (2006 年由 Ruby Central 和 [Skills Matter][14] 共同舉辦, 2007 年由 Ruby Central 和 O’Reilly 共同舉辦)以及 Canada on Rails. From 8c17ad57016532d55d8dfabcab4fbe3c7ec0a597 Mon Sep 17 00:00:00 2001 From: Vagish Vela Date: Tue, 20 Oct 2020 13:31:34 -0400 Subject: [PATCH 0129/1487] Remove all http links to Rails Europe Removing the links from the list as the website no longer list and is no longer references. --- bg/community/conferences/index.md | 1 - en/community/conferences/index.md | 1 - fr/community/conferences/index.md | 1 - id/community/conferences/index.md | 1 - it/community/conferences/index.md | 1 - ko/community/conferences/index.md | 1 - pt/community/conferences/index.md | 1 - ru/community/conferences/index.md | 1 - tr/community/conferences/index.md | 1 - vi/community/conferences/index.md | 1 - zh_cn/community/conferences/index.md | 1 - zh_tw/community/conferences/index.md | 1 - 12 files changed, 12 deletions(-) diff --git a/bg/community/conferences/index.md b/bg/community/conferences/index.md index 2f01d9a29d..39c4a047db 100644 --- a/bg/community/conferences/index.md +++ b/bg/community/conferences/index.md @@ -70,5 +70,4 @@ Central и [Skills Matter][14], и през 2007 г. с помощта на Ruby [10]: http://conferences.oreillynet.com/os2006/ [11]: http://www.rubyonrails.org [12]: http://www.railsconf.org -[13]: http://europe.railsconf.org [14]: http://www.skillsmatter.com diff --git a/en/community/conferences/index.md b/en/community/conferences/index.md index c890bb93c9..1eee76fadf 100644 --- a/en/community/conferences/index.md +++ b/en/community/conferences/index.md @@ -83,7 +83,6 @@ O’Reilly), and Canada on Rails. [10]: http://conferences.oreillynet.com/os2006/ [11]: http://www.rubyonrails.org [12]: http://www.railsconf.org -[13]: http://europe.railsconf.org [14]: http://www.skillsmatter.com [16]: http://steelcityruby.org/ [19]: http://goruco.com/ diff --git a/fr/community/conferences/index.md b/fr/community/conferences/index.md index 3271cc4e0e..e09a4b7760 100644 --- a/fr/community/conferences/index.md +++ b/fr/community/conferences/index.md @@ -79,7 +79,6 @@ O’Reilly) et enfin *Canada on Rails*. [8]: http://conferences.oreillynet.com/os2006/ [9]: http://www.rubyonrails.org [10]: http://www.railsconf.org -[11]: http://europe.railsconf.org [12]: http://www.skillsmatter.com [13]: http://rulu.eu [14]: http://la-conf.org diff --git a/id/community/conferences/index.md b/id/community/conferences/index.md index 9ccff1708c..12618fed9d 100644 --- a/id/community/conferences/index.md +++ b/id/community/conferences/index.md @@ -90,7 +90,6 @@ on Rails. [10]: http://conferences.oreillynet.com/os2006/ [11]: http://www.rubyonrails.org [12]: http://www.railsconf.org -[13]: http://europe.railsconf.org [14]: http://www.skillsmatter.com [16]: http://steelcityruby.org/ [19]: http://goruco.com/ diff --git a/it/community/conferences/index.md b/it/community/conferences/index.md index e68485ed53..1e84e0136f 100644 --- a/it/community/conferences/index.md +++ b/it/community/conferences/index.md @@ -102,7 +102,6 @@ e in 2007 da Ruby Central e O’Reilly), e infine Canada on Rails. [10]: http://conferences.oreillynet.com/os2006/ [11]: http://www.rubyonrails.org [12]: http://www.railsconf.org -[13]: http://europe.railsconf.org [14]: http://www.skillsmatter.com [15]: http://madisonruby.org/ [16]: http://steelcityruby.org/ diff --git a/ko/community/conferences/index.md b/ko/community/conferences/index.md index fe7af41f07..6cea3c40f7 100644 --- a/ko/community/conferences/index.md +++ b/ko/community/conferences/index.md @@ -59,5 +59,4 @@ Canada on Rails 등등의 많은 콘퍼런스들은 [루비 온 레일즈][11] [10]: http://conferences.oreillynet.com/os2006/ [11]: http://www.rubyonrails.org [12]: http://www.railsconf.org -[13]: http://europe.railsconf.org [14]: http://www.skillsmatter.com diff --git a/pt/community/conferences/index.md b/pt/community/conferences/index.md index be77faf1e3..1232d442cf 100644 --- a/pt/community/conferences/index.md +++ b/pt/community/conferences/index.md @@ -85,7 +85,6 @@ O’Reilly) e, para finalizar a Canada on Rails. [9]: http://conferences.oreillynet.com/os2006/ [10]: http://www.rubyonrails.org [11]: http://www.railsconf.org -[12]: http://europe.railsconf.org [13]: http://www.skillsmatter.com [14]: http://steelcityruby.org/ [15]: http://goruco.com/ diff --git a/ru/community/conferences/index.md b/ru/community/conferences/index.md index 2dc931b42f..62c1cbf36d 100644 --- a/ru/community/conferences/index.md +++ b/ru/community/conferences/index.md @@ -73,5 +73,4 @@ O’Reilly), и Canada on Rails. [10]: http://conferences.oreillynet.com/os2006/ [11]: http://www.rubyonrails.org [12]: http://www.railsconf.org -[13]: http://europe.railsconf.org [14]: http://www.skillsmatter.com diff --git a/tr/community/conferences/index.md b/tr/community/conferences/index.md index 2266a5e6bf..8fc1e10693 100644 --- a/tr/community/conferences/index.md +++ b/tr/community/conferences/index.md @@ -66,7 +66,6 @@ Ayrıca Ruby Central'in [RailsConf][12]'u, [RailsConf Avrupa][13] (2006'da Ruby [10]: http://conferences.oreillynet.com/os2006/ [11]: http://www.rubyonrails.org [12]: http://www.railsconf.org -[13]: http://europe.railsconf.org [14]: http://www.skillsmatter.com [16]: http://steelcityruby.org/ [19]: http://goruco.com/ diff --git a/vi/community/conferences/index.md b/vi/community/conferences/index.md index dda78840c1..dc78fee5e3 100644 --- a/vi/community/conferences/index.md +++ b/vi/community/conferences/index.md @@ -94,7 +94,6 @@ và Canada on Rails. [10]: http://conferences.oreillynet.com/os2006/ [11]: http://www.rubyonrails.org [12]: http://www.railsconf.org -[13]: http://europe.railsconf.org [14]: http://www.skillsmatter.com [15]: http://madisonruby.org/ [16]: http://steelcityruby.org/ diff --git a/zh_cn/community/conferences/index.md b/zh_cn/community/conferences/index.md index 7c055ba01e..56d668c5c8 100644 --- a/zh_cn/community/conferences/index.md +++ b/zh_cn/community/conferences/index.md @@ -71,7 +71,6 @@ Ruby 相关的内容都在逐年增加。许多研讨会都以 [Ruby on Rails][1 [10]: http://conferences.oreillynet.com/os2006/ [11]: http://www.rubyonrails.org [12]: http://www.railsconf.org -[13]: http://europe.railsconf.org [14]: http://www.skillsmatter.com [15]: http://madisonruby.org/ [16]: http://steelcityruby.org/ diff --git a/zh_tw/community/conferences/index.md b/zh_tw/community/conferences/index.md index d6b380788b..f7bee11b05 100644 --- a/zh_tw/community/conferences/index.md +++ b/zh_tw/community/conferences/index.md @@ -83,7 +83,6 @@ lang: zh_tw [10]: http://conferences.oreillynet.com/os2006/ [11]: http://www.rubyonrails.org [12]: http://www.railsconf.org -[13]: http://europe.railsconf.org [14]: http://www.skillsmatter.com [16]: http://steelcityruby.org/ [19]: http://goruco.com/ From 6cbd01f0b65c7931aadbb50831cc462733a7ae41 Mon Sep 17 00:00:00 2001 From: Juanito Fatas Date: Thu, 22 Oct 2020 19:10:57 +0900 Subject: [PATCH 0130/1487] Fix build Fix warning: there is no architecture key Caching bundle install automatically bundler already installed use actions/checkout v2 Remove CUSTOM_RUBY_VERSION --- .github/workflows/ci.yml | 16 ++-------------- Gemfile | 1 - 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d93d4abd61..1e0029b1b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,28 +18,16 @@ jobs: - name: Dump environment run: env | sort - name: Checkout ruby/www.ruby-lang.org - uses: actions/checkout@v1 + uses: actions/checkout@v2 with: fetch-depth: 1 - name: Setup Ruby uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - architecture: x64 + bundler-cache: true - name: Dump Ruby version run: ruby -v - # override the Ruby version specified in the Gemfile - - name: Set CUSTOM_RUBY_VERSION for Gemfile - run: echo ::set-env name=CUSTOM_RUBY_VERSION::$(ruby -e 'puts RUBY_VERSION') - - name: Dump CUSTOM_RUBY_VERSION - run: echo $CUSTOM_RUBY_VERSION - - name: Cache gem bundle - uses: actions/cache@v1 - with: - path: vendor/bundle - key: ${{ runner.os }}-${{ matrix.ruby }}-bundle-${{ hashFiles('Gemfile.lock') }} - - name: Install bundler - run: gem install bundler --no-document - name: Install gem bundle run: | bundle config set path 'vendor/bundle' diff --git a/Gemfile b/Gemfile index d178085632..ca397f75bd 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,4 @@ source "https://rubygems.org" -ruby ENV['CUSTOM_RUBY_VERSION'] || '~> 2.7.0' gem 'rake' gem 'jekyll', '~> 4.0' From ba07f2b56d73548d3ff011ee47f297f95b3535d1 Mon Sep 17 00:00:00 2001 From: Vagish Vela Date: Wed, 21 Oct 2020 14:03:19 -0400 Subject: [PATCH 0131/1487] Update ruby c extension link The link was pointing to an old location, updating to the new location. Closes #2518 --- de/documentation/index.md | 2 +- en/documentation/index.md | 2 +- es/documentation/index.md | 2 +- fr/documentation/index.md | 2 +- id/documentation/index.md | 2 +- ko/documentation/index.md | 2 +- tr/documentation/index.md | 2 +- vi/documentation/index.md | 2 +- zh_tw/documentation/index.md | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/de/documentation/index.md b/de/documentation/index.md index 93f7511a71..87899f61c4 100644 --- a/de/documentation/index.md +++ b/de/documentation/index.md @@ -81,7 +81,7 @@ deutschsprachigen Artikeln. Für weitergehende Fragen steht eine große [8]: http://www.approximity.com/rubybuch2/ [9]: http://www.ruby-doc.org/core [10]: http://www.ruby-doc.org/stdlib -[extensions]: https://docs.ruby-lang.org/en/master/extension_rdoc.html +[extensions]: https://docs.ruby-lang.org/en/master/doc/extension_rdoc.html [12]: http://www.rubydoc.info/ [13]: http://ruby-doc.org [14]: http://wiki.ruby-portal.de diff --git a/en/documentation/index.md b/en/documentation/index.md index 97bdb93eb3..8f73ebffa7 100644 --- a/en/documentation/index.md +++ b/en/documentation/index.md @@ -141,7 +141,7 @@ If you have questions about Ruby the [13]: http://www.ruby-doc.org/core [14]: https://ruby.github.io/rdoc/ [15]: http://www.ruby-doc.org/stdlib -[extensions]: https://docs.ruby-lang.org/en/master/extension_rdoc.html +[extensions]: https://docs.ruby-lang.org/en/master/doc/extension_rdoc.html [16]: http://www.rubydoc.info/ [17]: http://rubydocs.org/ [18]: http://apidock.com/ diff --git a/es/documentation/index.md b/es/documentation/index.md index 20035327c1..d96c2f748a 100644 --- a/es/documentation/index.md +++ b/es/documentation/index.md @@ -72,6 +72,6 @@ correo](/es/community/mailing-lists/) es un buen lugar para comenzar. [7]: http://www.ruby-doc.org/core [8]: https://ruby.github.io/rdoc/ [9]: http://www.ruby-doc.org/stdlib -[extensions]: https://docs.ruby-lang.org/en/master/extension_rdoc.html +[extensions]: https://docs.ruby-lang.org/en/master/doc/extension_rdoc.html [11]: http://ruby-doc.org [12]: http://www.ruby-doc.org/bookstore diff --git a/fr/documentation/index.md b/fr/documentation/index.md index 574b2b1f8e..00b5f29f31 100644 --- a/fr/documentation/index.md +++ b/fr/documentation/index.md @@ -143,7 +143,7 @@ la [liste de diffusion](/en/community/mailing-lists/) est un bon endroit [16]: http://www.ruby-doc.org/core [17]: https://ruby.github.io/rdoc/ [18]: http://www.ruby-doc.org/stdlib -[extensions]: https://docs.ruby-lang.org/en/master/extension_rdoc.html +[extensions]: https://docs.ruby-lang.org/en/master/doc/extension_rdoc.html [20]: http://rubydoc.info/ [21]: http://rubydocs.org/ [22]: http://ruby-doc.org diff --git a/id/documentation/index.md b/id/documentation/index.md index e84330ec6d..84262768f7 100644 --- a/id/documentation/index.md +++ b/id/documentation/index.md @@ -140,7 +140,7 @@ adalah tempat yang baik untuk memulai. [13]: http://www.ruby-doc.org/core [14]: https://ruby.github.io/rdoc/ [15]: http://www.ruby-doc.org/stdlib -[extensions]: https://docs.ruby-lang.org/en/master/extension_rdoc.html +[extensions]: https://docs.ruby-lang.org/en/master/doc/extension_rdoc.html [16]: http://www.rubydoc.info/ [17]: http://rubydocs.org/ [18]: http://apidock.com/ diff --git a/ko/documentation/index.md b/ko/documentation/index.md index 3fb9c898a9..0268f467dc 100644 --- a/ko/documentation/index.md +++ b/ko/documentation/index.md @@ -144,7 +144,7 @@ lang: ko [13]: http://www.ruby-doc.org/core [14]: https://ruby.github.io/rdoc/ [15]: http://www.ruby-doc.org/stdlib -[extensions]: https://docs.ruby-lang.org/en/master/extension_rdoc.html +[extensions]: https://docs.ruby-lang.org/en/master/doc/extension_rdoc.html [16]: http://www.rubydoc.info/ [17]: http://rubydocs.org/ [18]: http://apidock.com/ diff --git a/tr/documentation/index.md b/tr/documentation/index.md index 0e93a6c9ba..e2670fe4a8 100644 --- a/tr/documentation/index.md +++ b/tr/documentation/index.md @@ -154,7 +154,7 @@ olacaktır. [13]: http://www.ruby-doc.org/core [14]: https://ruby.github.io/rdoc/ [15]: http://www.ruby-doc.org/stdlib -[extensions]: https://docs.ruby-lang.org/en/master/extension_rdoc.html +[extensions]: https://docs.ruby-lang.org/en/master/doc/extension_rdoc.html [16]: http://www.rubydoc.info/ [17]: http://rubydocs.org/ [18]: http://apidock.com/ diff --git a/vi/documentation/index.md b/vi/documentation/index.md index dd03f4a529..d353c01181 100644 --- a/vi/documentation/index.md +++ b/vi/documentation/index.md @@ -151,7 +151,7 @@ là một nơi tuyệt vời. [13]: http://www.ruby-doc.org/core [14]: https://ruby.github.io/rdoc/ [15]: http://www.ruby-doc.org/stdlib -[extensions]: https://docs.ruby-lang.org/en/master/extension_rdoc.html +[extensions]: https://docs.ruby-lang.org/en/master/doc/extension_rdoc.html [16]: http://www.rubydoc.info/ [17]: http://rubydocs.org/ [18]: http://apidock.com/ diff --git a/zh_tw/documentation/index.md b/zh_tw/documentation/index.md index b74c4f2aaa..59e0711fc8 100644 --- a/zh_tw/documentation/index.md +++ b/zh_tw/documentation/index.md @@ -117,7 +117,7 @@ lang: zh_tw [13]: http://www.ruby-doc.org/core [14]: https://ruby.github.io/rdoc/ [15]: http://www.ruby-doc.org/stdlib -[extensions]: https://docs.ruby-lang.org/en/master/extension_rdoc.html +[extensions]: https://docs.ruby-lang.org/en/master/doc/extension_rdoc.html [16]: http://www.rubydoc.info/ [17]: http://rubydocs.org/ [18]: http://apidock.com/ From 27f4bbdd88bcb135f09e348eba7a651a9d217068 Mon Sep 17 00:00:00 2001 From: Juanito Fatas Date: Thu, 22 Oct 2020 20:51:26 +0900 Subject: [PATCH 0132/1487] We dont need to run bundle install it is already performed by ruby/setup-ruby Co-Authored-By: Chayoung You --- .github/workflows/ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e0029b1b0..2ede80db16 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,9 +28,5 @@ jobs: bundler-cache: true - name: Dump Ruby version run: ruby -v - - name: Install gem bundle - run: | - bundle config set path 'vendor/bundle' - bundle install - name: Run tests run: bundle exec rake test From 1bbfbbef5fba5d16634f8bfb82914c2e3bc6a117 Mon Sep 17 00:00:00 2001 From: Vagish Vela Date: Wed, 21 Oct 2020 14:11:12 -0400 Subject: [PATCH 0133/1487] Update broken Ruby Central Grants link The link to grants by Ruby Central was broken, so updating the link to the new URL. Closes #2519 --- bg/community/conferences/index.md | 2 +- en/community/conferences/index.md | 2 +- fr/community/conferences/index.md | 2 +- id/community/conferences/index.md | 2 +- it/community/conferences/index.md | 2 +- pt/community/conferences/index.md | 2 +- ru/community/conferences/index.md | 2 +- tr/community/conferences/index.md | 2 +- vi/community/conferences/index.md | 2 +- zh_cn/community/conferences/index.md | 2 +- zh_tw/community/conferences/index.md | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/bg/community/conferences/index.md b/bg/community/conferences/index.md index 39c4a047db..d26a7ec491 100644 --- a/bg/community/conferences/index.md +++ b/bg/community/conferences/index.md @@ -65,7 +65,7 @@ Central и [Skills Matter][14], и през 2007 г. с помощта на Ruby [3]: http://rubykaigi.org/ [4]: http://euruko.org [5]: http://www.osdc.com.au/ -[6]: http://rubycentral.org/community/grant +[6]: https://rubycentral.org/grants [7]: http://www.svforum.org [10]: http://conferences.oreillynet.com/os2006/ [11]: http://www.rubyonrails.org diff --git a/en/community/conferences/index.md b/en/community/conferences/index.md index 1eee76fadf..7ed2abce1f 100644 --- a/en/community/conferences/index.md +++ b/en/community/conferences/index.md @@ -78,7 +78,7 @@ O’Reilly), and Canada on Rails. [2]: http://rubycentral.org [3]: http://rubykaigi.org/ [4]: http://euruko.org -[6]: http://rubycentral.org/community/grant +[6]: https://rubycentral.org/grants [9]: http://windycityrails.org [10]: http://conferences.oreillynet.com/os2006/ [11]: http://www.rubyonrails.org diff --git a/fr/community/conferences/index.md b/fr/community/conferences/index.md index e09a4b7760..f45f056d85 100644 --- a/fr/community/conferences/index.md +++ b/fr/community/conferences/index.md @@ -74,7 +74,7 @@ O’Reilly) et enfin *Canada on Rails*. [3]: http://rubykaigi.org/ [4]: http://euruko.org [5]: http://www.osdc.com.au/ -[6]: http://rubycentral.org/community/grant +[6]: https://rubycentral.org/grants [7]: http://www.svforum.org [8]: http://conferences.oreillynet.com/os2006/ [9]: http://www.rubyonrails.org diff --git a/id/community/conferences/index.md b/id/community/conferences/index.md index 12618fed9d..d8a269b5b0 100644 --- a/id/community/conferences/index.md +++ b/id/community/conferences/index.md @@ -85,7 +85,7 @@ on Rails. [2]: http://rubycentral.org [3]: http://rubykaigi.org/ [4]: http://euruko.org -[6]: http://rubycentral.org/community/grant +[6]: https://rubycentral.org/grants [9]: http://windycityrails.org [10]: http://conferences.oreillynet.com/os2006/ [11]: http://www.rubyonrails.org diff --git a/it/community/conferences/index.md b/it/community/conferences/index.md index 1e84e0136f..5b7c2cd4c9 100644 --- a/it/community/conferences/index.md +++ b/it/community/conferences/index.md @@ -96,7 +96,7 @@ e in 2007 da Ruby Central e O’Reilly), e infine Canada on Rails. [3]: http://rubykaigi.org/ [4]: http://euruko.org [5]: http://www.osdc.com.au/ -[6]: http://rubycentral.org/community/grant +[6]: https://rubycentral.org/grants [7]: http://www.svforum.org [9]: http://windycityrails.org [10]: http://conferences.oreillynet.com/os2006/ diff --git a/pt/community/conferences/index.md b/pt/community/conferences/index.md index 1232d442cf..5c676635a7 100644 --- a/pt/community/conferences/index.md +++ b/pt/community/conferences/index.md @@ -79,7 +79,7 @@ O’Reilly) e, para finalizar a Canada on Rails. [2]: http://rubycentral.org [3]: http://rubykaigi.org/ [4]: http://euruko.org -[5]: http://rubycentral.org/community/grant +[5]: https://rubycentral.org/grants [6]: http://www.svforum.org [8]: http://windycityrails.org [9]: http://conferences.oreillynet.com/os2006/ diff --git a/ru/community/conferences/index.md b/ru/community/conferences/index.md index 62c1cbf36d..8055bcea55 100644 --- a/ru/community/conferences/index.md +++ b/ru/community/conferences/index.md @@ -67,7 +67,7 @@ O’Reilly), и Canada on Rails. [3]: http://rubykaigi.org/ [4]: http://euruko.org [5]: http://www.osdc.com.au/ -[6]: http://rubycentral.org/community/grant +[6]: https://rubycentral.org/grants [7]: http://www.svforum.org [9]: http://windycityrails.org [10]: http://conferences.oreillynet.com/os2006/ diff --git a/tr/community/conferences/index.md b/tr/community/conferences/index.md index 8fc1e10693..4c0efe153e 100644 --- a/tr/community/conferences/index.md +++ b/tr/community/conferences/index.md @@ -61,7 +61,7 @@ Ayrıca Ruby Central'in [RailsConf][12]'u, [RailsConf Avrupa][13] (2006'da Ruby [2]: http://rubycentral.org [3]: http://rubykaigi.org/ [4]: http://euruko.org -[6]: http://rubycentral.org/community/grant +[6]: https://rubycentral.org/grants [9]: http://windycityrails.org [10]: http://conferences.oreillynet.com/os2006/ [11]: http://www.rubyonrails.org diff --git a/vi/community/conferences/index.md b/vi/community/conferences/index.md index dc78fee5e3..14d7b5bfde 100644 --- a/vi/community/conferences/index.md +++ b/vi/community/conferences/index.md @@ -88,7 +88,7 @@ và Canada on Rails. [3]: http://rubykaigi.org/ [4]: http://euruko.org [5]: http://www.osdc.com.au/ -[6]: http://rubycentral.org/community/grant +[6]: https://rubycentral.org/grants [7]: http://www.svforum.org [9]: http://windycityrails.org [10]: http://conferences.oreillynet.com/os2006/ diff --git a/zh_cn/community/conferences/index.md b/zh_cn/community/conferences/index.md index 56d668c5c8..23a80e425f 100644 --- a/zh_cn/community/conferences/index.md +++ b/zh_cn/community/conferences/index.md @@ -65,7 +65,7 @@ Ruby 相关的内容都在逐年增加。许多研讨会都以 [Ruby on Rails][1 [3]: http://rubykaigi.org/ [4]: http://euruko.org [5]: http://www.osdc.com.au/ -[6]: http://rubycentral.org/community/grant +[6]: https://rubycentral.org/grants [7]: http://www.svforum.org [9]: http://windycityrails.org [10]: http://conferences.oreillynet.com/os2006/ diff --git a/zh_tw/community/conferences/index.md b/zh_tw/community/conferences/index.md index f7bee11b05..33be6cd34c 100644 --- a/zh_tw/community/conferences/index.md +++ b/zh_tw/community/conferences/index.md @@ -77,7 +77,7 @@ lang: zh_tw [2]: http://rubycentral.org [3]: http://rubykaigi.org/ [4]: http://euruko.org -[6]: http://rubycentral.org/community/grant +[6]: https://rubycentral.org/grants [7]: http://www.svforum.org [9]: http://windycityrails.org [10]: http://conferences.oreillynet.com/os2006/ From 643fab9ebba2dacab7443164a44e5dddc53e8426 Mon Sep 17 00:00:00 2001 From: ismailarilik Date: Fri, 16 Oct 2020 20:13:22 +0300 Subject: [PATCH 0134/1487] Fix a typo in FAQ/4 Closes #2508 --- en/documentation/faq/4/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/documentation/faq/4/index.md b/en/documentation/faq/4/index.md index 800c496e45..41fe2fdeec 100644 --- a/en/documentation/faq/4/index.md +++ b/en/documentation/faq/4/index.md @@ -308,7 +308,7 @@ a block following the method call will be converted into a `Proc` object and assigned to the formal parameter. If the last actual argument in a method invocation is a `Proc` object, -you can precede its name with an ampersand to convert in into a block. +you can precede its name with an ampersand to convert it into a block. The method may then use `yield` to call it. ~~~ From 0f1daded9342f66c7b9658a76d6fc014330a23eb Mon Sep 17 00:00:00 2001 From: Vagish Vela Date: Wed, 21 Oct 2020 08:54:47 -0400 Subject: [PATCH 0135/1487] Remove section on missing windows precompiled binary http://www.os.rim.or.jp/~eban/ no longer has the binary on it's website. Even the website looks like it doesn't exist anymore, providing a "Forbidden error" on that link and root. Closes #2515 --- en/documentation/faq/3/index.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/en/documentation/faq/3/index.md b/en/documentation/faq/3/index.md index 6c951ac426..b79bbab32c 100644 --- a/en/documentation/faq/3/index.md +++ b/en/documentation/faq/3/index.md @@ -150,13 +150,6 @@ He recommends installing the GNU equivalent. A single download that contains everything you need to run Ruby under various Windows operating systems is available from [RubyInstaller](https://rubyinstaller.org/). -If you want other installation options, precompiled binaries for Windows are -also available from -[http://www.os.rim.or.jp/~eban/](http://www.os.rim.or.jp/~eban/). -If you download the `ruby-1.x.y-yyyymmdd-i386-cygwin.tar.gz` package -(which is a good choice), you'll also need to download the cygwin DLL, -available from the same page. - [Reuben Thomas](mailto:Reuben.Thomas@cl.cam.ac.uk) writes: > You could mention that there's a port to Acorn RISC OS, currently of v1.4.3. From 1bfaa48fc4b0b694ccd5816a9109d4be18d3b825 Mon Sep 17 00:00:00 2001 From: Vagish Vela Date: Tue, 20 Oct 2020 21:40:31 -0400 Subject: [PATCH 0136/1487] Remove missed RailsConf Europe links (it, tr) Closes #2514 --- it/community/conferences/index.md | 4 ++-- tr/community/conferences/index.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/it/community/conferences/index.md b/it/community/conferences/index.md index 5b7c2cd4c9..7e50f143c7 100644 --- a/it/community/conferences/index.md +++ b/it/community/conferences/index.md @@ -84,8 +84,8 @@ Una sezione su Ruby è esistita dal 2004 alla [O’Reilly Open Source Conference][10] (OSCON); inoltre, si è constatata una crescente presenza di appassionati Ruby ad altre conferenze non specifiche su Ruby. Un certo numero di conferenze sono state anche dedicate a [Ruby on -Rails][11], includendo la [RailsConf][12] di Ruby Central, la [RailsConf -Europe][13] (co-prodotta in 2006 da Ruby Central e [Skills Matter][14], +Rails][11], includendo la [RailsConf][12] di Ruby Central, la RailsConf +Europe (co-prodotta in 2006 da Ruby Central e [Skills Matter][14], e in 2007 da Ruby Central e O’Reilly), e infine Canada on Rails. diff --git a/tr/community/conferences/index.md b/tr/community/conferences/index.md index 4c0efe153e..313bd54a3d 100644 --- a/tr/community/conferences/index.md +++ b/tr/community/conferences/index.md @@ -52,7 +52,7 @@ Bir günlük tek eşzamanlı oturumlu bir konferanstır. 2004'ten beri [O’Reilly'nin Açık Kaynak Konferansı][10] konuları içinde Ruby yer almaktadır. Ayrıca diğer Ruby'ye özgü olmayan toplantılarda da Ruby ve Ruby'cilerin varlığı artmıştır. -Ayrıca Ruby Central'in [RailsConf][12]'u, [RailsConf Avrupa][13] (2006'da Ruby Central ve [Skills Matter][14], 2007'de ise Ruby Central ve O’Reilly işbirliği ile düzenlenen) ve Canada on Rails'in dahil olduğu birkaç konferans [Ruby on Rails][11]'e adanmıştır. +Ayrıca Ruby Central'in [RailsConf][12]'u, RailsConf Avrupa (2006'da Ruby Central ve [Skills Matter][14], 2007'de ise Ruby Central ve O’Reilly işbirliği ile düzenlenen) ve Canada on Rails'in dahil olduğu birkaç konferans [Ruby on Rails][11]'e adanmıştır. From e9d8a9332b3228d74dbccf0ef21667a86d76e748 Mon Sep 17 00:00:00 2001 From: Vagish Vela Date: Thu, 22 Oct 2020 11:26:19 -0400 Subject: [PATCH 0137/1487] Remove RAA XMP link as no longer exists --- en/documentation/faq/1/index.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/en/documentation/faq/1/index.md b/en/documentation/faq/1/index.md index f12ebf27f5..d168e9ee7c 100644 --- a/en/documentation/faq/1/index.md +++ b/en/documentation/faq/1/index.md @@ -290,10 +290,6 @@ str = "Billy" + " Bob" # => "Billy Bob" str[0,1] + str[2,1] + str[-2,2] # => "Blob" ~~~ -Gotoken's `xmp` package, available from -[http://www.ruby-lang.org/en/raa-list.rhtml?name=xmp](http://www.ruby-lang.org/en/raa-list.rhtml?name=xmp) -is a utility that annotates Ruby source code this way. - Emacs and vim users can integrate this with their editing environments, which is useful if you want to send people e-mail with annotated Ruby code. Having installed `xmp`, Emacs users can add the following to their `.emacs` file: From 8f62b75bc67499c740ab83c472ea85af123604d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20T=C3=A1mara=20Pati=C3=B1o?= Date: Thu, 22 Oct 2020 11:02:43 -0500 Subject: [PATCH 0138/1487] Closes #2245 (#2526) --- es/downloads/index.md | 51 ++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/es/downloads/index.md b/es/downloads/index.md index af869e0109..80eec23e09 100644 --- a/es/downloads/index.md +++ b/es/downloads/index.md @@ -4,8 +4,6 @@ title: "Descarga Ruby" lang: es --- -{% include out-of-date.html %} - Aquí puedes obtener las últimas distribuciones de Ruby en tu sabor favorito. La versión estable actual es {{ site.data.downloads.stable[0] }}. Por favor asegúrate de leer la [licencia de Ruby][license]. @@ -17,11 +15,17 @@ Tenemos herramientas para instalar Ruby para las plataformas más importantes. * En Linux/Unix, puedes utilizar el sistema de gestión de paquetes de tu distribución o herramientas de terceros ([rbenv][rbenv] y [RVM][rvm]). -* En computadoras con sistema operativo macOS, puedes utilizar herramientas de terceros ([rbenv][rbenv] y [RVM][rvm]). -* En computadoras con sistema operativo Windows, puedes utilizar [RubyInstaller][rubyinstaller]. +* En computadoras con sistema operativo macOS, puedes utilizar herramientas + de terceros ([rbenv][rbenv] y [RVM][rvm]). +* En computadoras con sistema operativo Windows, puedes utilizar + [RubyInstaller][rubyinstaller]. + +Consulta la página de [Instalación][installation] para obtener detalles de +como usar sistemas de gestión de paquetes de tu distribución o herramientas +de terceros. -Consulta la página de [Instalación][installation] para obtener detalles de como usar -sistemas de gestión de paquetes de tu distribución o herramientas de terceros. +Por supuesto también puede instalar Ruby a partir del código fuente +en todas las plataformas principales. ### Compilando Ruby — Código fuente @@ -30,27 +34,40 @@ confiado con tu plataforma y hasta puedas necesitar configuraciones específicas para tu entorno. También es una buena solución en el caso de que no existan paquetes disponibles. -Consulta la página de [Instalación][installation] para obtener detalles de como compilar -Ruby desde el código fuente. Si tienes algún problema compilando Ruby, considera -usar una de las herramientas de terceros en la siguiente sección. Pueden servirte -de ayuda. +Consulta la página de [Instalación][installation] para obtener detalles de +como compilar Ruby desde el código fuente. Si tienes algún problema +compilando Ruby, considera usar una de las herramientas de terceros +antes mencionadas. Pueden servirte de ayuda. + +* **Versiones estables:**{% for version in site.data.downloads.stable %}{% assign release = site.data.releases | where: "version", version | first %} + * [Ruby {{ release.version }}]({{ release.url.gz }})
+ sha256: {{ release.sha256.gz }}{% endfor %} + +{% if site.data.downloads.security_maintenance %} +* **En fase de mantenimiento de seguridad (¡el soporte terminará pronto!):**{% for version in site.data.downloads.security_maintenance %}{% assign release = site.data.releases | where: "version", version | first %} + * [Ruby {{ release.version }}]({{ release.url.gz }})
+ sha256: {{ release.sha256.gz }}{% endfor %} +{% endif %} -* **Estable actual:** - Ruby {{ site.data.downloads.stable[0] }} +{% if site.data.downloads.eol %} +* **Ya no mantenidas (EOL):**{% for version in site.data.downloads.eol %}{% assign release = site.data.releases | where: "version", version | first %} + * [Ruby {{ release.version }}]({{ release.url.gz }})
+ sha256: {{ release.sha256.gz }}{% endfor %} +{% endif %} * **Snapshots:** - * [Stable Snapshot]({{ site.data.downloads.stable_snapshots[0].url.gz }}): + * [Snapshot estable]({{ site.data.downloads.stable_snapshots[0].url.gz }}): Este es el tarball del último snapshot del branch de la versión actual estable. - * [Nightly Snapshot]({{ site.data.downloads.nightly_snapshot.url.gz }}): - Este es el tarball de lo que exista en Git, hecho diariamente. + * [Snapshot de cada noche]({{ site.data.downloads.nightly_snapshot.url.gz }}): + Este es el tarball de lo que exista en Git anoche. Puede contener errores, ¡úsalo bajo tu responsabilidad! Para información sobre los repositorios de Subversion y Git, consulta nuestra página [Ruby core](/en/community/ruby-core/) (en inglés). El código fuente de Ruby está disponible desde un conjunto -de [mirror sites][mirrors] a lo largo del mundo. -Intenta usar el mirror site que te quede más cerca. +de [sitios espejo][mirrors] a lo largo del mundo. +Intenta usar el sitio espejo que te quede más cerca. From bb3159288b3ad3283228d8208043ca45cadd0201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20T=C3=A1mara=20Pati=C3=B1o?= Date: Thu, 22 Oct 2020 12:18:42 -0500 Subject: [PATCH 0139/1487] Using ruby packages for OpenBSD --- en/documentation/installation/index.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/en/documentation/installation/index.md b/en/documentation/installation/index.md index b05f4eccf4..99c1ccb7eb 100644 --- a/en/documentation/installation/index.md +++ b/en/documentation/installation/index.md @@ -44,6 +44,7 @@ Here are available installation methods: * [Arch Linux](#pacman) * [macOS](#homebrew) * [FreeBSD](#freebsd) + * [OpenBSD](#openbsd) * [OpenIndiana](#openindiana) * [Other Distributions](#other-systems) * [Installers](#installers) @@ -180,6 +181,25 @@ to customize the build configuration options. More information about Ruby and its surrounding ecosystem on FreeBSD can be found on the [FreeBSD Ruby Project website][freebsd-ruby]. +### OpenBSD +{: #openbsd} + +OpenBSD as well as its distribution adJ, have packages for the three +major versions of Ruby. The following command allows you to see the +available versions and to install one: + +{% highlight sh %} +$ doas pkg_add ruby +{% endhighlight %} + +You can install simultanously several major versions, because their binaries +have different names (e.g. ruby27, ruby26, etc). + +The `HEAD` branch of the OpenBSD's ports collection could +have for this platform the most recent version of Ruby some days after +it is released. +See [directory lang/ruby in the most recent ports collection][openbsd-current-ruby-ports] + ### Ruby on OpenIndiana {: #openindiana} @@ -349,3 +369,4 @@ though, because the installed Ruby won't be managed by any tools. [wsl]: https://docs.microsoft.com/en-us/windows/wsl/about [asdf-vm]: https://asdf-vm.com/ [asdf-ruby]: https://github.com/asdf-vm/asdf-ruby +[openbsd-current-ruby-ports]: https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/lang/ruby/?only_with_tag=HEAD From 96dfcb9582e11f509cbecf91a7c55af03a89505f Mon Sep 17 00:00:00 2001 From: Vagish Vela Date: Sat, 24 Oct 2020 09:15:32 -0400 Subject: [PATCH 0140/1487] Remove broken link to Acorn binary --- en/documentation/faq/3/index.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/en/documentation/faq/3/index.md b/en/documentation/faq/3/index.md index b79bbab32c..9d00d783f2 100644 --- a/en/documentation/faq/3/index.md +++ b/en/documentation/faq/3/index.md @@ -145,8 +145,6 @@ He recommends installing the GNU equivalent. ### Are precompiled binaries available? -{% include faq-out-of-date.html %} - A single download that contains everything you need to run Ruby under various Windows operating systems is available from [RubyInstaller](https://rubyinstaller.org/). @@ -156,9 +154,6 @@ Windows operating systems is available from [RubyInstaller](https://rubyinstalle > I made the port, and have no plans to maintain it, but I did send the > patches to matz, so newer versions may well compile too. -> I do provide a binary distribution of 1.4.3 for the Acorn at -> [http://www.cl.cam.ac.uk/users/rrt1001/ruby.zip](http://www.cl.cam.ac.uk/users/rrt1001/ruby.zip). - ### What's all this “cygwin”, “mingw”, and “djgpp” stuff? {% include faq-out-of-date.html %} From 23e4c8bd2037914d4d5095c98a20f389a8970554 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Mon, 26 Oct 2020 20:16:17 +0100 Subject: [PATCH 0141/1487] Improve OpenBSD section on installation page (en) (#2534) Improve grammar and language. --- en/documentation/installation/index.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/en/documentation/installation/index.md b/en/documentation/installation/index.md index 99c1ccb7eb..0aa8dec86c 100644 --- a/en/documentation/installation/index.md +++ b/en/documentation/installation/index.md @@ -181,24 +181,25 @@ to customize the build configuration options. More information about Ruby and its surrounding ecosystem on FreeBSD can be found on the [FreeBSD Ruby Project website][freebsd-ruby]. + ### OpenBSD {: #openbsd} -OpenBSD as well as its distribution adJ, have packages for the three -major versions of Ruby. The following command allows you to see the +OpenBSD as well as its distribution adJ has packages for the three +major versions of Ruby. The following command allows you to see the available versions and to install one: {% highlight sh %} $ doas pkg_add ruby {% endhighlight %} -You can install simultanously several major versions, because their binaries -have different names (e.g. ruby27, ruby26, etc). +You can install multiple major versions side by side, because their +binaries have different names (e.g. `ruby27`, `ruby26`). -The `HEAD` branch of the OpenBSD's ports collection could -have for this platform the most recent version of Ruby some days after -it is released. -See [directory lang/ruby in the most recent ports collection][openbsd-current-ruby-ports] +The `HEAD` branch of the OpenBSD ports collection might have the +most recent version of Ruby for this platform some days after it +is released, see +[directory lang/ruby in the most recent ports collection][openbsd-current-ruby-ports]. ### Ruby on OpenIndiana From e8c6d66cd19582180a631813c1faba5aa2107d42 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Mon, 26 Oct 2020 21:03:01 +0100 Subject: [PATCH 0142/1487] Remove obsolete linter test cases (#2535) Drop test cases for by now removed linter tests concerning syntax highlighting with fenced code blocks. Fixes 958ff94a33657ef2bf9c64fb169e41e9630cfa75. --- test/fixtures/errors/en/20_fenced_ruby_code_block.md | 11 ----------- test/fixtures/errors/en/21_fenced_sh_code_block.md | 11 ----------- test/fixtures/output_errors.txt | 4 ---- 3 files changed, 26 deletions(-) delete mode 100644 test/fixtures/errors/en/20_fenced_ruby_code_block.md delete mode 100644 test/fixtures/errors/en/21_fenced_sh_code_block.md diff --git a/test/fixtures/errors/en/20_fenced_ruby_code_block.md b/test/fixtures/errors/en/20_fenced_ruby_code_block.md deleted file mode 100644 index 1a50060ca4..0000000000 --- a/test/fixtures/errors/en/20_fenced_ruby_code_block.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -layout: page -title: "Page" -lang: en ---- - -Content - - ```ruby - puts "Hello" - ``` diff --git a/test/fixtures/errors/en/21_fenced_sh_code_block.md b/test/fixtures/errors/en/21_fenced_sh_code_block.md deleted file mode 100644 index 4fe3cf7cb9..0000000000 --- a/test/fixtures/errors/en/21_fenced_sh_code_block.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -layout: page -title: "Page" -lang: en ---- - -Content - - ``` sh - echo 'Hello' - ``` diff --git a/test/fixtures/output_errors.txt b/test/fixtures/output_errors.txt index cbe5797f44..f6f4d67197 100644 --- a/test/fixtures/output_errors.txt +++ b/test/fixtures/output_errors.txt @@ -33,10 +33,6 @@ en/11_blank_line_at_eof.md blank line(s) at end of file en/12_blank_lines_at_eof.md blank line(s) at end of file -en/20_fenced_ruby_code_block.md - wrong syntax highlighting: use '{% highlight ruby %}...{% endhighlight %}' instead of '```ruby' block -en/21_fenced_sh_code_block.md - wrong syntax highlighting: use '{% highlight sh %}...{% endhighlight %}' instead of '```sh' block en/news/_posts/2000-01-01-old-lang-variable-nil.md missing or invalid lang variable en/news/_posts/2000-01-02-old-translator-variable-wrong-type.md From 3f55b00bd7724108965271b7d21a9ed1e8dcfe7b Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Mon, 26 Oct 2020 22:38:26 +0100 Subject: [PATCH 0143/1487] Fix syntax highlighted code blocks in lists (en) (#2536) Use fenced code blocks instead of Jekyll's `highlight` tag. The latter does not work in list items: the highlight tag terminates the list, so that the highlighted code is not part of the list item; subsequent list items start a new list. Visually, this fixes wrong indentation of the code blocks, which had less indentation than the surrounding list items. --- ...2020-09-25-ruby-3-0-0-preview1-released.md | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/en/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md b/en/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md index e89d9ff80c..29b7da4754 100644 --- a/en/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md +++ b/en/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md @@ -23,7 +23,7 @@ Ruby 3.0 ships with `rbs` gem, which allows parsing and processing type definiti The following is a small example of RBS. -{% highlight rbs %} +``` rbs module ChatApp VERSION: String @@ -38,7 +38,7 @@ module ChatApp | (File, from: User | Bot) -> Message end end -{% endhighlight %} +``` See [README of rbs gem](https://github.com/ruby/rbs) for more detail. @@ -54,7 +54,7 @@ The specification and implmentation are not matured and changed in future, so th The following small program calculates `prime?` in parallel with two ractors and about x2 times faster with two or more cores than sequential program. -{% highlight ruby %} +``` ruby require 'prime' # n.prime? with sent integers in r1, r2 run in parallel @@ -72,7 +72,7 @@ r2.send 2**61 + 15 # wait for the results of expr1, expr2 p r1.take #=> true p r2.take #=> true -{% endhighlight %} +``` see [doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md) for more detail. @@ -99,18 +99,21 @@ Currently, there is a test scheduler available in [`Async::Scheduler`](https://g ## Other Notable New Features * Rightward assignment statement is added. - {% highlight ruby %} + + ``` ruby fib(10) => x p x #=> 55 - {% endhighlight %} + ``` * Endless method definition is added. - {% highlight ruby %} + + ``` ruby def square(x) = x * x - {% endhighlight %} + ``` * Find pattern is added. - {% highlight ruby %} + + ``` ruby case ["a", 1, "b", "c", 2, "d", "e", "f", 3] in [*pre, String => x, String => y, *post] p pre #=> ["a", 1] @@ -118,13 +121,14 @@ Currently, there is a test scheduler available in [`Async::Scheduler`](https://g p y #=> "c" p post #=> [2, "d", "e", "f", 3] end - {% endhighlight %} + ``` * `Hash#except` is now built-in. - {% highlight ruby %} + + ``` ruby h = { a: 1, b: 2, c: 3 } p h.except(:a) #=> {:b=>2, :c=>3} - {% endhighlight %} + ``` * Memory view is added as an experimental feature @@ -139,11 +143,12 @@ Currently, there is a test scheduler available in [`Async::Scheduler`](https://g * Keyword arguments are separated from other arguments. * In principle, code that prints a warning on Ruby 2.7 won't work. See the [document](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/) in detail. * By the way, arguments forwarding now supports leading arguments. - {% highlight ruby %} + + ``` ruby def method_missing(meth, ...) send(:"do_#{ meth }", ...) end - {% endhighlight %} + ``` * The feature of `$SAFE` was completely removed; now it is a normal global variable. From 58f31d3edf343c1b85130bf7d9506730c95d9d96 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Mon, 26 Oct 2020 22:48:14 +0100 Subject: [PATCH 0144/1487] Fix syntax highlighted code blocks in lists (translations) See commit 3f55b00bd7724108965271b7d21a9ed1e8dcfe7b. --- ...2020-09-25-ruby-3-0-0-preview1-released.md | 33 +++++++++++-------- ...2020-09-25-ruby-3-0-0-preview1-released.md | 33 +++++++++++-------- ...2020-09-25-ruby-3-0-0-preview1-released.md | 33 +++++++++++-------- ...2020-09-25-ruby-3-0-0-preview1-released.md | 33 +++++++++++-------- 4 files changed, 76 insertions(+), 56 deletions(-) diff --git a/es/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md b/es/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md index 3995c1029f..d1e4b9e008 100644 --- a/es/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md +++ b/es/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md @@ -32,7 +32,7 @@ y procesar definiciones de tipos escritas en RBS. El siguiente es un pequeño ejemplo de RBS. -{% highlight rbs %} +``` rbs module AplicacionMensajeria VERSION: String @@ -47,7 +47,7 @@ module AplicacionMensajeria | (File, de: Usuaurio | Robot) -> Mensaje end end -{% endhighlight %} +``` Ver más detalles en el [archivo README de la gema rbs](https://github.com/ruby/rbs). @@ -77,7 +77,7 @@ El siguiente pequeño programa calcula `prime?` en paralelo con dos ractores y es casi 2 veces más rápido con dos o más núcleos que el programa secuencial. -{% highlight ruby %} +``` ruby require 'prime' # n.prime? con enteros enviados en r1, r2 que corren en paralelo @@ -95,7 +95,7 @@ r2.send 2**61 + 15 # wait for the results of expr1, expr2 p r1.take #=> true p r2.take #=> true -{% endhighlight %} +``` Ver más detalles en [doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md). @@ -134,18 +134,21 @@ versión prevía. ## Otras características notables * Se agrega una asignación al lado derecho. - {% highlight ruby %} + + ``` ruby fib(10) => x p x #=> 55 - {% endhighlight %} + ``` * Se agrega una definición de métodos que no requiere `end`. - {% highlight ruby %} + + ``` ruby def cuadrado(x) = x * x - {% endhighlight %} + ``` * Se agrega un patrón Encontrar (__Find__). - {% highlight ruby %} + + ``` ruby case ["a", 1, "b", "c", 2, "d", "e", "f", 3] in [*pre, String => x, String => y, *post] p pre #=> ["a", 1] @@ -153,13 +156,14 @@ versión prevía. p y #=> "c" p post #=> [2, "d", "e", "f", 3] end - {% endhighlight %} + ``` * `Hash#except` ahora es un método incorporado. - {% highlight ruby %} + + ``` ruby h = { a: 1, b: 2, c: 3 } p h.except(:a) #=> {:b=>2, :c=>3} - {% endhighlight %} + ``` * Se agrega como característica experimental __Memory view__ @@ -185,11 +189,12 @@ versión prevía. funcionará. Ver detalles en la [documentación](https://www.ruby-lang.org/es/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/). * Por cierto, el re-envío de argumentos ahora soporta argumentos principales. - {% highlight ruby %} + + ``` ruby def method_missing(meth, ...) send(:"do_#{ meth }", ...) end - {% endhighlight %} + ``` * La característica `$SAFE` se eliminó por completo; ahora es una variable global normal. diff --git a/ko/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md b/ko/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md index 2e37a811e9..77c7bb8c23 100644 --- a/ko/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md +++ b/ko/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md @@ -23,7 +23,7 @@ RBS의 목표는 루비 프로그램에서 흔히 보이는 패턴을 지원하 다음은 RBS의 작은 예시입니다. -{% highlight rbs %} +``` rbs module ChatApp VERSION: String @@ -38,7 +38,7 @@ module ChatApp | (File, from: User | Bot) -> Message end end -{% endhighlight %} +``` 더 자세한 내용은 [rbs 젬의 README](https://github.com/ruby/rbs)를 확인하세요. @@ -55,7 +55,7 @@ ractor 간의 통신은 메시지 넘기기를 통해서 지원됩니다. 다음은 `prime?`을 2개의 ractor를 통해 계산하는 프로그램입니다. 이는 2개 이상의 코어를 사용하는 경우, 순차적으로 실행하는 프로그램보다 약 2배 빠릅니다. -{% highlight ruby %} +``` ruby require 'prime' # r1, r2에 보낸 정수들로 'n.prime?'을 병렬 실행 @@ -73,7 +73,7 @@ r2.send 2**61 + 15 # r1, r2의 실행 결과 대기 p r1.take #=> true p r2.take #=> true -{% endhighlight %} +``` 더 자세한 내용은 [doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md)를 확인하세요. @@ -102,18 +102,21 @@ p r2.take #=> true ## 그 이외의 주목할 만한 기능 * 오른쪽으로 값을 할당하는 명령이 추가됩니다. - {% highlight ruby %} + + ``` ruby fib(10) => x p x #=> 55 - {% endhighlight %} + ``` * `end` 없는 메서드 정의가 추가됩니다. - {% highlight ruby %} + + ``` ruby def square(x) = x * x - {% endhighlight %} + ``` * 검색 패턴이 추가됩니다. - {% highlight ruby %} + + ``` ruby case ["a", 1, "b", "c", 2, "d", "e", "f", 3] in [*pre, String => x, String => y, *post] p pre #=> ["a", 1] @@ -121,13 +124,14 @@ p r2.take #=> true p y #=> "c" p post #=> [2, "d", "e", "f", 3] end - {% endhighlight %} + ``` * `Hash#except`가 내장됩니다. - {% highlight ruby %} + + ``` ruby h = { a: 1, b: 2, c: 3 } p h.except(:a) #=> {:b=>2, :c=>3} - {% endhighlight %} + ``` * 메모리 뷰가 실험적인 기능으로 추가됩니다. @@ -142,11 +146,12 @@ p r2.take #=> true * 키워드 인자가 다른 인자들로부터 분리됩니다. * 원칙적으로 루비 2.7에서 경고를 출력하는 코드는 동작하지 않습니다. 자세한 내용은 [문서](https://www.ruby-lang.org/ko/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/)를 확인하세요. * 한편, 인자를 전달할 때 앞쪽 인자를 사용할 수 있습니다. - {% highlight ruby %} + + ``` ruby def method_missing(meth, ...) send(:"do_#{ meth }", ...) end - {% endhighlight %} + ``` * `$SAFE` 기능이 완전히 제거됩니다. 이 값은 이제 일반 전역 변수입니다. diff --git a/pt/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md b/pt/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md index 787ca06eb5..920016ad6d 100644 --- a/pt/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md +++ b/pt/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md @@ -23,7 +23,7 @@ Ruby 3.0 vem com gem `rbs`, que permite analisar e processar definições de tip A seguir está um pequeno exemplo de RBS. -{% highlight rbs %} +``` rbs module ChatApp VERSION: String @@ -38,7 +38,7 @@ module ChatApp | (File, from: User | Bot) -> Message end end -{% endhighlight %} +``` Veja [README da gem rbs](https://github.com/ruby/rbs) para mais detalhes. @@ -54,7 +54,7 @@ A especificação e implementação não estão amadurecidas e serão alteradas O pequeno programa a seguir calcula `prime?` em paralelo com dois ractores e cerca de x2 vezes mais rápido com dois ou mais núcleos do que o programa sequencial. -{% highlight ruby %} +``` ruby require 'prime' # n.prime? com inteiros r1 e r2 enviados rodando em parelelo @@ -72,7 +72,7 @@ r2.send 2**61 + 15 # aguardando os resultados de expr1, expr2 p r1.take #=> true p r2.take #=> true -{% endhighlight %} +``` Veja [doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md) para mais detalhes. @@ -99,18 +99,21 @@ Atualmente, existe um agendador de teste disponível em [`Async::Scheduler`](htt ## Outros novos recursos notáveis * A instrução de atribuição para a direita foi adicionada. - {% highlight ruby %} + + ``` ruby fib(10) => x p x #=> 55 - {% endhighlight %} + ``` * A definição de método sem a keyword _end_ foi adicionada. - {% highlight ruby %} + + ``` ruby def square(x) = x * x - {% endhighlight %} + ``` * Find pattern foi adicionada. - {% highlight ruby %} + + ``` ruby case ["a", 1, "b", "c", 2, "d", "e", "f", 3] in [*pre, String => x, String => y, *post] p pre #=> ["a", 1] @@ -118,13 +121,14 @@ Atualmente, existe um agendador de teste disponível em [`Async::Scheduler`](htt p y #=> "c" p post #=> [2, "d", "e", "f", 3] end - {% endhighlight %} + ``` * `Hash#except` agora é nativo. - {% highlight ruby %} + + ``` ruby h = { a: 1, b: 2, c: 3 } p h.except(:a) #=> {:b=>2, :c=>3} - {% endhighlight %} + ``` * A visualização da memória é adicionada como um recurso experimental @@ -139,11 +143,12 @@ Atualmente, existe um agendador de teste disponível em [`Async::Scheduler`](htt * Os argumentos de palavra-chave são separados de outros argumentos. * Em princípio, códigos que imprimem um aviso no Ruby 2.7 não funciona. Veja o [documento](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/) em detalhe. * A propósito, o encaminhamento de argumentos agora suporta argumentos principais. - {% highlight ruby %} + + ``` ruby def method_missing(meth, ...) send(:"do_#{ meth }", ...) end - {% endhighlight %} + ``` * O recurso de `$SAFE` foi completamente removido; agora é uma variável global normal. diff --git a/tr/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md b/tr/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md index 0b543d1e86..43d1ae2e65 100644 --- a/tr/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md +++ b/tr/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md @@ -25,7 +25,7 @@ Ruby 3.0 `rbs` gem'i ile gelmektedir, bu gem RBS ile yazılmış tip tanımları Aşağıdaki kod RBS için küçük bir örnektir. -{% highlight rbs %} +``` rbs module ChatApp VERSION: String @@ -40,7 +40,7 @@ module ChatApp | (File, from: User | Bot) -> Message end end -{% endhighlight %} +``` Daha fazla ayrıntı için [rbs gem'inin README](https://github.com/ruby/rbs)'sine bakınız. @@ -58,7 +58,7 @@ Belirtim ve gerçekleme henüz tam oturmamıştır ve ileride değişecektir, bu Aşağıdaki küçük program `prime?`'ı iki ractor ile paralelde hesaplar ve iki ya da daha fazla çekirdekte ardışık bir programa göre aşağı yukarı 2 kat daha hızlıdır. -{% highlight ruby %} +``` ruby require 'prime' # r1 ve r2'deki, tamsayıların gönderildiği n.prime? paralelde çalışır @@ -76,7 +76,7 @@ r2.send 2**61 + 15 # 1. ve 2. deyimin sonuçlarını bekle p r1.take #=> true p r2.take #=> true -{% endhighlight %} +``` Daha fazla ayrıntı için [doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md)'ye bakınız. @@ -106,18 +106,21 @@ Daha fazla ayrıntı için [`doc/scheduler.md`](https://github.com/ruby/ruby/blo ## Diğer Dikkate Değer Yeni Özellikler * Sağ atama ifadesi eklendi. - {% highlight ruby %} + + ``` ruby fib(10) => x p x #=> 55 - {% endhighlight %} + ``` * Sonsuz metod tanımı eklendi. - {% highlight ruby %} + + ``` ruby def square(x) = x * x - {% endhighlight %} + ``` * Bulma deseni eklendi. - {% highlight ruby %} + + ``` ruby case ["a", 1, "b", "c", 2, "d", "e", "f", 3] in [*pre, String => x, String => y, *post] p pre #=> ["a", 1] @@ -125,13 +128,14 @@ Daha fazla ayrıntı için [`doc/scheduler.md`](https://github.com/ruby/ruby/blo p y #=> "c" p post #=> [2, "d", "e", "f", 3] end - {% endhighlight %} + ``` * `Hash#except` şimdi gömülü. - {% highlight ruby %} + + ``` ruby h = { a: 1, b: 2, c: 3 } p h.except(:a) #=> {:b=>2, :c=>3} - {% endhighlight %} + ``` * Hafıza görünümü deneysel bir özellik olarak eklendi. @@ -151,11 +155,12 @@ Ayrıntılar için NEWS'e bakınız. * Prensipte, Ruby 2.7'de bir uyarı yazdıran kod çalışmayacaktır. Ayrıntılar için [belgeye](https://www.ruby-lang.org/tr/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/) bakınız. * Bu arada argüman yönlendirme artık sondaki argümanları da destekliyor. - {% highlight ruby %} + + ``` ruby def method_missing(meth, ...) send(:"do_#{ meth }", ...) end - {% endhighlight %} + ``` * `$SAFE` özelliği tamamiyle silindi; şimdi sadece normal bir global değişken. From 56b32183bac2f80f21d12d5ecfa528c9f6b75c5e Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Tue, 27 Oct 2020 10:13:38 +0100 Subject: [PATCH 0145/1487] Update gem bundle (#2537) Removes warnings for Ruby 2.7 about deprecated usage of keyword arguments. The generated site does not change except for minor modifications in the syntax highlighting. --- Gemfile.lock | 79 +++++++++++++++++++++++++++------------------------- 1 file changed, 41 insertions(+), 38 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 899b8a8d60..1db56d1c40 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,100 +4,106 @@ GEM addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) colorator (1.1.0) - concurrent-ruby (1.1.5) - crass (1.0.5) - em-websocket (0.5.1) + concurrent-ruby (1.1.7) + crass (1.0.6) + em-websocket (0.5.2) eventmachine (>= 0.12.9) http_parser.rb (~> 0.6.0) eventmachine (1.2.7) - ffi (1.11.1) + ffi (1.13.1) forwardable-extended (2.6.0) http_parser.rb (0.6.0) - i18n (1.7.0) + i18n (1.8.5) concurrent-ruby (~> 1.0) - jekyll (4.0.0) + jekyll (4.1.1) addressable (~> 2.4) colorator (~> 1.0) em-websocket (~> 0.5) - i18n (>= 0.9.5, < 2) + i18n (~> 1.0) jekyll-sass-converter (~> 2.0) jekyll-watch (~> 2.0) kramdown (~> 2.1) kramdown-parser-gfm (~> 1.0) liquid (~> 4.0) - mercenary (~> 0.3.3) + mercenary (~> 0.4.0) pathutil (~> 0.9) rouge (~> 3.0) safe_yaml (~> 1.0) terminal-table (~> 1.8) - jekyll-sass-converter (2.0.1) + jekyll-sass-converter (2.1.0) sassc (> 2.0.1, < 3.0) jekyll-watch (2.2.1) listen (~> 3.0) json (2.3.1) - kgio (2.11.2) + kgio (2.11.3) kramdown (2.3.0) rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) - lanyon (0.4.1) + lanyon (0.4.2) jekyll (>= 2.0) rack (>= 1.6, < 3.0) - libsqreen (0.3.0.0.3) + libsqreen (0.6.1.0.1) liquid (4.0.3) - listen (3.2.0) + listen (3.2.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - mercenary (0.3.6) + mercenary (0.4.0) mini_portile2 (2.4.0) - minitest (5.13.0) - nokogiri (1.10.8) + minitest (5.14.2) + nokogiri (1.10.10) mini_portile2 (~> 2.4.0) - paint (2.1.1) + paint (2.2.0) pathutil (0.16.2) forwardable-extended (~> 2.6) - public_suffix (4.0.1) + public_suffix (4.0.6) rack (2.2.3) - rack-protection (2.0.7) + rack-protection (2.1.0) rack rack-rewrite (1.5.1) rack-ssl (1.4.1) rack - raindrops (0.19.0) - rake (13.0.0) - rb-fsevent (0.10.3) - rb-inotify (0.10.0) + raindrops (0.19.1) + rake (13.0.1) + rb-fsevent (0.10.4) + rb-inotify (0.10.1) ffi (~> 1.0) rexml (3.2.4) - rouge (3.12.0) + rouge (3.24.0) safe_yaml (1.0.5) - sassc (2.2.1) + sassc (2.4.0) ffi (~> 1.9) - slop (4.7.0) + slop (4.8.2) spidr (0.6.1) nokogiri (~> 1.3) - sq_mini_racer (0.2.5.0.1.beta2) - sqreen (1.18.1) - libsqreen (~> 0.3.0.0) + sq_mini_racer (0.2.5.0.1.beta3) + sqreen (1.21.1) + libsqreen (~> 0.6.1.0.0) sq_mini_racer (~> 0.2.4.sqreen2) + sqreen-backport (~> 0.1.0) + sqreen-kit (~> 0.2.2) + sqreen-backport (0.1.0) + sqreen-kit (0.2.2) + sqreen-backport (~> 0.1.0) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) - tidy_ffi (1.0.0) + tidy_ffi (1.0.1) ffi (~> 1.2) - unicode-display_width (1.6.0) - unicorn (5.5.1) + unicode-display_width (1.7.0) + unicorn (5.7.0) kgio (~> 2.6) raindrops (~> 0.7) - validate-website (1.9.3) + validate-website (1.10.0) crass (~> 1) paint (~> 2) slop (~> 4.6) spidr (~> 0.6) tidy_ffi (~> 1.0) w3c_validators (~> 1.3) - w3c_validators (1.3.4) + w3c_validators (1.3.6) json (>= 1.8) nokogiri (~> 1.6) + rexml (~> 3.2) PLATFORMS ruby @@ -116,8 +122,5 @@ DEPENDENCIES unicorn validate-website (~> 1.6) -RUBY VERSION - ruby 2.7.0p0 - BUNDLED WITH - 2.0.2 + 2.1.2 From a63cda2eb4031183daab8aa355da40557e0f9f71 Mon Sep 17 00:00:00 2001 From: Shia Date: Tue, 27 Oct 2020 21:14:57 +0900 Subject: [PATCH 0146/1487] Translate OpenBSD section (ko) (#2538) * Backport #2529, #2534 to article * Translate OpenBSD section * Update ko/documentation/installation/index.md Co-authored-by: Chayoung You Co-authored-by: Chayoung You --- ko/documentation/installation/index.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ko/documentation/installation/index.md b/ko/documentation/installation/index.md index 8ae4d99b92..cd934ee2c4 100644 --- a/ko/documentation/installation/index.md +++ b/ko/documentation/installation/index.md @@ -44,6 +44,7 @@ Windows 10을 사용 중이라면 [Windows Subsystem for Linux][wsl]를 사용 * [Arch Linux](#pacman) * [macOS](#homebrew) * [FreeBSD](#freebsd) + * [OpenBSD](#openbsd) * [OpenIndiana](#openindiana) * [다른 배포판](#other-systems) * [인스톨러](#installers) @@ -171,6 +172,24 @@ FreeBSD 상의 루비와 그 환경에 대해서 더 자세한 정보는 [FreeBSD Ruby Project 웹사이트][freebsd-ruby]에서 얻을 수 있습니다. +### OpenBSD +{: #openbsd} + +OpenBSD와 그 배포판인 adJ에는 3개의 루비 메이저 버전의 패키지가 있습니다. +다음 명령을 통해 설치 가능한 버전을 확인하고 설치할 수 있습니다. + +{% highlight sh %} +$ doas pkg_add ruby +{% endhighlight %} + +각 버전의 바이너리는 다른 이름(예: `ruby27`, `ruby26`)을 가지고 있으므로 +동시에 여러 메이저 버전을 설치할 수 있습니다. + +가장 최신의 루비 버전이 릴리스된 며칠 후면 OpenBSD 포트 컬렉션의 `HEAD` 브랜치에 +이 플랫폼을 위한 루비 버전이 추가되어 있을 것입니다. +[가장 최신의 포트 컬렉션의 lang/ruby 디렉터리][openbsd-current-ruby-ports]를 확인하세요. + + ### OpenIndiana에서의 루비 {: #openindiana} @@ -331,3 +350,4 @@ $ sudo make install [wsl]: https://docs.microsoft.com/ko-kr/windows/wsl/about [asdf-vm]: https://asdf-vm.com/ [asdf-ruby]: https://github.com/asdf-vm/asdf-ruby +[openbsd-current-ruby-ports]: https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/lang/ruby/?only_with_tag=HEAD From f538832592b1f9ac4187e85d34b374a50b2b88fb Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Tue, 27 Oct 2020 13:29:47 +0100 Subject: [PATCH 0147/1487] Revert "Update gem bundle (#2537)" This reverts commit 56b32183bac2f80f21d12d5ecfa528c9f6b75c5e. The change causes some errors in the syntax highlighting. --- Gemfile.lock | 79 +++++++++++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 41 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1db56d1c40..899b8a8d60 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,106 +4,100 @@ GEM addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) colorator (1.1.0) - concurrent-ruby (1.1.7) - crass (1.0.6) - em-websocket (0.5.2) + concurrent-ruby (1.1.5) + crass (1.0.5) + em-websocket (0.5.1) eventmachine (>= 0.12.9) http_parser.rb (~> 0.6.0) eventmachine (1.2.7) - ffi (1.13.1) + ffi (1.11.1) forwardable-extended (2.6.0) http_parser.rb (0.6.0) - i18n (1.8.5) + i18n (1.7.0) concurrent-ruby (~> 1.0) - jekyll (4.1.1) + jekyll (4.0.0) addressable (~> 2.4) colorator (~> 1.0) em-websocket (~> 0.5) - i18n (~> 1.0) + i18n (>= 0.9.5, < 2) jekyll-sass-converter (~> 2.0) jekyll-watch (~> 2.0) kramdown (~> 2.1) kramdown-parser-gfm (~> 1.0) liquid (~> 4.0) - mercenary (~> 0.4.0) + mercenary (~> 0.3.3) pathutil (~> 0.9) rouge (~> 3.0) safe_yaml (~> 1.0) terminal-table (~> 1.8) - jekyll-sass-converter (2.1.0) + jekyll-sass-converter (2.0.1) sassc (> 2.0.1, < 3.0) jekyll-watch (2.2.1) listen (~> 3.0) json (2.3.1) - kgio (2.11.3) + kgio (2.11.2) kramdown (2.3.0) rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) - lanyon (0.4.2) + lanyon (0.4.1) jekyll (>= 2.0) rack (>= 1.6, < 3.0) - libsqreen (0.6.1.0.1) + libsqreen (0.3.0.0.3) liquid (4.0.3) - listen (3.2.1) + listen (3.2.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - mercenary (0.4.0) + mercenary (0.3.6) mini_portile2 (2.4.0) - minitest (5.14.2) - nokogiri (1.10.10) + minitest (5.13.0) + nokogiri (1.10.8) mini_portile2 (~> 2.4.0) - paint (2.2.0) + paint (2.1.1) pathutil (0.16.2) forwardable-extended (~> 2.6) - public_suffix (4.0.6) + public_suffix (4.0.1) rack (2.2.3) - rack-protection (2.1.0) + rack-protection (2.0.7) rack rack-rewrite (1.5.1) rack-ssl (1.4.1) rack - raindrops (0.19.1) - rake (13.0.1) - rb-fsevent (0.10.4) - rb-inotify (0.10.1) + raindrops (0.19.0) + rake (13.0.0) + rb-fsevent (0.10.3) + rb-inotify (0.10.0) ffi (~> 1.0) rexml (3.2.4) - rouge (3.24.0) + rouge (3.12.0) safe_yaml (1.0.5) - sassc (2.4.0) + sassc (2.2.1) ffi (~> 1.9) - slop (4.8.2) + slop (4.7.0) spidr (0.6.1) nokogiri (~> 1.3) - sq_mini_racer (0.2.5.0.1.beta3) - sqreen (1.21.1) - libsqreen (~> 0.6.1.0.0) + sq_mini_racer (0.2.5.0.1.beta2) + sqreen (1.18.1) + libsqreen (~> 0.3.0.0) sq_mini_racer (~> 0.2.4.sqreen2) - sqreen-backport (~> 0.1.0) - sqreen-kit (~> 0.2.2) - sqreen-backport (0.1.0) - sqreen-kit (0.2.2) - sqreen-backport (~> 0.1.0) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) - tidy_ffi (1.0.1) + tidy_ffi (1.0.0) ffi (~> 1.2) - unicode-display_width (1.7.0) - unicorn (5.7.0) + unicode-display_width (1.6.0) + unicorn (5.5.1) kgio (~> 2.6) raindrops (~> 0.7) - validate-website (1.10.0) + validate-website (1.9.3) crass (~> 1) paint (~> 2) slop (~> 4.6) spidr (~> 0.6) tidy_ffi (~> 1.0) w3c_validators (~> 1.3) - w3c_validators (1.3.6) + w3c_validators (1.3.4) json (>= 1.8) nokogiri (~> 1.6) - rexml (~> 3.2) PLATFORMS ruby @@ -122,5 +116,8 @@ DEPENDENCIES unicorn validate-website (~> 1.6) +RUBY VERSION + ruby 2.7.0p0 + BUNDLED WITH - 2.1.2 + 2.0.2 From f784dd5e7287f10f479e341c4408fe085c4eb718 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Tue, 27 Oct 2020 13:51:58 +0100 Subject: [PATCH 0148/1487] Restrict rouge version to < 3.24.0 Using rouge 3.24.0 produces errors () in some syntax highlighted code blocks. There seems to be a problem with code like str.gsub(/foo/, "bar") ^^^^^^^^ marked as error This affects `en/news/_posts/2013-02-22-rexml-dos-2013-02-22.md` and its translations. --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index ca397f75bd..9e5a341055 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" gem 'rake' gem 'jekyll', '~> 4.0' -gem 'rouge' +gem 'rouge', '< 3.24.0' gem 'unicorn' gem 'lanyon' From f544c6c3b92e4703cce737c4a7604c8f0a835df6 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Tue, 27 Oct 2020 13:53:06 +0100 Subject: [PATCH 0149/1487] Update gem bundle Removes warnings for Ruby 2.7 about deprecated usage of keyword arguments. The generated site does not change except for minor modifications in the syntax highlighting. --- Gemfile.lock | 81 +++++++++++++++++++++++++++------------------------- 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 899b8a8d60..15fe35c6a2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,100 +4,106 @@ GEM addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) colorator (1.1.0) - concurrent-ruby (1.1.5) - crass (1.0.5) - em-websocket (0.5.1) + concurrent-ruby (1.1.7) + crass (1.0.6) + em-websocket (0.5.2) eventmachine (>= 0.12.9) http_parser.rb (~> 0.6.0) eventmachine (1.2.7) - ffi (1.11.1) + ffi (1.13.1) forwardable-extended (2.6.0) http_parser.rb (0.6.0) - i18n (1.7.0) + i18n (1.8.5) concurrent-ruby (~> 1.0) - jekyll (4.0.0) + jekyll (4.1.1) addressable (~> 2.4) colorator (~> 1.0) em-websocket (~> 0.5) - i18n (>= 0.9.5, < 2) + i18n (~> 1.0) jekyll-sass-converter (~> 2.0) jekyll-watch (~> 2.0) kramdown (~> 2.1) kramdown-parser-gfm (~> 1.0) liquid (~> 4.0) - mercenary (~> 0.3.3) + mercenary (~> 0.4.0) pathutil (~> 0.9) rouge (~> 3.0) safe_yaml (~> 1.0) terminal-table (~> 1.8) - jekyll-sass-converter (2.0.1) + jekyll-sass-converter (2.1.0) sassc (> 2.0.1, < 3.0) jekyll-watch (2.2.1) listen (~> 3.0) json (2.3.1) - kgio (2.11.2) + kgio (2.11.3) kramdown (2.3.0) rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) - lanyon (0.4.1) + lanyon (0.4.2) jekyll (>= 2.0) rack (>= 1.6, < 3.0) - libsqreen (0.3.0.0.3) + libsqreen (0.6.1.0.1) liquid (4.0.3) - listen (3.2.0) + listen (3.2.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - mercenary (0.3.6) + mercenary (0.4.0) mini_portile2 (2.4.0) - minitest (5.13.0) - nokogiri (1.10.8) + minitest (5.14.2) + nokogiri (1.10.10) mini_portile2 (~> 2.4.0) - paint (2.1.1) + paint (2.2.0) pathutil (0.16.2) forwardable-extended (~> 2.6) - public_suffix (4.0.1) + public_suffix (4.0.6) rack (2.2.3) - rack-protection (2.0.7) + rack-protection (2.1.0) rack rack-rewrite (1.5.1) rack-ssl (1.4.1) rack - raindrops (0.19.0) - rake (13.0.0) - rb-fsevent (0.10.3) - rb-inotify (0.10.0) + raindrops (0.19.1) + rake (13.0.1) + rb-fsevent (0.10.4) + rb-inotify (0.10.1) ffi (~> 1.0) rexml (3.2.4) - rouge (3.12.0) + rouge (3.23.0) safe_yaml (1.0.5) - sassc (2.2.1) + sassc (2.4.0) ffi (~> 1.9) - slop (4.7.0) + slop (4.8.2) spidr (0.6.1) nokogiri (~> 1.3) - sq_mini_racer (0.2.5.0.1.beta2) - sqreen (1.18.1) - libsqreen (~> 0.3.0.0) + sq_mini_racer (0.2.5.0.1.beta3) + sqreen (1.21.1) + libsqreen (~> 0.6.1.0.0) sq_mini_racer (~> 0.2.4.sqreen2) + sqreen-backport (~> 0.1.0) + sqreen-kit (~> 0.2.2) + sqreen-backport (0.1.0) + sqreen-kit (0.2.2) + sqreen-backport (~> 0.1.0) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) - tidy_ffi (1.0.0) + tidy_ffi (1.0.1) ffi (~> 1.2) - unicode-display_width (1.6.0) - unicorn (5.5.1) + unicode-display_width (1.7.0) + unicorn (5.7.0) kgio (~> 2.6) raindrops (~> 0.7) - validate-website (1.9.3) + validate-website (1.10.0) crass (~> 1) paint (~> 2) slop (~> 4.6) spidr (~> 0.6) tidy_ffi (~> 1.0) w3c_validators (~> 1.3) - w3c_validators (1.3.4) + w3c_validators (1.3.6) json (>= 1.8) nokogiri (~> 1.6) + rexml (~> 3.2) PLATFORMS ruby @@ -110,14 +116,11 @@ DEPENDENCIES rack-rewrite rack-ssl rake - rouge + rouge (< 3.24.0) spidr (~> 0.6) sqreen unicorn validate-website (~> 1.6) -RUBY VERSION - ruby 2.7.0p0 - BUNDLED WITH - 2.0.2 + 2.1.2 From 0398691dafeb595695ff4f4fa94079cd99de1821 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Tue, 27 Oct 2020 21:27:22 +0100 Subject: [PATCH 0150/1487] Fix code example (ru) Use untranslated text to avoid `` of syntax highlighter for non-ASCII characters. --- ...29-heap-overflow-in-yaml-uri-escape-parsing-cve-2014-2525.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ru/news/_posts/2014-03-29-heap-overflow-in-yaml-uri-escape-parsing-cve-2014-2525.md b/ru/news/_posts/2014-03-29-heap-overflow-in-yaml-uri-escape-parsing-cve-2014-2525.md index 865b1b17d6..23f023a118 100644 --- a/ru/news/_posts/2014-03-29-heap-overflow-in-yaml-uri-escape-parsing-cve-2014-2525.md +++ b/ru/news/_posts/2014-03-29-heap-overflow-in-yaml-uri-escape-parsing-cve-2014-2525.md @@ -19,7 +19,7 @@ lang: ru Например: {% highlight ruby %} -YAML.load <строка-из-недоверенного-источника> +YAML.load {% endhighlight %} ## Затронутые версии From 1b7a23b722eb28264a0103ffbf142e22581d9179 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Tue, 27 Oct 2020 21:30:14 +0100 Subject: [PATCH 0151/1487] Fix wrong quotes in code examples (id) --- ...h-ruby-shell-sistem-operasi-abstrak-dalam-ruby.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/id/news/_posts/2008-03-31-rush-ruby-shell-sistem-operasi-abstrak-dalam-ruby.md b/id/news/_posts/2008-03-31-rush-ruby-shell-sistem-operasi-abstrak-dalam-ruby.md index 006ee7fb0f..8962f4b9f3 100644 --- a/id/news/_posts/2008-03-31-rush-ruby-shell-sistem-operasi-abstrak-dalam-ruby.md +++ b/id/news/_posts/2008-03-31-rush-ruby-shell-sistem-operasi-abstrak-dalam-ruby.md @@ -10,18 +10,18 @@ dan remote login (ssh), yang ditulis dengan Ruby dan menerima syntax Ruby untuk menjalankan sistem operasi. Seperti operasi berikut: {% highlight ruby %} -processes.each { |p| p.kill if p.command == “mongrel_rails“ } +processes.each { |p| p.kill if p.command == "mongrel_rails" } {% endhighlight %} Atau {% highlight ruby %} -local = Rush::Box.new(’localhost‘) -remote = Rush::Box.new(’my.remote.server.com‘) -local_dir = local[’/Users/adam/myproj/‘] -remote_dir = remote[’/home/myproj/app/‘] +local = Rush::Box.new('localhost') +remote = Rush::Box.new('my.remote.server.com') +local_dir = local['/Users/adam/myproj/'] +remote_dir = remote['/home/myproj/app/'] local_dir.copy_to remote_dir -remote_dir[’**/.svn/‘].each { |d| d.destroy } +remote_dir['**/.svn/'].each { |d| d.destroy } {% endhighlight %} Anda dapat membuat sesuatu dengan menggunakan usual UNIX commands, Rush From eadfce9b8e60169f23b4410fedcd1f9851656e9b Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Tue, 27 Oct 2020 21:36:32 +0100 Subject: [PATCH 0152/1487] Fix syntax errors in code examples (missing comments) --- ...ation-of-positional-and-keyword-arguments-in-ruby-3-0.md | 4 ++-- ...ation-of-positional-and-keyword-arguments-in-ruby-3-0.md | 6 +++--- ...ation-of-positional-and-keyword-arguments-in-ruby-3-0.md | 6 +++--- ...ation-of-positional-and-keyword-arguments-in-ruby-3-0.md | 6 +++--- ...ation-of-positional-and-keyword-arguments-in-ruby-3-0.md | 6 +++--- ...ation-of-positional-and-keyword-arguments-in-ruby-3-0.md | 6 +++--- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/de/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/de/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md index 032a15831b..30114025a6 100644 --- a/de/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md +++ b/de/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -453,8 +453,8 @@ def bar(x=1, **kwargs) p [x, kwargs] end -foo({}) => [{}, {}] -bar({}) => [1, {}] +foo({}) #=> [{}, {}] +bar({}) #=> [1, {}] bar({}, **{}) #=> erwartet: [{}, {}], tatsächlich: [1, {}] {% endhighlight %} diff --git a/en/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/en/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md index 0bdc6ac74d..24aeac9c1a 100644 --- a/en/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md +++ b/en/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -330,10 +330,10 @@ def bar(x=1, **kwargs) p [x, kwargs] end -foo({}) => [{}, {}] -bar({}) => [1, {}] +foo({}) #=> [{}, {}] +bar({}) #=> [1, {}] -bar({}, **{}) => expected: [{}, {}], actual: [1, {}] +bar({}, **{}) #=> expected: [{}, {}], actual: [1, {}] {% endhighlight %} In Ruby 2, `foo({})` passes an empty hash as a normal argument (i.e., `{}` is assigned to `x`), while `bar({})` passes a keyword argument (i.e, `{}` is assigned to `kwargs`). So `any_method({})` is very ambiguous. diff --git a/es/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/es/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md index 63f7cf0be4..b2053e5435 100644 --- a/es/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md +++ b/es/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -441,10 +441,10 @@ def bar(x=1, **kwargs) p [x, kwargs] end -foo({}) => [{}, {}] -bar({}) => [1, {}] +foo({}) #=> [{}, {}] +bar({}) #=> [1, {}] -bar({}, **{}) => esperado : [{}, {}], realmente: [1, {}] +bar({}, **{}) #=> esperado : [{}, {}], realmente: [1, {}] {% endhighlight %} En Ruby 2, `foo({})` pasa un diccionario vacío como un argumento normal diff --git a/id/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/id/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md index 949f4eeccc..d7320001f6 100644 --- a/id/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md +++ b/id/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -421,10 +421,10 @@ def bar(x=1, **kwargs) p [x, kwargs] end -foo({}) => [{}, {}] -bar({}) => [1, {}] +foo({}) #=> [{}, {}] +bar({}) #=> [1, {}] -bar({}, **{}) => expected: [{}, {}], actual: [1, {}] +bar({}, **{}) #=> expected: [{}, {}], actual: [1, {}] {% endhighlight %} Pada Ruby 2, `foo({})` melewatkan sebuah *hash* kosong sebagai *normal argument* diff --git a/ko/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/ko/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md index 3d087b3ed5..6a61641aeb 100644 --- a/ko/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md +++ b/ko/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -391,10 +391,10 @@ def bar(x=1, **kwargs) p [x, kwargs] end -foo({}) => [{}, {}] -bar({}) => [1, {}] +foo({}) #=> [{}, {}] +bar({}) #=> [1, {}] -bar({}, **{}) => expected: [{}, {}], actual: [1, {}] +bar({}, **{}) #=> expected: [{}, {}], actual: [1, {}] {% endhighlight %} 루비 2에서 `foo({})`는 빈 해시를 일반적인 인자로 넘기지만(즉, `{}`는 `x`에 대입됩니다), `bar({})`는 키워드 인자를 넘깁니다(즉, `{}`는 `kwargs`에 대입됩니다). 그래서 `any_method({})`는 굉장히 모호합니다. diff --git a/tr/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/tr/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md index ca9824d4b6..90650b5ad2 100644 --- a/tr/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md +++ b/tr/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -379,10 +379,10 @@ def bar(x=1, **kwargs) p [x, kwargs] end -foo({}) => [{}, {}] -bar({}) => [1, {}] +foo({}) #=> [{}, {}] +bar({}) #=> [1, {}] -bar({}, **{}) => beklenen: [{}, {}], asıl: [1, {}] +bar({}, **{}) #=> beklenen: [{}, {}], asıl: [1, {}] {% endhighlight %} Ruby 2'de `foo({})`, boş bir Hash'i normal bir argüman olarak geçirir (yani `{}`, `x`'e geçirilir), fakat `bar({})` bir anahtar kelime argümanı geçirir (yani `{}`, `kwargs`'a atanır). From 246cc6829a91b20141c93a4a39140d5b65d6c47f Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Tue, 27 Oct 2020 22:14:22 +0100 Subject: [PATCH 0153/1487] Stop using Travis CI --- .travis.yml | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4934b860d5..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: ruby -sudo: false -rvm: 2.7.0 -cache: bundler -env: - - TASK=test -before_install: gem install bundler:2.0.2 -script: bundle exec rake $TASK -# Notifications, used by our Gitter channel. -notifications: - webhooks: - urls: - - https://webhooks.gitter.im/e/9eef19829de6aa749075 - on_success: change # options: [always|never|change] default: always - on_failure: always # options: [always|never|change] default: always - on_start: false # default: false From 7f4e288db53c22edf3e013a7c4490d51629d62c1 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 28 Oct 2020 09:56:43 +0900 Subject: [PATCH 0154/1487] Removed Travis CI badge --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index c930f4ff21..5bc78ca803 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,6 @@ www.ruby-lang.org [![Build Status](https://github.com/ruby/www.ruby-lang.org/workflows/ci/badge.svg)](https://github.com/ruby/www.ruby-lang.org/actions?query=branch%3Amaster) -[![Build Status](https://travis-ci.org/ruby/www.ruby-lang.org.svg?branch=master)](https://travis-ci.org/ruby/www.ruby-lang.org) - This is the [Jekyll](http://www.jekyllrb.com/) source of the [www.ruby-lang.org](https://www.ruby-lang.org/) website. From 16a79069306e301bfe0957706b3be580e226f372 Mon Sep 17 00:00:00 2001 From: Shia Date: Wed, 28 Oct 2020 21:08:52 +0900 Subject: [PATCH 0155/1487] Update to-ruby-from-java article (ko) (#2542) Backport #2507 --- .../ruby-from-other-languages/to-ruby-from-java/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ko/documentation/ruby-from-other-languages/to-ruby-from-java/index.md b/ko/documentation/ruby-from-other-languages/to-ruby-from-java/index.md index 8e9d0a3206..f10a071d09 100644 --- a/ko/documentation/ruby-from-other-languages/to-ruby-from-java/index.md +++ b/ko/documentation/ruby-from-other-languages/to-ruby-from-java/index.md @@ -26,7 +26,7 @@ lang: ko * 코드를 컴파일 할 필요가 없습니다. 직접 실행하시면 됩니다. * 여러 인기있는 서드파티 GUI 툴킷이 있습니다. 루비 유저는 [WxRuby][1], [FXRuby][2], [Ruby-GNOME2][3], [Qt][4]나 - 내장 루비 Tk 등을 사용할 수 있습니다. + [루비 Tk](https://github.com/ruby/tk) 등을 사용할 수 있습니다. * 클래스 같은 것을 정의할 때 코드 블록에 중괄호를 넣는 대신, 선언 뒤에 `end` 키워드를 사용합니다. * `import` 대신 `require`를 사용합니다. From baaa53cf5f5f9ef68c8a99a2f172914376be9f67 Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Sun, 4 Oct 2020 23:01:44 +0700 Subject: [PATCH 0156/1487] Translate Support of Ruby 2.4 has ended news (id) --- ...020-04-05-support-of-ruby-2-4-has-ended.md | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 id/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md diff --git a/id/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md b/id/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md new file mode 100644 index 0000000000..4a36d3df51 --- /dev/null +++ b/id/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md @@ -0,0 +1,47 @@ +--- +layout: news_post +title: "Dukungan Ruby 2.4 telah berakhir" +author: "usa" +translator: "meisyal" +date: 2020-04-05 12:00:00 +0000 +lang: id +--- + +Kami mengumumkan semua dukungan dari rangkaian Ruby 2.4 telah berakhir. + +Mulai akhir bulan Maret tahun lalu, dukungan dari rangkaian Ruby 2.4 dalam +fase perawatan keamanan. +Sekarang, setelah satu tahun berlalu, fase tersebut telah berakhir. +Sehingga, pada 31 Maret 2020, semua dukungan dari rangkaian Ruby 2.4 telah +berakhir. +Perbaikan *bug* dan keamanan dari versi Ruby saat ini tidak akan di-*backport* +ke 2.4 dan tidak akan ada lagi rilis *patch* dari Ruby 2.4. +Kami merilis Ruby 2.4.10 pada 31 Maret 2020, tetapi itu memberikan sedikit +waktu ke pengguna untuk berpindah ke versi terbaru. +Kami merekomendasikan Anda untuk memperbarui Ruby ke versi terbaru segera +mungkin. + + +## Tentang versi Ruby yang didukung saat ini + +### Rangkaian Ruby 2.7 + +Saat ini dalam fase perawatan biasa. +Kami akan *backport* perbaikan *bug* dan merilis dengan perbaikan +jika dibutuhkan. Dan jika sebuah isu kemanan serius ditemukan, kami akan +merilis perbaikannya segera. + +### Rangkaian Ruby 2.6 + +Saat ini dalam fase perawatan biasa. +Kami akan *backport* perbaikan *bug* dan merilis dengan perbaikan +jika dibutuhkan. Dan jika sebuah isu kemanan serius ditemukan, kami akan +merilis perbaikannya segera. + +### Rangkaian Ruby 2.5 + +Saat ini dalam fase perawatan keamanan. +Kami tidak akan pernah *backport* perbaikan *bug* apapun ke 2.5 kecuali +perbaikan keamanan. Jika sebuah isu keamanan serius ditemukan, kami akan +merilis perbaikannya segera. Kami sedang merencanakan untuk mengakhiri +dukungan dari rangkaian Ruby 2.5 pada akhir Maret 2021. From a7f6f810c3ba6cc556e5bdc66fd6aa1a88c86d84 Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Wed, 21 Oct 2020 22:19:44 +0700 Subject: [PATCH 0157/1487] Translate 2021 Fukuoka Ruby Award Competition news (id) --- .../2020-07-16-fukuoka-ruby-award-2021.md | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 id/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md diff --git a/id/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md b/id/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md new file mode 100644 index 0000000000..2bd0ab4910 --- /dev/null +++ b/id/news/_posts/2020-07-16-fukuoka-ruby-award-2021.md @@ -0,0 +1,41 @@ +--- +layout: news_post +title: "2021 Fukuoka Ruby Award Competition - Peserta akan dinilai oleh Matz" +author: "Fukuoka Ruby" +translator: "meisyal" +date: 2020-07-16 00:00:00 +0000 +lang: id +--- + +Penggemar Ruby terhormat, + +Pemerintah Fukuoka, Jepang, bersama dengan "Matz" Matsumoto ingin mengundang +Anda untuk mengikuti kompetisi Ruby berikut. Jika Anda pernah mengembangkan +sebuah program Ruby yang menarik, sangat disarankan untuk mengikuti kompetisi +ini. + +2021 Fukuoka Ruby Award Competition - Hadiah Utama - 1 Juta Yen! + +Batas akhir pendaftaran: 4 Desember 2020 + +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) + +Matz dan sebuah grup panelis akan memilih pemenang kompetisi ini. Hadiah utama +dari kompetisi ini adalah 1 juta Yen. Hadiah pemenang sebelumnya termasuk +*Rhomobile* (USA) dan APEC *Climate Center* (Korea). + +Program-program yang masuk dalam kompetisi ini tidak sepenuhnya harus ditulis +dalam bahasa Ruby, tetapi harus mengambil kemudahan dari karakteristik unik +yang diberikan oleh Ruby. + +Program harus telah dikembangkan atau diperbarui selama setahun terakhir. +Mohon kunjungi laman Fukuoka berikut ini untuk masuk: + +[http://www.digitalfukuoka.jp/events/226](http://www.digitalfukuoka.jp/events/226) + +Silakan kirim formulir pengajuan ke award@f-ruby.com + +"Matz akan mengetes dan mengulas kode Anda sepenuhnya, sehingga ini sangat +berarti untuk mengajukan! Kompetisi ini gratis untuk diikuti." + +Terima kasih. From 275549a5b1c27de071c686e0b70e23066ab14edf Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Sun, 1 Nov 2020 22:46:06 +0300 Subject: [PATCH 0158/1487] Update To Ruby From Java page (ru) (#2543) Backport #2507. --- .../ruby-from-other-languages/to-ruby-from-java/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ru/documentation/ruby-from-other-languages/to-ruby-from-java/index.md b/ru/documentation/ruby-from-other-languages/to-ruby-from-java/index.md index ee50b3659e..ddba6f016b 100644 --- a/ru/documentation/ruby-from-other-languages/to-ruby-from-java/index.md +++ b/ru/documentation/ruby-from-other-languages/to-ruby-from-java/index.md @@ -24,7 +24,7 @@ Java - это энтерпрайзно. Проверено. И быстро (н * не надо компилировать код - он интерпретируется. * есть несколько популярных GUI тулкитов - можно попробовать [WxRuby][1], [FxRuby][2], - [Ruby-GNOME2][3], [Qt][4], или стандартный биндинг к Tk. + [Ruby-GNOME2][3], [Qt][4], или [Ruby Tk](https://github.com/ruby/tk), например. * в конце определения класса используется ключевое слово `end`, вместо заключения кода в скобки. * вместо `import` пишется `require`. From 812842665fdc1a271cd96daa81d1ba8b9ed46d25 Mon Sep 17 00:00:00 2001 From: "Alan P. C. Silva" <7315217+alanpcs@users.noreply.github.com> Date: Sun, 1 Nov 2020 17:05:27 -0300 Subject: [PATCH 0159/1487] Fix little quickstart docs typo (pt) (#2544) --- pt/documentation/quickstart/4/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pt/documentation/quickstart/4/index.md b/pt/documentation/quickstart/4/index.md index caba406602..8da8ad4089 100644 --- a/pt/documentation/quickstart/4/index.md +++ b/pt/documentation/quickstart/4/index.md @@ -143,7 +143,7 @@ executa esse código. ## Considere-se Apresentado ao Ruby Pronto, essa foi uma visita rápida ao mundo do Ruby. Existe muito mais para -explorar, as diferentes estruturas de controlo que oRuby oferece; o uso +explorar, as diferentes estruturas de controlo que o Ruby oferece; o uso de blocos e de `yield`; módulos como _mixins_; e muito mais. Espero que esta pequena amostra da linguagem Ruby tenha deixado o desejo de aprender mais. From b9bb0a5b18dcc45187ee5e18eca4db316a0c8b2d Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Mon, 2 Nov 2020 21:55:49 +0100 Subject: [PATCH 0160/1487] Add magic comment frozen_string_literal: true --- lib/link_checker.rb | 2 ++ lib/linter.rb | 2 ++ lib/linter/document.rb | 2 ++ lib/linter/release.rb | 2 ++ lib/markup_checker.rb | 2 ++ 5 files changed, 10 insertions(+) diff --git a/lib/link_checker.rb b/lib/link_checker.rb index a872464a15..7a79d3f692 100644 --- a/lib/link_checker.rb +++ b/lib/link_checker.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + gem "spidr", "~> 0.6" require "spidr" diff --git a/lib/linter.rb b/lib/linter.rb index 6cea7d0738..6a18fdf378 100644 --- a/lib/linter.rb +++ b/lib/linter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "bundler/setup" require "pathname" require 'yaml' diff --git a/lib/linter/document.rb b/lib/linter/document.rb index 37b9afb4fd..ee7cba966c 100644 --- a/lib/linter/document.rb +++ b/lib/linter/document.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Linter class Document diff --git a/lib/linter/release.rb b/lib/linter/release.rb index 8eaa6968c6..de8d8a1a7f 100644 --- a/lib/linter/release.rb +++ b/lib/linter/release.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Linter class Release diff --git a/lib/markup_checker.rb b/lib/markup_checker.rb index ac20f3519c..536043ee1b 100644 --- a/lib/markup_checker.rb +++ b/lib/markup_checker.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class MarkupChecker # Validate _site markup with validate-website From cb876253964004a532aadd2dd5a803725c061413 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Mon, 2 Nov 2020 22:03:24 +0100 Subject: [PATCH 0161/1487] Fix code style (quotes, spaces, empty lines) --- lib/link_checker.rb | 5 ++--- lib/linter.rb | 2 +- lib/linter/document.rb | 5 +++-- lib/linter/release.rb | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/link_checker.rb b/lib/link_checker.rb index 7a79d3f692..65e0702afa 100644 --- a/lib/link_checker.rb +++ b/lib/link_checker.rb @@ -7,15 +7,14 @@ class LinkChecker # Check for broken internal links on http://localhost:localport/ def check(localport:, languages:) - - url_map = Hash.new { |hash,key| hash[key] = [] } + url_map = Hash.new {|hash, key| hash[key] = [] } Spidr.site("http://localhost:#{localport}/") do |agent| languages.each do |lang| agent.enqueue("http://localhost:#{localport}/#{lang}/") end - agent.every_link do |origin,dest| + agent.every_link do |origin, dest| url_map[dest] << origin end diff --git a/lib/linter.rb b/lib/linter.rb index 6a18fdf378..8bb3b8673d 100644 --- a/lib/linter.rb +++ b/lib/linter.rb @@ -2,7 +2,7 @@ require "bundler/setup" require "pathname" -require 'yaml' +require "yaml" require_relative "linter/document" require_relative "linter/release" diff --git a/lib/linter/document.rb b/lib/linter/document.rb index ee7cba966c..dbb387b8fc 100644 --- a/lib/linter/document.rb +++ b/lib/linter/document.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true class Linter + class Document attr_accessor :filename, :yaml, :content @@ -77,11 +78,11 @@ def date_mismatch? end def date_utc_string - date.getutc.strftime('%Y/%m/%d') + date.getutc.strftime("%Y/%m/%d") end def filename_date_string - File.basename(filename).split('-',4)[0..2].join('/') + File.basename(filename).split("-", 4)[0..2].join("/") end def date_not_utc? diff --git a/lib/linter/release.rb b/lib/linter/release.rb index de8d8a1a7f..f0eed5a28e 100644 --- a/lib/linter/release.rb +++ b/lib/linter/release.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true class Linter + class Release # identifier displayed in error messages From 8882a8427d297a3f09f685fd6c2562423245fc01 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Mon, 2 Nov 2020 22:18:31 +0100 Subject: [PATCH 0162/1487] Fix code style (do not use _ prefix for used variables) --- lib/linter/document.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/linter/document.rb b/lib/linter/document.rb index dbb387b8fc..217ad2ae8f 100644 --- a/lib/linter/document.rb +++ b/lib/linter/document.rb @@ -134,12 +134,12 @@ def sha512_length_invalid? private def read_yaml_and_content(filename) - _content = File.read(filename) + content = File.read(filename) - matchdata = _content.match(/\A(---\s*\n.*?\n?)^(---\s*$\n?)/m) - _yaml = YAML.load(matchdata[1]) if matchdata + matchdata = content.match(/\A(---\s*\n.*?\n?)^(---\s*$\n?)/m) + yaml = YAML.load(matchdata[1]) if matchdata - [_yaml || {}, _content || ""] + [yaml || {}, content || ""] end def valid_string(obj) From f7868fa3bb4113d60a03607aee98a44acb07ffc7 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Mon, 2 Nov 2020 22:19:45 +0100 Subject: [PATCH 0163/1487] Freeze mutable objects assigned to constants --- lib/linter.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/linter.rb b/lib/linter.rb index 8bb3b8673d..ecf2417d5a 100644 --- a/lib/linter.rb +++ b/lib/linter.rb @@ -17,14 +17,14 @@ class Linter %r{\A[^/]*/examples/}, %r{\A_includes/}, %r{\Atest/} - ] + ].freeze WHITESPACE_EXCLUSIONS = [ "en/news/_posts/2005-07-01-xmlrpcipimethods-vulnerability.md", "ja/news/_posts/2005-07-01-20050701.md", "de/news/_posts/2005-07-01-xmlrpcipimethods-vulnerability.md", "ko/news/_posts/2005-07-01-xmlrpcipimethods-vulnerability.md" - ] + ].freeze RELEASES_FILE = "_data/releases.yml" From 0110e95a300316cac955132106bf60c4c15e96e6 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Mon, 2 Nov 2020 22:22:17 +0100 Subject: [PATCH 0164/1487] Small code style fixes --- lib/linter.rb | 4 ++-- lib/linter/document.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/linter.rb b/lib/linter.rb index ecf2417d5a..f860436bf4 100644 --- a/lib/linter.rb +++ b/lib/linter.rb @@ -64,7 +64,7 @@ def load_files end @docs = md_files.map {|fn| Document.new(fn) } - @posts = @docs.select {|doc| doc.post? } + @posts = @docs.select(&:post?) end def load_releases @@ -133,7 +133,7 @@ def report puts errors.each do |doc, messages| puts doc.name - puts messages.map {|msg| " #{msg}" } + puts(messages.map {|msg| " #{msg}" }) end end end diff --git a/lib/linter/document.rb b/lib/linter/document.rb index 217ad2ae8f..df1c5db5bb 100644 --- a/lib/linter/document.rb +++ b/lib/linter/document.rb @@ -52,7 +52,7 @@ def author_invalid? # translator variable must be present but can be nil def translator_missing? - !yaml.has_key?("translator") + !yaml.key?("translator") end def translator_invalid? From 7e4c1e0f0c550ff627447855588e1e2ee0de72d4 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Mon, 2 Nov 2020 22:25:56 +0100 Subject: [PATCH 0165/1487] Remove redundant else-clause --- lib/linter.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/linter.rb b/lib/linter.rb index f860436bf4..8ccdc87261 100644 --- a/lib/linter.rb +++ b/lib/linter.rb @@ -102,7 +102,6 @@ def check errors[doc] << "invalid SHA1 length" if doc.sha1_length_invalid? errors[doc] << "invalid SHA256 length" if doc.sha256_length_invalid? errors[doc] << "invalid SHA512 length" if doc.sha512_length_invalid? - else end end end From 768b158e35ae0cb787319485acec42c9a8421f08 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Mon, 2 Nov 2020 22:30:51 +0100 Subject: [PATCH 0166/1487] Add magic comment frozen_string_literal: true --- test/test_linter.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test_linter.rb b/test/test_linter.rb index 1704fe0c3d..ebeeafde9c 100644 --- a/test/test_linter.rb +++ b/test/test_linter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "minitest/autorun" require_relative "../lib/linter" From bef499e6793bb8b6b953fcd8b5d6e961818ca423 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Mon, 2 Nov 2020 22:33:27 +0100 Subject: [PATCH 0167/1487] Use expand_path with __dir__ --- test/test_linter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_linter.rb b/test/test_linter.rb index ebeeafde9c..fa9bb0c048 100644 --- a/test/test_linter.rb +++ b/test/test_linter.rb @@ -3,7 +3,7 @@ require "minitest/autorun" require_relative "../lib/linter" -SRCPATH = File.expand_path(File.dirname(__FILE__)) +SRCPATH = File.expand_path(__dir__) FIXTURES_PATH = "#{SRCPATH}/fixtures" From ac38d1b90162a2155e474586940a4ed7feb15b45 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Tue, 3 Nov 2020 20:10:21 +0100 Subject: [PATCH 0168/1487] Fix code style (use double quotes) --- _plugins/news.rb | 66 +++++++++++++++++----------------- _plugins/posted_by.rb | 10 +++--- _plugins/translation_status.rb | 22 ++++++------ 3 files changed, 49 insertions(+), 49 deletions(-) diff --git a/_plugins/news.rb b/_plugins/news.rb index 1c10cfd8a3..8cf1f347e3 100644 --- a/_plugins/news.rb +++ b/_plugins/news.rb @@ -1,4 +1,4 @@ -require 'date' +require "date" module Jekyll module News @@ -10,34 +10,34 @@ def initialize(site,base,layout,lang,posts) @lang = lang @dir = File.join(@lang,news_dir) - @name = 'index.html' + @name = "index.html" - @locales = @site.data['locales'][@lang]['news'] || - @site.data['locales']['en']['news'] + @locales = @site.data["locales"][@lang]["news"] || + @site.data["locales"]["en"]["news"] - @month_names = @site.data['locales'][@lang]['month_names'] || - @site.data['locales']['en']['month_names'] - @month_names = ['None'] + @month_names + @month_names = @site.data["locales"][@lang]["month_names"] || + @site.data["locales"]["en"]["month_names"] + @month_names = ["None"] + @month_names process(@name) - read_yaml(File.join(base, '_layouts'),layout) + read_yaml(File.join(base, "_layouts"),layout) oldest_post = posts.max_by { |post| post.date } - data['lang'] = @lang - data['posts'] = posts.reverse + data["lang"] = @lang + data["posts"] = posts.reverse end def news_dir - 'news' + "news" end def insert_date(string, year, month = 0) string.gsub(/%Y|%m|%-m|%B/, { - '%Y' => year.to_s, - '%m' => "%.2d" % month, - '%-m' => month.to_s, - '%B' => @month_names[month] + "%Y" => year.to_s, + "%m" => "%.2d" % month, + "%-m" => month.to_s, + "%B" => @month_names[month] }) end @@ -45,7 +45,7 @@ def insert_date(string, year, month = 0) class MonthlyArchive < ArchivePage - LAYOUT = 'news_archive_month.html' + LAYOUT = "news_archive_month.html" def initialize(site,base,lang,year,month,posts) super(site,base,LAYOUT,lang,posts) @@ -54,17 +54,17 @@ def initialize(site,base,lang,year,month,posts) @month = month @dir = File.join(@dir,@year.to_s,"%.2d" % @month) - title = @locales['monthly_archive_title'] + title = @locales["monthly_archive_title"] - data['title'] = insert_date(title, @year, @month) - data['year'] = year + data["title"] = insert_date(title, @year, @month) + data["year"] = year end end class YearlyArchive < ArchivePage - LAYOUT = 'news_archive_year.html' + LAYOUT = "news_archive_year.html" def initialize(site,base,lang,year,posts) super(site,base,LAYOUT,lang,posts) @@ -72,16 +72,16 @@ def initialize(site,base,lang,year,posts) @year = year @dir = File.join(@dir,@year.to_s) - title = @locales['yearly_archive_title'] - month_link_text = @locales['monthly_archive_link'] + title = @locales["yearly_archive_title"] + month_link_text = @locales["monthly_archive_link"] - data['title'] = insert_date(title, @year) - data['year'] = @year + data["title"] = insert_date(title, @year) + data["year"] = @year months = posts.map { |post| post.date.month }.uniq # hash with url => link_text (including year) elements - data['months'] = Hash[ + data["months"] = Hash[ months.map { |month| "%.2d" % month }.zip( months.map { |month| insert_date(month_link_text, @year, month) } ) @@ -92,23 +92,23 @@ def initialize(site,base,lang,year,posts) class Index < ArchivePage - LAYOUT = 'news.html' + LAYOUT = "news.html" MAX_POSTS = 10 def initialize(site,base,lang,posts) super(site,base,LAYOUT,lang,posts) - title = @locales['recent_news'] - year_link_text = @locales['yearly_archive_link'] + title = @locales["recent_news"] + year_link_text = @locales["yearly_archive_link"] - data['title'] = title - data['posts'] = posts.last(MAX_POSTS).reverse + data["title"] = title + data["posts"] = posts.last(MAX_POSTS).reverse years = posts.map { |post| post.date.year }.uniq.reverse # hash with url => link_text elements - data['years'] = Hash[ + data["years"] = Hash[ years.map { |year| year.to_s }.zip( years.map { |year| insert_date(year_link_text, year) } ) @@ -121,11 +121,11 @@ def initialize(site,base,lang,posts) class Document def lang - data['lang'] + data["lang"] end def title - data['title'] + data["title"] end end diff --git a/_plugins/posted_by.rb b/_plugins/posted_by.rb index 99fd754546..ec89869e17 100644 --- a/_plugins/posted_by.rb +++ b/_plugins/posted_by.rb @@ -16,14 +16,14 @@ module PostedByFilter def posted_by(date, author = nil) date = date.is_a?(String) ? Time.parse(date) : date - lang = @context.environments.first['page']['lang'] || 'en' - posted_by = @context.registers[:site].data['locales'][lang]['posted_by'] || - @context.registers[:site].data['locales']['en']['posted_by'] + lang = @context.environments.first["page"]["lang"] || "en" + posted_by = @context.registers[:site].data["locales"][lang]["posted_by"] || + @context.registers[:site].data["locales"]["en"]["posted_by"] - if author.nil? || author.empty? || author == 'Unknown Author' + if author.nil? || author.empty? || author == "Unknown Author" posted_by = "%Y-%m-%d" else - posted_by = posted_by.gsub('AUTHOR', author) + posted_by = posted_by.gsub("AUTHOR", author) end if date.respond_to?(:strftime) diff --git a/_plugins/translation_status.rb b/_plugins/translation_status.rb index 56ba749e27..f41f3d3fca 100644 --- a/_plugins/translation_status.rb +++ b/_plugins/translation_status.rb @@ -9,14 +9,14 @@ module Jekyll module TranslationStatus LANGS = %w[en de es id ja ko pt tr zh_cn zh_tw] - START_DATE = '2013-04-01' + START_DATE = "2013-04-01" - OK_CHAR = '✓' - MISSING_CHAR = '' # '✗' + OK_CHAR = "✓" + MISSING_CHAR = "" # "✗" POST_DISPLAY_LENGTH = 50 - TEMPLATE =<<-EOF.gsub(/^ /, '') + TEMPLATE =<<-EOF.gsub(/^ /, "")

Posts with missing translations: <%= posts.size.to_s %>
Start date: <%= START_DATE %>
@@ -60,7 +60,7 @@ def completed? def short_name if name.size > POST_DISPLAY_LENGTH - name[0...POST_DISPLAY_LENGTH - 3] + '...' + name[0...POST_DISPLAY_LENGTH - 3] + "..." else name end @@ -109,27 +109,27 @@ def table_row(post) def render(context) categories = context.registers[:site].categories - ignored_langs = categories.keys - LANGS - ['news'] + ignored_langs = categories.keys - LANGS - ["news"] LANGS.each do |lang| categories[lang].each do |post| next if too_old(post.date) - name = post.url.gsub(%r(\A/#{lang}/news/), '') + name = post.url.gsub(%r(\A/#{lang}/news/), "") @posts[name].translations << lang - @posts[name].security = true if post.data['tags'].include?('security') + @posts[name].security = true if post.data["tags"].include?("security") end end remove_completed_posts - ignored = ignored_langs.sort.join(', ') + ignored = ignored_langs.sort.join(", ") posts = @posts.sort.reverse.map {|name, post| post } - ERB.new(TEMPLATE, nil, '-').result(binding) + ERB.new(TEMPLATE, nil, "-").result(binding) end end end end -Liquid::Template.register_tag('translation_status', Jekyll::TranslationStatus::Tag) +Liquid::Template.register_tag("translation_status", Jekyll::TranslationStatus::Tag) From 365e570743f4c004d396008761dc8e272daa2af7 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Tue, 3 Nov 2020 20:17:11 +0100 Subject: [PATCH 0169/1487] Remove Emacs' magic comment for encoding --- _plugins/translation_status.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/_plugins/translation_status.rb b/_plugins/translation_status.rb index f41f3d3fca..5caca66670 100644 --- a/_plugins/translation_status.rb +++ b/_plugins/translation_status.rb @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - module Jekyll # Provides a tag that generates an overview of all news posts From 07c1bd48e990680ff25704dc5375962f90c37a37 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Tue, 3 Nov 2020 20:19:49 +0100 Subject: [PATCH 0170/1487] Add magic comment frozen_string_literal: true --- _plugins/news.rb | 2 ++ _plugins/posted_by.rb | 2 ++ _plugins/translation_status.rb | 2 ++ 3 files changed, 6 insertions(+) diff --git a/_plugins/news.rb b/_plugins/news.rb index 8cf1f347e3..d07f6097a7 100644 --- a/_plugins/news.rb +++ b/_plugins/news.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "date" module Jekyll diff --git a/_plugins/posted_by.rb b/_plugins/posted_by.rb index ec89869e17..898e0fbf70 100644 --- a/_plugins/posted_by.rb +++ b/_plugins/posted_by.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll # Generates a localized "Posted by ... on ..." text from a date, diff --git a/_plugins/translation_status.rb b/_plugins/translation_status.rb index 5caca66670..4800e48780 100644 --- a/_plugins/translation_status.rb +++ b/_plugins/translation_status.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Jekyll # Provides a tag that generates an overview of all news posts From 70f448d918d9dcf2b8400cb455b325fceb675cc2 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Tue, 3 Nov 2020 20:22:30 +0100 Subject: [PATCH 0171/1487] Fix code style (missing spaces after comma) --- _plugins/news.rb | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/_plugins/news.rb b/_plugins/news.rb index d07f6097a7..24e0e86afe 100644 --- a/_plugins/news.rb +++ b/_plugins/news.rb @@ -6,12 +6,12 @@ module Jekyll module News class ArchivePage < Page - def initialize(site,base,layout,lang,posts) + def initialize(site, base, layout, lang, posts) @site = site @base = base @lang = lang - @dir = File.join(@lang,news_dir) + @dir = File.join(@lang, news_dir) @name = "index.html" @locales = @site.data["locales"][@lang]["news"] || @@ -22,7 +22,7 @@ def initialize(site,base,layout,lang,posts) @month_names = ["None"] + @month_names process(@name) - read_yaml(File.join(base, "_layouts"),layout) + read_yaml(File.join(base, "_layouts"), layout) oldest_post = posts.max_by { |post| post.date } @@ -49,12 +49,12 @@ class MonthlyArchive < ArchivePage LAYOUT = "news_archive_month.html" - def initialize(site,base,lang,year,month,posts) - super(site,base,LAYOUT,lang,posts) + def initialize(site, base, lang, year, month, posts) + super(site, base, LAYOUT, lang, posts) @year = year @month = month - @dir = File.join(@dir,@year.to_s,"%.2d" % @month) + @dir = File.join(@dir, @year.to_s, "%.2d" % @month) title = @locales["monthly_archive_title"] @@ -68,11 +68,11 @@ class YearlyArchive < ArchivePage LAYOUT = "news_archive_year.html" - def initialize(site,base,lang,year,posts) - super(site,base,LAYOUT,lang,posts) + def initialize(site, base, lang, year, posts) + super(site, base, LAYOUT, lang, posts) @year = year - @dir = File.join(@dir,@year.to_s) + @dir = File.join(@dir, @year.to_s) title = @locales["yearly_archive_title"] month_link_text = @locales["monthly_archive_link"] @@ -98,8 +98,8 @@ class Index < ArchivePage MAX_POSTS = 10 - def initialize(site,base,lang,posts) - super(site,base,LAYOUT,lang,posts) + def initialize(site, base, lang, posts) + super(site, base, LAYOUT, lang, posts) title = @locales["recent_news"] year_link_text = @locales["yearly_archive_link"] @@ -138,9 +138,9 @@ class GenerateNews < Generator priority :low def generate(site) - posts = Hash.new do |hash,lang| - hash[lang] = Hash.new do |years,year| - years[year] = Hash.new do |months,month| + posts = Hash.new do |hash, lang| + hash[lang] = Hash.new do |years, year| + years[year] = Hash.new do |months, month| months[month] = [] end end @@ -150,7 +150,7 @@ def generate(site) posts[post.lang][post.date.year][post.date.month] << post end - posts.each do |lang,years| + posts.each do |lang, years| index = News::Index.new( site, site.source, @@ -158,11 +158,11 @@ def generate(site) years.values.map(&:values).flatten ) - index.render(site.layouts,site.site_payload) + index.render(site.layouts, site.site_payload) index.write(site.dest) site.pages << index - years.each do |year,months| + years.each do |year, months| yearly_archive = News::YearlyArchive.new( site, site.source, @@ -171,11 +171,11 @@ def generate(site) months.values.flatten ) - yearly_archive.render(site.layouts,site.site_payload) + yearly_archive.render(site.layouts, site.site_payload) yearly_archive.write(site.dest) site.pages << yearly_archive - months.each do |month,posts_for_month| + months.each do |month, posts_for_month| monthly_archive = News::MonthlyArchive.new( site, site.source, @@ -185,7 +185,7 @@ def generate(site) posts_for_month ) - monthly_archive.render(site.layouts,site.site_payload) + monthly_archive.render(site.layouts, site.site_payload) monthly_archive.write(site.dest) site.pages << monthly_archive end From 23308b3a40005c1e3267fee3778327b1e7a97ee1 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Tue, 3 Nov 2020 20:30:34 +0100 Subject: [PATCH 0172/1487] Fix code style (spaces) --- _plugins/news.rb | 22 +++++++++++----------- _plugins/translation_status.rb | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/_plugins/news.rb b/_plugins/news.rb index 24e0e86afe..89f583ecdb 100644 --- a/_plugins/news.rb +++ b/_plugins/news.rb @@ -10,9 +10,9 @@ def initialize(site, base, layout, lang, posts) @site = site @base = base - @lang = lang - @dir = File.join(@lang, news_dir) - @name = "index.html" + @lang = lang + @dir = File.join(@lang, news_dir) + @name = "index.html" @locales = @site.data["locales"][@lang]["news"] || @site.data["locales"]["en"]["news"] @@ -24,7 +24,7 @@ def initialize(site, base, layout, lang, posts) process(@name) read_yaml(File.join(base, "_layouts"), layout) - oldest_post = posts.max_by { |post| post.date } + oldest_post = posts.max_by {|post| post.date } data["lang"] = @lang data["posts"] = posts.reverse @@ -78,14 +78,14 @@ def initialize(site, base, lang, year, posts) month_link_text = @locales["monthly_archive_link"] data["title"] = insert_date(title, @year) - data["year"] = @year + data["year"] = @year - months = posts.map { |post| post.date.month }.uniq + months = posts.map {|post| post.date.month }.uniq # hash with url => link_text (including year) elements data["months"] = Hash[ - months.map { |month| "%.2d" % month }.zip( - months.map { |month| insert_date(month_link_text, @year, month) } + months.map {|month| "%.2d" % month }.zip( + months.map {|month| insert_date(month_link_text, @year, month) } ) ] end @@ -107,12 +107,12 @@ def initialize(site, base, lang, posts) data["title"] = title data["posts"] = posts.last(MAX_POSTS).reverse - years = posts.map { |post| post.date.year }.uniq.reverse + years = posts.map {|post| post.date.year }.uniq.reverse # hash with url => link_text elements data["years"] = Hash[ - years.map { |year| year.to_s }.zip( - years.map { |year| insert_date(year_link_text, year) } + years.map {|year| year.to_s }.zip( + years.map {|year| insert_date(year_link_text, year) } ) ] end diff --git a/_plugins/translation_status.rb b/_plugins/translation_status.rb index 4800e48780..459cb24a9d 100644 --- a/_plugins/translation_status.rb +++ b/_plugins/translation_status.rb @@ -8,7 +8,7 @@ module Jekyll # Outputs HTML. module TranslationStatus - LANGS = %w[en de es id ja ko pt tr zh_cn zh_tw] + LANGS = %w[en de es id ja ko pt tr zh_cn zh_tw] START_DATE = "2013-04-01" OK_CHAR = "✓" @@ -16,7 +16,7 @@ module TranslationStatus POST_DISPLAY_LENGTH = 50 - TEMPLATE =<<-EOF.gsub(/^ /, "") + TEMPLATE = <<-EOF.gsub(/^ /, "")

Posts with missing translations: <%= posts.size.to_s %>
Start date: <%= START_DATE %>
From eee4091d4d8f49f93b3cb7564d3279ab769b9877 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Tue, 3 Nov 2020 20:32:38 +0100 Subject: [PATCH 0173/1487] Fix code style (empty lines) --- _plugins/news.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/_plugins/news.rb b/_plugins/news.rb index 89f583ecdb..863c2150af 100644 --- a/_plugins/news.rb +++ b/_plugins/news.rb @@ -42,7 +42,6 @@ def insert_date(string, year, month = 0) "%B" => @month_names[month] }) end - end class MonthlyArchive < ArchivePage @@ -61,7 +60,6 @@ def initialize(site, base, lang, year, month, posts) data["title"] = insert_date(title, @year, @month) data["year"] = year end - end class YearlyArchive < ArchivePage @@ -89,7 +87,6 @@ def initialize(site, base, lang, year, posts) ) ] end - end class Index < ArchivePage @@ -116,7 +113,6 @@ def initialize(site, base, lang, posts) ) ] end - end end @@ -129,7 +125,6 @@ def lang def title data["title"] end - end class GenerateNews < Generator @@ -192,6 +187,5 @@ def generate(site) end end end - end end From 9241ee31161819d418538fc3913ed8115fa4bd34 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Tue, 3 Nov 2020 20:34:53 +0100 Subject: [PATCH 0174/1487] Freeze mutable objects assigned to constants --- _plugins/translation_status.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_plugins/translation_status.rb b/_plugins/translation_status.rb index 459cb24a9d..d3db11f02d 100644 --- a/_plugins/translation_status.rb +++ b/_plugins/translation_status.rb @@ -8,7 +8,7 @@ module Jekyll # Outputs HTML. module TranslationStatus - LANGS = %w[en de es id ja ko pt tr zh_cn zh_tw] + LANGS = %w[en de es id ja ko pt tr zh_cn zh_tw].freeze START_DATE = "2013-04-01" OK_CHAR = "✓" From 766df2b44484a0951057025f4fd8a24680760140 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Tue, 3 Nov 2020 20:36:49 +0100 Subject: [PATCH 0175/1487] Fix code style (use _ prefix for unused variables) --- _plugins/translation_status.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_plugins/translation_status.rb b/_plugins/translation_status.rb index d3db11f02d..9161f0ff96 100644 --- a/_plugins/translation_status.rb +++ b/_plugins/translation_status.rb @@ -92,7 +92,7 @@ def initialize(tag_name, path, tokens) end def remove_completed_posts - @posts.delete_if {|name, post| post.completed? } + @posts.delete_if {|_name, post| post.completed? } end def too_old(date) @@ -124,7 +124,7 @@ def render(context) remove_completed_posts ignored = ignored_langs.sort.join(", ") - posts = @posts.sort.reverse.map {|name, post| post } + posts = @posts.sort.reverse.map {|_name, post| post } ERB.new(TEMPLATE, nil, "-").result(binding) end From 38b83e9d66fc701b329fdbffcff55f7db5de1966 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Tue, 3 Nov 2020 20:43:11 +0100 Subject: [PATCH 0176/1487] Fix code style (%Q delimiters) --- _plugins/translation_status.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_plugins/translation_status.rb b/_plugins/translation_status.rb index 9161f0ff96..206deaab79 100644 --- a/_plugins/translation_status.rb +++ b/_plugins/translation_status.rb @@ -67,7 +67,7 @@ def short_name end def short_name_in_red - %Q{#{short_name}} + %Q(#{short_name}) end def row_data(langs) From cf1308111da83945546084f9d6c4442a2a6ec057 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Tue, 3 Nov 2020 20:46:04 +0100 Subject: [PATCH 0177/1487] Fix code style (use map with symbol as proc) --- _plugins/news.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_plugins/news.rb b/_plugins/news.rb index 863c2150af..7f970d418e 100644 --- a/_plugins/news.rb +++ b/_plugins/news.rb @@ -108,7 +108,7 @@ def initialize(site, base, lang, posts) # hash with url => link_text elements data["years"] = Hash[ - years.map {|year| year.to_s }.zip( + years.map(&:to_s).zip( years.map {|year| insert_date(year_link_text, year) } ) ] From 2a74e91d2f291f7d392747d259074f5a19ebab7d Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Tue, 3 Nov 2020 20:49:16 +0100 Subject: [PATCH 0178/1487] Remove unused code line --- _plugins/news.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/_plugins/news.rb b/_plugins/news.rb index 7f970d418e..dccc85b9f7 100644 --- a/_plugins/news.rb +++ b/_plugins/news.rb @@ -24,8 +24,6 @@ def initialize(site, base, layout, lang, posts) process(@name) read_yaml(File.join(base, "_layouts"), layout) - oldest_post = posts.max_by {|post| post.date } - data["lang"] = @lang data["posts"] = posts.reverse end From c2bee37179d5dede6ac7898842a3e8fb38a739d7 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Tue, 3 Nov 2020 20:54:02 +0100 Subject: [PATCH 0179/1487] Fix deprecated use of ERB.new --- _plugins/translation_status.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_plugins/translation_status.rb b/_plugins/translation_status.rb index 206deaab79..da04f651bd 100644 --- a/_plugins/translation_status.rb +++ b/_plugins/translation_status.rb @@ -126,7 +126,7 @@ def render(context) ignored = ignored_langs.sort.join(", ") posts = @posts.sort.reverse.map {|_name, post| post } - ERB.new(TEMPLATE, nil, "-").result(binding) + ERB.new(TEMPLATE, trim_mode: "-").result(binding) end end end From e967d1cc1767e37713dc1773c3e69e00192a4b36 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Tue, 3 Nov 2020 20:57:18 +0100 Subject: [PATCH 0180/1487] Fix code style (use meaningful heredoc delimiters) --- _plugins/translation_status.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_plugins/translation_status.rb b/_plugins/translation_status.rb index da04f651bd..7583b39d3d 100644 --- a/_plugins/translation_status.rb +++ b/_plugins/translation_status.rb @@ -16,7 +16,7 @@ module TranslationStatus POST_DISPLAY_LENGTH = 50 - TEMPLATE = <<-EOF.gsub(/^ /, "") + TEMPLATE = <<-ERB.gsub(/^ /, "")

Posts with missing translations: <%= posts.size.to_s %>
Start date: <%= START_DATE %>
@@ -39,7 +39,7 @@ module TranslationStatus <% end -%> - EOF + ERB SET_OF_LANGS = Set.new(LANGS) From 5c3094ded67180709b54be74acb9b5885087b9c4 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Tue, 3 Nov 2020 20:59:07 +0100 Subject: [PATCH 0181/1487] Use squiggly heredoc --- _plugins/translation_status.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_plugins/translation_status.rb b/_plugins/translation_status.rb index 7583b39d3d..43842505ce 100644 --- a/_plugins/translation_status.rb +++ b/_plugins/translation_status.rb @@ -16,7 +16,7 @@ module TranslationStatus POST_DISPLAY_LENGTH = 50 - TEMPLATE = <<-ERB.gsub(/^ /, "") + TEMPLATE = <<~ERB

Posts with missing translations: <%= posts.size.to_s %>
Start date: <%= START_DATE %>
From e66c405420cafb9879d3a548145b13648695a31b Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Tue, 3 Nov 2020 21:05:50 +0100 Subject: [PATCH 0182/1487] Clarify posted_by method --- _plugins/posted_by.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/_plugins/posted_by.rb b/_plugins/posted_by.rb index 898e0fbf70..914c9592a6 100644 --- a/_plugins/posted_by.rb +++ b/_plugins/posted_by.rb @@ -18,15 +18,15 @@ module PostedByFilter def posted_by(date, author = nil) date = date.is_a?(String) ? Time.parse(date) : date - lang = @context.environments.first["page"]["lang"] || "en" - posted_by = @context.registers[:site].data["locales"][lang]["posted_by"] || - @context.registers[:site].data["locales"]["en"]["posted_by"] + posted_by = if author.nil? || author.empty? || author == "Unknown Author" + "%Y-%m-%d" + else + lang = @context.environments.first["page"]["lang"] || "en" + format = @context.registers[:site].data["locales"][lang]["posted_by"] || + @context.registers[:site].data["locales"]["en"]["posted_by"] - if author.nil? || author.empty? || author == "Unknown Author" - posted_by = "%Y-%m-%d" - else - posted_by = posted_by.gsub("AUTHOR", author) - end + format.gsub("AUTHOR", author) + end if date.respond_to?(:strftime) date.strftime(posted_by) From 54a407f3efe1e530bdfa43f3b6ce47f7a3f60856 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Sat, 7 Nov 2020 20:38:58 +0100 Subject: [PATCH 0183/1487] Fix code style (use double quotes) --- Gemfile | 22 +++++++++++----------- Rakefile | 24 ++++++++++++------------ config.ru | 10 +++++----- unicorn.rb | 10 +++++----- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/Gemfile b/Gemfile index 9e5a341055..22d0d60f42 100644 --- a/Gemfile +++ b/Gemfile @@ -1,21 +1,21 @@ source "https://rubygems.org" -gem 'rake' -gem 'jekyll', '~> 4.0' -gem 'rouge', '< 3.24.0' +gem "rake" +gem "jekyll", "~> 4.0" +gem "rouge", "< 3.24.0" -gem 'unicorn' -gem 'lanyon' -gem 'rack-rewrite' -gem 'rack-ssl' -gem 'rack-protection' +gem "unicorn" +gem "lanyon" +gem "rack-rewrite" +gem "rack-ssl" +gem "rack-protection" group :production do gem "sqreen" end group :development do - gem 'minitest' - gem 'spidr', '~> 0.6' - gem 'validate-website', '~> 1.6' + gem "minitest" + gem "spidr", "~> 0.6" + gem "validate-website", "~> 1.6" end diff --git a/Rakefile b/Rakefile index 8d8c1e5e9e..5bd55b9624 100644 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1,7 @@ # encoding: utf-8 begin - require 'bundler/setup' + require "bundler/setup" rescue LoadError => e warn e.message warn "Run `gem install bundler` to install Bundler" @@ -39,8 +39,8 @@ namespace :build do desc "Build the Jekyll site (`lang' language part only)" task :lang do - puts 'Please specify one of the valid language codes:' - puts LANGUAGES.join(', ') << '.' + puts "Please specify one of the valid language codes:" + puts LANGUAGES.join(", ") << "." end LANGUAGES.each do |lang| @@ -58,16 +58,16 @@ end namespace :new_post do def create_template(lang) - url_title = 'short-title' - title = 'Post Title' + url_title = "short-title" + title = "Post Title" now = Time.now.utc datetime = now.strftime("%Y-%m-%d %H:%M:%S %z") date = now.strftime("%Y-%m-%d") filename = "#{date}-#{url_title}.md" - path = File.join(lang, 'news', '_posts', filename) + path = File.join(lang, "news", "_posts", filename) - content = <<-TEMPLATE.gsub(/^ */, '') + content = <<-TEMPLATE.gsub(/^ */, "") --- layout: news_post title: "#{title}" @@ -85,8 +85,8 @@ namespace :new_post do if File.exist?(path) warn "Could not create template, `#{path}' already exists." else - File.open(path, 'w') {|f| f.write content } - warn 'done.' + File.open(path, "w") {|f| f.write content } + warn "done." end rescue => e warn e.message @@ -95,8 +95,8 @@ namespace :new_post do desc "Create a news post template for language `lang'" task :lang do - puts 'Please specify one of the valid language codes:' - puts LANGUAGES.join(', ') << '.' + puts "Please specify one of the valid language codes:" + puts LANGUAGES.join(", ") << "." end LANGUAGES.each do |lang| @@ -122,7 +122,7 @@ namespace :check do LinkChecker.new.check(localport: localport, languages: LANGUAGES) end - desc 'Validate _site markup with validate-website' + desc "Validate _site markup with validate-website" task :markup do require_relative "lib/markup_checker" MarkupChecker.new.check diff --git a/config.ru b/config.ru index 2139b88d9b..b590e6fa55 100644 --- a/config.ru +++ b/config.ru @@ -1,8 +1,8 @@ -require 'lanyon' -require 'rack/rewrite' -require 'rack/ssl' -require 'rack/protection' -require 'yaml' +require "lanyon" +require "rack/rewrite" +require "rack/ssl" +require "rack/protection" +require "yaml" use Rack::CommonLogger diff --git a/unicorn.rb b/unicorn.rb index 670f0ef7e4..9c5bb77c13 100644 --- a/unicorn.rb +++ b/unicorn.rb @@ -5,14 +5,14 @@ preload_app true before_fork do |server, worker| - Signal.trap 'TERM' do - puts 'Unicorn master intercepting TERM and sending myself QUIT instead' - Process.kill 'QUIT', Process.pid + Signal.trap "TERM" do + puts "Unicorn master intercepting TERM and sending myself QUIT instead" + Process.kill "QUIT", Process.pid end end after_fork do |server, worker| - Signal.trap 'TERM' do - puts 'Unicorn worker intercepting TERM and doing nothing. Wait for master to send QUIT' + Signal.trap "TERM" do + puts "Unicorn worker intercepting TERM and doing nothing. Wait for master to send QUIT" end end From aafdce5e590f4fdbb171e8bc04c9ed5968015efa Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Sat, 7 Nov 2020 20:41:04 +0100 Subject: [PATCH 0184/1487] Fix code style (hash syntax) --- Rakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 5bd55b9624..0c956fc625 100644 --- a/Rakefile +++ b/Rakefile @@ -11,10 +11,10 @@ end LANGUAGES = %w[bg de en es fr id it ja ko pl pt ru tr vi zh_cn zh_tw] CONFIG = "_config.yml" -task :default => [:build] +task default: [:build] desc "Run tests (lint, build)" -task :test => [:lint, :build] +task test: [:lint, :build] desc "Build the Jekyll site" task :build do From 718d7054bada7f17c845d346aaf24cac9211d355 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Sat, 7 Nov 2020 20:47:43 +0100 Subject: [PATCH 0185/1487] Remove unnecessary utf-8 encoding comment --- Rakefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Rakefile b/Rakefile index 0c956fc625..a8cfd57a92 100644 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,3 @@ -# encoding: utf-8 - begin require "bundler/setup" rescue LoadError => e From fb530070f628dad6f86260a87aca951a30b658a4 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Sat, 7 Nov 2020 20:50:53 +0100 Subject: [PATCH 0186/1487] Freeze mutable objects assigned to constants Also add frozen_string_literal: true magic comment. --- Rakefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index a8cfd57a92..3aeda808ae 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + begin require "bundler/setup" rescue LoadError => e @@ -6,7 +8,7 @@ rescue LoadError => e exit -1 end -LANGUAGES = %w[bg de en es fr id it ja ko pl pt ru tr vi zh_cn zh_tw] +LANGUAGES = %w[bg de en es fr id it ja ko pl pt ru tr vi zh_cn zh_tw].freeze CONFIG = "_config.yml" task default: [:build] From 02510467b6d605f12bea2b8dcd9502d01b374e01 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Sat, 7 Nov 2020 20:52:19 +0100 Subject: [PATCH 0187/1487] Avoid ambiguous negative number operator --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 3aeda808ae..4ae28257b7 100644 --- a/Rakefile +++ b/Rakefile @@ -5,7 +5,7 @@ begin rescue LoadError => e warn e.message warn "Run `gem install bundler` to install Bundler" - exit -1 + exit(-1) end LANGUAGES = %w[bg de en es fr id it ja ko pl pt ru tr vi zh_cn zh_tw].freeze From d9dd9b51282145e5b6510e3daa66ef4f614d390d Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 9 Nov 2020 10:20:56 +0900 Subject: [PATCH 0188/1487] Removed sqreen gem --- Gemfile | 4 ---- Gemfile.lock | 11 ----------- 2 files changed, 15 deletions(-) diff --git a/Gemfile b/Gemfile index 22d0d60f42..6f098784b6 100644 --- a/Gemfile +++ b/Gemfile @@ -10,10 +10,6 @@ gem "rack-rewrite" gem "rack-ssl" gem "rack-protection" -group :production do - gem "sqreen" -end - group :development do gem "minitest" gem "spidr", "~> 0.6" diff --git a/Gemfile.lock b/Gemfile.lock index 15fe35c6a2..d35fee5a86 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -43,7 +43,6 @@ GEM lanyon (0.4.2) jekyll (>= 2.0) rack (>= 1.6, < 3.0) - libsqreen (0.6.1.0.1) liquid (4.0.3) listen (3.2.1) rb-fsevent (~> 0.10, >= 0.10.3) @@ -76,15 +75,6 @@ GEM slop (4.8.2) spidr (0.6.1) nokogiri (~> 1.3) - sq_mini_racer (0.2.5.0.1.beta3) - sqreen (1.21.1) - libsqreen (~> 0.6.1.0.0) - sq_mini_racer (~> 0.2.4.sqreen2) - sqreen-backport (~> 0.1.0) - sqreen-kit (~> 0.2.2) - sqreen-backport (0.1.0) - sqreen-kit (0.2.2) - sqreen-backport (~> 0.1.0) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) tidy_ffi (1.0.1) @@ -118,7 +108,6 @@ DEPENDENCIES rake rouge (< 3.24.0) spidr (~> 0.6) - sqreen unicorn validate-website (~> 1.6) From 58fa6ebf20bd120609985ad55c0077578047cd1d Mon Sep 17 00:00:00 2001 From: Cristiano Animosi Date: Sat, 14 Nov 2020 17:03:38 +0100 Subject: [PATCH 0189/1487] Fix typo --- it/documentation/quickstart/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/it/documentation/quickstart/index.md b/it/documentation/quickstart/index.md index e8329161b2..7b9bd3aab8 100644 --- a/it/documentation/quickstart/index.md +++ b/it/documentation/quickstart/index.md @@ -106,7 +106,7 @@ Già, funziona, ma che cosa è successo? E in particolare che cos’è ## Moduli – ovvero come raggruppare del codice per argomento `Math` è un modulo predefinito per i calcoli matematici. I moduli hanno -un dupice scopo in Ruby, e uno di questi è raggruppare metodi simili +un duplice scopo in Ruby, e uno di questi è raggruppare metodi simili insieme utilizzando un particolare nome adatto allo scopo. `Math` contiene molti altri metodi come per esempio `sin()` e `tan()`. From 58db0375aef375d8a929d00b5f4d58372b7821a7 Mon Sep 17 00:00:00 2001 From: twlixin Date: Mon, 16 Nov 2020 01:18:45 +0900 Subject: [PATCH 0190/1487] Create 2020-04-05-support-of-ruby-2-4-has-ended.md --- ...020-04-05-support-of-ruby-2-4-has-ended.md | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 zh_tw/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md diff --git a/zh_tw/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md b/zh_tw/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md new file mode 100644 index 0000000000..0dfe1bbb6b --- /dev/null +++ b/zh_tw/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md @@ -0,0 +1,37 @@ +--- +layout: news_post +title: "Ruby 2.4 官方支持終了" +author: "usa" +translator: "twlixin" +date: 2020-04-05 12:00:00 +0000 +lang: zh_tw +--- + +Ruby 2.4 系列的官方支持終了期間之宣布。 + +昨年 4 月以來的 1 年間、Ruby 2.4系列處於安全維護期。正如先前所宣布的,官方支持將於2020年3月31日結束。 +之後,有簡單的錯誤修復或者即使發現安全問題,也不會針對Ruby 2.4系列發布新版本。 + +2020年3月31日,Ruby 2.4系列的最終版本2.4.10發布,這只是為了讓使用者更有時間轉移到較新的版本系列。 +如果您當前正在使用Ruby 2.4系列,請盡快轉換到較新的版本系列。 + +##關於當前支持的版本系列 + +### Ruby 2.7系列 + +目前處於正常維護階段。 +随時會更新版本,包括發現到的錯誤之修復。 +此外,如果發現嚴重的安全問題,將進行相對應的緊急版本更新。 + +### Ruby 2.6 系列 + +目前處於正常維護階段。 +随時會更新版本,包括發現到的錯誤之修復。 +此外,如果發現嚴重的安全問題,將進行相對應的緊急版本更新。 + +### Ruby 2.5 系列 + +目前處於安全維護期。 +不會針對一般的錯誤作修復。 +如果發現嚴重的安全問題,將進行相應的緊急版本更新。 +預定將於2021年3月結束官方的支持。 From 42326d466f16419844912e1464671a6386d4be98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20Ar=C4=B1l=C4=B1k?= Date: Tue, 17 Nov 2020 18:57:40 +0300 Subject: [PATCH 0191/1487] Translate OpenBSD installation doc (tr) (#2533) * Translate OpenBSD installation doc (tr) * Add missing newline --- tr/documentation/installation/index.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tr/documentation/installation/index.md b/tr/documentation/installation/index.md index 54700f2195..1d137ca41c 100644 --- a/tr/documentation/installation/index.md +++ b/tr/documentation/installation/index.md @@ -44,6 +44,7 @@ sistemde var olan kurulum yöntemlerinden herhangi birini kullanmak için * [Arch Linux](#pacman) * [macOS](#homebrew) * [FreeBSD](#freebsd) + * [OpenBSD](#openbsd) * [OpenIndiana](#openindiana) * [Diğer Dağıtımlar](#other-systems) * [Kurucular](#installers) @@ -180,6 +181,20 @@ seçeneklerini özelleştirmek istiyorsanız, bu, kullanışlıdır. FreeBSD'de Ruby ve onun çevreleyen ekosistemi hakkında daha fazla bilgi [FreeBSD Ruby Projesi websitesi][freebsd-ruby]nde bulunabilir. +### OpenBSD +{: #openbsd} + +OpenBSD ve OpenBSD'nin dağıtımı olan adJ, Ruby'nin üç ana sürümü için paketlere sahiptir. +Aşağıdaki komut mevcut sürümleri görmenizi ve bunlardan birini kurmanızı sağlar: + +{% highlight sh %} +$ doas pkg_add ruby +{% endhighlight %} + +Aynı anda birden fazla ana sürüm kurabilirsiniz, çünkü bu sürümlerin ikilileri farklı isimlere sahiptir (ruby27, ruby26, vb. gibi). + +OpenBSD'nin ports koleksiyonunun `HEAD` dalı, Ruby'nin en son sürümüne, sürüm yayınlandıktan birkaç gün sonra sahip olacaktır. +[En son ports koleksiyonundaki lang/ruby dizinine][openbsd-current-ruby-ports] bakın. ### OpenIndiana üzerinde Ruby {: #openindiana} @@ -346,3 +361,4 @@ olabilir, çünkü kurulan Ruby herhangi bir araç tarafından yönetilmeyecekti [wsl]: https://docs.microsoft.com/en-us/windows/wsl/about [asdf-vm]: https://asdf-vm.com/ [asdf-ruby]: https://github.com/asdf-vm/asdf-ruby +[openbsd-current-ruby-ports]: https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/lang/ruby/?only_with_tag=HEAD From 49f0a1e3f8b50b63a39cf53b06a2ab3cd47e18e1 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Fri, 20 Nov 2020 13:01:42 +0900 Subject: [PATCH 0192/1487] update bundles --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index d35fee5a86..4c0e36aadb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -44,7 +44,7 @@ GEM jekyll (>= 2.0) rack (>= 1.6, < 3.0) liquid (4.0.3) - listen (3.2.1) + listen (3.3.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.4.0) From 5a3ffc8edac2329d03ce70d1604d2f7ea9c1dcf5 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Fri, 20 Nov 2020 13:25:43 +0900 Subject: [PATCH 0193/1487] deploy From a96ca92fcb622f450dda1c385a5f01aa86ee35d4 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Fri, 20 Nov 2020 16:15:29 +0900 Subject: [PATCH 0194/1487] lock Ruby 2.7.2 for heroku --- Gemfile | 2 ++ Gemfile.lock | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Gemfile b/Gemfile index 6f098784b6..74210a8c15 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,7 @@ source "https://rubygems.org" +ruby '~> 2.7.2' + gem "rake" gem "jekyll", "~> 4.0" gem "rouge", "< 3.24.0" diff --git a/Gemfile.lock b/Gemfile.lock index 4c0e36aadb..8e9a4b977c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -111,5 +111,8 @@ DEPENDENCIES unicorn validate-website (~> 1.6) +RUBY VERSION + ruby 2.7.2p137 + BUNDLED WITH 2.1.2 From 1e57eafedee8e277a29830514170b409cd964859 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Fri, 20 Nov 2020 15:49:39 +0100 Subject: [PATCH 0195/1487] Remove CI tests for Ruby 2.6 Tests for 2.6 fail since the Ruby version was locked to 2.7.2 in the Gemfile, see a96ca92fcb622f450dda1c385a5f01aa86ee35d4. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ede80db16..fb64d55492 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - ruby: [2.6, 2.7] + ruby: [2.7] os: [ubuntu-latest, macos-latest] fail-fast: false From 37b93c50cb45a43e046df58908eecc5f75c67a11 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Wed, 25 Nov 2020 20:58:21 +0100 Subject: [PATCH 0196/1487] Fix style --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 74210a8c15..86d3d10afa 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source "https://rubygems.org" -ruby '~> 2.7.2' +ruby "~> 2.7.2" gem "rake" gem "jekyll", "~> 4.0" From 5a83c3c9fadfa1c9bd053c33408e242ecd219447 Mon Sep 17 00:00:00 2001 From: Beyar Date: Sun, 29 Nov 2020 16:03:52 +0100 Subject: [PATCH 0197/1487] Update 2020-09-25-ruby-3-0-0-preview1-released.md Spelling --- en/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md b/en/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md index 29b7da4754..cdd2ce4425 100644 --- a/en/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md +++ b/en/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md @@ -50,7 +50,7 @@ You can make multiple ractors and you can run them in parallel. Ractor enables t To limit sharing objects, Ractor introduces several restrictions to the Ruby's syntax (without multiple Ractors, there is no changes). -The specification and implmentation are not matured and changed in future, so this feature is marked as experimental and show the experimental feature warning if Ractor is created. +The specification and implementation are not matured and changed in future, so this feature is marked as experimental and show the experimental feature warning if Ractor is created. The following small program calculates `prime?` in parallel with two ractors and about x2 times faster with two or more cores than sequential program. From dc4b87241f5e335f39ecfa38d7b20714fd4affcb Mon Sep 17 00:00:00 2001 From: "NARUSE, Yui" Date: Tue, 8 Dec 2020 18:30:18 +0900 Subject: [PATCH 0198/1487] Ruby 3.0.0 Preview 2 Released --- ...2020-12-08-ruby-3-0-0-preview2-released.md | 232 ++++++++++++++++++ ...2020-12-08-ruby-3-0-0-preview2-released.md | 201 +++++++++++++++ 2 files changed, 433 insertions(+) create mode 100644 en/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md create mode 100644 ja/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md diff --git a/en/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md b/en/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md new file mode 100644 index 0000000000..60161fcfb7 --- /dev/null +++ b/en/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md @@ -0,0 +1,232 @@ +--- +layout: news_post +title: "Ruby 3.0.0 Preview 2 Released" +author: "naruse" +translator: +date: 2020-12-08 00:00:00 +0000 +lang: en +--- +We are pleased to announce the release of Ruby 3.0.0-preview2. +It introduces a number of new features and performance improvements. +## Static Analysis +### RBS +RBS is a language to describe the types of Ruby programs. +Type checkers including TypeProf and other tools supporting RBS will understand Ruby programs much better with RBS definitions. +You can write down the definition of classes and modules: methods defined in the class, instance variables and their types, and inheritance/mix-in relations. +The goal of RBS is to support commonly seen patterns in Ruby programs and it allows writing advanced types including union types, method overloading, and generics. It also supports duck typing with _interface types_. +Ruby 3.0 ships with `rbs` gem, which allows parsing and processing type definitions written in RBS. +The following is a small example of RBS with class, module, and constant definitions. +``` rbs +module ChatApp + VERSION: String + class Channel + attr_reader name: String + attr_reader messages: Array[Message] + attr_reader users: Array[User | Bot] # `|` means union types, `User` or `Bot`. + def initialize: (String) -> void + def post: (String, from: User | Bot) -> Message # Method overloading is supported. + | (File, from: User | Bot) -> Message + end +end +``` +See [README of rbs gem](https://github.com/ruby/rbs) for more detail. +### TypeProf +TypeProf is a type analysis tool bundled in the Ruby package. +Currently, TypeProf serves as a kind of type inference. +It reads plain (non-type-annotated) Ruby code, analyzes what methods are defined and how they are used, and generates a prototype of type signature in RBS format. +Here is a simple demo of TypeProf. +An example input: +``` ruby +# test.rb +class User + def initialize(name:, age:) + @name, @age = name, age + end + attr_reader :name, :age +end +User.new(name: "John", age: 20) +``` +An example output: +``` +$ typeprof test.rb +# Classes +class User + attr_reader name : String + attr_reader age : Integer + def initialize : (name: String, age: Integer) -> [String, Integer] +end +``` +You can run TypeProf by saving the input as "test.rb" and invoke a command called "typeprof test.rb". +You can also [try TypeProf online](https://mame.github.io/typeprof-playground/#rb=%23+test.rb%0Aclass+User%0A++def+initialize%28name%3A%2C+age%3A%29%0A++++%40name%2C+%40age+%3D+name%2C+age%0A++end%0A++%0A++attr_reader+%3Aname%2C+%3Aage%0Aend%0A%0AUser.new%28name%3A+%22John%22%2C+age%3A+20%29&rbs=). (It runs TypeProf on the server side, so sorry if it is out!) +See [the documentation](https://github.com/ruby/typeprof/blob/master/doc/doc.md) and [demos](https://github.com/ruby/typeprof/blob/master/doc/demo.md) for details. +TypeProf is experimental and not so mature yet; only a subset of the Ruby language is supported, and the detection of type errors is limited. But it is still growing rapidly to improve the coverage of language features, the analysis performance, and usability. Any feedback is very welcome. +## Ractor (experimental) +Ractor is an Actor-model like concurrent abstraction designed to provide a parallel execution feature without thread-safety concerns. +You can make multiple ractors and you can run them in parallel. Ractor enables you to make thread-safe parallel programs because ractors can not share normal objects. Communication between ractors are supported by message passing. +To limit sharing of objects, Ractor introduces several restrictions to the Ruby's syntax (without multiple Ractors, there is no restriction). +The specification and implmentation are not matured and may be changed in the future, so this feature is marked as experimental and show the "experimental feature" warning when the first `Ractor.new`. +The following small program calculates `n.prime?` (`n` is relatively a big integer) in parallel with two ractors. You will confirm that the program execution is about x2 times faster ompare with the sequential program on the parallel computer. +``` ruby +require 'prime' +# n.prime? with sent integers in r1, r2 run in parallel +r1, r2 = *(1..2).map do + Ractor.new do + n = Ractor.recv + n.prime? + end +end +# send parameters +r1.send 2**61 - 1 +r2.send 2**61 + 15 +# wait for the results of expr1, expr2 +p r1.take #=> true +p r2.take #=> true +``` +See [doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md) for more details. +## Fiber Scheduler +`Fiber#scheduler` is introduced for intercepting blocking operations. This allows for light-weight concurrency without changing existing code. Watch ["Don't Wait For Me, Scalable Concurrency for Ruby 3"](https://www.youtube.com/watch?v=Y29SSOS4UOc) for an overview of how it works. +Currently supported classes/methods: +- `Mutex#lock`, `Mutex#unlock`, `Mutex#sleep` +- `ConditionVariable#wait` +- `Queue#pop`, `SizedQueue#push` +- `Thread#join` +- `Kernel#sleep` +- `Process.wait` +- `IO#wait`, `IO#read`, `IO#write` and related methods (e.g. `#wait_readable`, `#gets`, `#puts` and so on). +- `IO#select` is *not supported*. +(Explain Async gem with links). This example program will perform several HTTP requests concurrently: +(Explain this:) +1. async is outer gem +2. async uses this new feature +``` ruby +require 'async' +require 'net/http' +require 'uri' +Async do + ["ruby", "python", "c"].each do |topic| + Async do + Net::HTTP.get(URI "https://www.google.com/search?q=#{topic}") + end + end +end +``` +## Other Notable New Features +* One-line pattern matching now uses `=>` instead of `in`. + ``` ruby + # version 3.0 + {a: 0, b: 1} => {a:} + p a # => 0 + # version 2.7 + {a: 0, b: 1} in {a:} + p a # => 0 + ``` +* Find pattern is added. + ``` ruby + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + ``` +* Endless method definition is added. + ``` ruby + def square(x) = x * x + ``` +* Find pattern is added. + ``` ruby + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + ``` +* `Hash#except` is now built-in. + ``` ruby + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + ``` +* Memory view is added as an experimental feature + * This is a new C-API set to exchange a raw memory area, such as a numeric array and a bitmap image, between extension libraries. The extension libraries can share also the metadata of the memory area that consists of the shape, the element format, and so on. Using these kinds of metadata, the extension libraries can share even a multidimensional array appropriately. This feature is designed by referring to Python's buffer protocol. +## Performance improvements +* Many improvements were implemented in MJIT. See NEWS in detail. +* Pasting long code to IRB is 53 times faster than bundled with Ruby 2.7.0. For example, the time required to paste [this sample code](https://gist.github.com/aycabta/30ab96334275bced5796f118c9220b0b) goes from 11.7 seconds to 0.22 seconds. +## Other notable changes since 2.7 +* Keyword arguments are separated from other arguments. + * In principle, code that prints a warning on Ruby 2.7 won't work. See the [document](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/) in detail. + * By the way, arguments forwarding now supports leading arguments. + ``` ruby + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end + ``` +* The `$SAFE` feature was completely removed; now it is a normal global variable. +* The order of backtrace had been reversed at Ruby 2.5, and is reverted. Now it behaves like Ruby 2.4; an error message and the line number where the exception occurs are printed first, and its callers are printed later. +* Some standard libraries are updated. + * RubyGems 3.2.0.rc.1 + * Bundler 2.2.0.rc.1 + * IRB 1.2.6 + * Reline 0.1.5 +* The following libraries are no longer bundled gems. + Install the corresponding gems to use these features. + * net-telnet + * xmlrpc +* The following default gems are now bundled gems. + * rexml + * rss +* The following stdlib files are now default gems and are published on rubygems.org. + * abbrev + * base64 + * English + * erb + * find + * io-nonblock + * io-wait + * net-ftp + * net-http + * net-imap + * net-protocol + * nkf + * open-uri + * optparse + * resolv + * resolv-replace + * rinda + * securerandom + * set + * shellwords + * tempfile + * time + * tmpdir + * tsort + * weakref +See [NEWS](https://github.com/ruby/ruby/blob/v3_0_0_preview2/NEWS.md) +or [commit logs](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_preview2) +for more details. +{% assign release = site.data.releases | where: "version", "3.0.0-preview2" | first %} +With those changes, [{{ release.stats.files_changed }} files changed, {{ release.stats.insertions }} insertions(+), {{ release.stats.deletions }} deletions(-)](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0) +since Ruby 2.7.0! +Please try Ruby 3.0.0-preview2, and give us any feedback! +## Download +* <{{ release.url.gz }}> + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} +* <{{ release.url.xz }}> + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} +* <{{ release.url.zip }}> + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} +## What is Ruby +Ruby was first developed by Matz (Yukihiro Matsumoto) in 1993, +and is now developed as Open Source. It runs on multiple platforms +and is used all over the world especially for web development. diff --git a/ja/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md b/ja/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md new file mode 100644 index 0000000000..c6b2107c19 --- /dev/null +++ b/ja/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md @@ -0,0 +1,201 @@ +--- +layout: news_post +title: "Ruby 3.0.0-preview2 リリース" +author: "naruse" +translator: +date: 2020-12-08 00:00:00 +0000 +lang: ja +--- +Ruby 3.0に向けてフィードバックを得るためのリリースである、Ruby 3.0.0-preview2が公開されました。 +Ruby 3.0には、多くの新しい機能やパフォーマンスの改善が含まれます。 その一部を以下に紹介します。 +## 静的解析 +### RBS +RBSはRubyプログラムの型を記述するための言語です。 +TypeProfなどの型検査ツールを初めとする静的解析を行うツールは、RBSを利用することでRubyプログラムをより精度良く解析することができます。 +RBSでは、Rubyプログラムのクラスやモジュールの型を定義します。メソッドやインスタンス変数、定数とその型、継承やmixinなどの関係などが記述できます。 +RBSはRubyプログラムに頻出するパターンをサポートするように設計されており、ユニオン型、メソッドオーバーロード、ジェネリクスなどの機能を提供します。さらに「インタフェース型」によってダックタイピングをサポートします。 +Ruby 3.0には、このRBS言語で書かれた型定義を処理するためのライブラリである `rbs` gemが同梱されています。 +クラスやモジュール、定数を定義する、簡単なRBSの例を示します。 +``` rbs +module ChatApp + VERSION: String + class Channel + attr_reader name: String + attr_reader messages: Array[Message] + attr_reader users: Array[User | Bot] # `|` は `User` か `Bot` のインスタンスを表現する「ユニオン型」です + def initialize: (String) -> void + def post: (String, from: User | Bot) -> Message # メソッドオーバーロードを記述することもできます + | (File, from: User | Bot) -> Message + end +end +``` +詳細については、[rbs gemのREADME](https://github.com/ruby/rbs)を参照してください。 +### TypeProf +TypeProf は Ruby パッケージに同梱された型解析ツールです。 +TypeProf の現在の主な用途は一種の型推論です。 +型注釈の無い普通の Ruby コードを入力し、どんなメソッドが定義されどのように使われているかを解析し、型シグネチャのプロトタイプを RBS フォーマットで生成します。 +次は TypeProf の簡単なデモです。 +サンプル入力 +``` ruby +# test.rb +class User + def initialize(name:, age:) + @name, @age = name, age + end + attr_reader :name, :age +end +User.new(name: "John", age: 20) +``` +サンプル出力 +``` +$ typeprof test.rb +# Classes +class User + attr_reader name : String + attr_reader age : Integer + def initialize : (name: String, age: Integer) -> [String, Integer] +end +``` +サンプル入力を"test.rb"という名前で保存し、`typeprof test.rb`というコマンドで TypeProf の解析ができます。 +[TypeProf をオンラインで試す](https://mame.github.io/typeprof-playground/#rb=%23+test.rb%0Aclass+User%0A++def+initialize%28name%3A%2C+age%3A%29%0A++++%40name%2C+%40age+%3D+name%2C+age%0A++end%0A++%0A++attr_reader+%3Aname%2C+%3Aage%0Aend%0A%0AUser.new%28name%3A+%22John%22%2C+age%3A+20%29&rbs=)こともできます(サーバサイドで TypeProf を動かしているので、サーバが落ちたらごめんなさい)。 +詳しくは[ドキュメント](https://github.com/ruby/typeprof/blob/master/doc/doc.md)や[デモ](https://github.com/ruby/typeprof/blob/master/doc/demo.md)を見てください。 +残念ながら TypeProf はまだ実験的で、あまり完成度は高くありません。Ruby 言語のサブセットだけがサポートされていて、型エラー検出の機能は限定的です。ですがいま急速に改良中であり、言語機能のカバレッジ増強、解析効率の向上、利便性の向上などを行っています。フィードバックを歓迎します。 +## Ractor (experimental) +Ractor はアクターモデル風の並行・並列制御機構であり、スレッド安全に関する懸念をなく、Rubyで並列処理を行うための機能として設計されています。 +複数のRactorを作成すると、それらは並列計算機上で並列に実行されます。Ractor間では、ほとんどのオブジェクトが共有できないように設計されているため、スレッド安全なプログラムにすることができます。メッセージの送受信により、Ractor間のコミュニケーションを行うことが可能です。 +Ractor間でのオブジェクトの共有を制限するために、複数Ractorでの実行時には、いくつかのRubyの機能に制限が入ります(ただし、複数のRactorを用いない場合には、これまでのRubyと何も変わりません)。 +Ractorの仕様と実装は、まだ発展途上であるため、実験的機能として提供されます。初回のRactorの生成時には実験的機能であることが警告で表示されます。 +次の小さなプログラムでは、二つのRactorを用いて`n.prime?`(`n`は比較的大きな値)の計算を並列に実行します。動かしてみると、逐次実行にくらべて、2コア以上の計算機で計算時間が半分程度になることが確認できます。 +``` ruby +require 'prime' +# n.prime? with sent integers in r1, r2 run in parallel +r1, r2 = *(1..2).map do + Ractor.new do + n = Ractor.receive + n.prime? + end +end +# send parameters +r1.send 2**61 - 1 +r2.send 2**61 + 15 +# wait for the results of expr1, expr2 +p r1.take #=> true +p r2.take #=> true +``` +より詳細は、[doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md) をご覧ください。 +## Scheduler (experimental) +`Thread#scheduler` is introduced for intercepting blocking operations. This allows for light-weight concurrency without changing existing code. Watch ["Don't Wait For Me, Scalable Concurrency for Ruby 3"](https://www.youtube.com/watch?v=Y29SSOS4UOc) for an overview of how it works. +Currently supported classes/methods: +- `Mutex#lock`, `Mutex#unlock`, `Mutex#sleep` +- `ConditionVariable#wait` +- `Queue#pop`, `SizedQueue#push` +- `Thread#join` +- `Kernel#sleep` +- `IO#wait`, `IO#read`, `IO#write` and related methods (e.g. `#wait_readable`, `#gets`, `#puts` and so on). +- `IO#select` is *not supported*. +The current entry point for concurrency is `Fiber.schedule{...}` however this is subject to change by the time Ruby 3 is released. +Currently, there is a test scheduler available in [`Async::Scheduler`](https://github.com/socketry/async/pull/56). See [`doc/scheduler.md`](https://github.com/ruby/ruby/blob/master/doc/scheduler.md) for more details. +## その他の主要な新機能 +* 1行パターンマッチが `in` の代わりに `=>` を使うようになりました。 +``` ruby + # version 3.0 + {a: 0, b: 1} => {a:} + p a # => 0 + # version 2.7 + {a: 0, b: 1} in {a:} + p a # => 0 +``` +* 一行メソッド定義が書けるようになりました。 +``` ruby + def square(x) = x * x +``` +* findパターンが書けるようになりました。 +``` ruby + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end +``` +* `Hash#except` が組み込みになりました。 +``` ruby + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} +``` +## パフォーマンスの改善 +* MJITに多数の改善が行われています。詳細はNEWSを参照してください。 +* IRB への長いコードの貼り付けは、Ruby 2.7.0 にバンドルされているものと比較して 53 倍の速さになります。例えば、[このサンプルコード](https://gist.github.com/aycabta/30ab96334275bced5796f118c9220b0b)の貼り付けに要する時間は、11.7 秒から 0.22 秒になります。 +## その他の注目すべき 2.7 からの変更点 +* キーワード引数が通常の引数から分離されました。 + * 原則として、2.7 で警告の出ていたコードは動かなくなります。詳細は[別ドキュメント](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/)を参照してください。 + * 関連して、引数のフォワーディングの記法で先頭に引数を書けるようになりました。 +``` ruby + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end +``` +* `$SAFE` の機能が完全に削除され、ただのグローバル変数となりました。 +* バックトレースの順序は2.5で逆転しましたが、3.0ではこれを取りやめることになりました。例外が起きた行が先に表示され、呼び出し元が後に表示されるように戻ります。 +* いくつかの標準ライブラリがアップデートされました。 + * RubyGems 3.2.0.rc.1 + * Bundler 2.2.0.rc.1 + * IRB 1.2.6 + * Reline 0.1.5 +* 以下のライブラリは標準添付ライブラリから削除されました。3.0 以降で使いたい場合は rubygems から利用してください。 + * net-telnet + * xmlrpc +* 以下のライブラリが新たに bundled gems になりました。Bundler から利用する場合は Gemfile に明示的に指定してください。 + * rexml + * rss +* 以下のライブラリが新たに default gems になりました。rubygems.org からアップデート可能です。 + * abbrev + * base64 + * English + * erb + * find + * io-nonblock + * io-wait + * net-ftp + * net-http + * net-imap + * net-protocol + * nkf + * open-uri + * optparse + * resolv + * resolv-replace + * rinda + * securerandom + * set + * shellwords + * tempfile + * time + * tmpdir + * tsort + * weakref +その他詳細については、[NEWS](https://github.com/ruby/ruby/blob/v3_0_0_preview2/NEWS) ファイルまたは[コミットログ](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_preview2)を参照してください。 +{% assign release = site.data.releases | where: "version", "3.0.0-preview2" | first %} +なお、こうした変更により、Ruby 2.7.0 以降では [{{ release.stats.files_changed }} 個のファイルに変更が加えられ、{{ release.stats.insertions }} 行の追加と {{ release.stats.deletions }} 行の削除が行われました](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0) ! +ぜひ Ruby 3.0.0-preview2 を試して、フィードバックをお願いします! +## ダウンロード +* <{{ release.url.gz }}> + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} +* <{{ release.url.xz }}> + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} +* <{{ release.url.zip }}> + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} +## 3.0.0-preview2 予告 +静的型解析である["type-profiler"](https://github.com/mame/ruby-type-profiler)が入る予定です。お楽しみに。 +## Ruby とは +Rubyはまつもとゆきひろ (Matz) によって1993年に開発が始められ、今もオープンソースソフトウェアとして開発が続けられています。Rubyは様々なプラットフォームで動き、世界中で、特にWebアプリケーション開発のために使われています。 From 082a372e9c4b6a700f62ae8c66a51b24cbbc1878 Mon Sep 17 00:00:00 2001 From: "NARUSE, Yui" Date: Tue, 8 Dec 2020 19:47:45 +0900 Subject: [PATCH 0199/1487] add data for ruby 3.0.0 --- _data/downloads.yml | 2 +- _data/releases.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/_data/downloads.yml b/_data/downloads.yml index 1e3198d52f..6f321476f9 100644 --- a/_data/downloads.yml +++ b/_data/downloads.yml @@ -4,7 +4,7 @@ # optional preview: - - 3.0.0-preview1 + - 3.0.0-preview2 stable: diff --git a/_data/releases.yml b/_data/releases.yml index 39f327ba6d..3f2710052a 100644 --- a/_data/releases.yml +++ b/_data/releases.yml @@ -21,6 +21,34 @@ # 3.0 series +- version: 3.0.0-preview2 + date: 2020-12-08 + post: /en/news/2020/12/08/ruby-3-0-0-preview2-released/ + stats: + files_changed: 3776 + insertions: 181573 + deletions: 145096 + url: + gz: https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.0-preview2.tar.gz + zip: https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.0-preview2.zip + xz: https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.0-preview2.tar.xz + size: + gz: 19378626 + zip: 23907144 + xz: 14244252 + sha1: + gz: 25363b20225850224e7835e99906c52f2ff57792 + zip: 064ee265c94b3df87e737622ba84437ea0d6aeaf + xz: 54e4d3892ce480106382bd2d36dd7395e01b0f2a + sha256: + gz: 9de8661565c2b1007d91a580e9a7e02d23f1e8fc8df371feb15a2727aa05fd9a + zip: 19e295ae50934ddac2b366f0c7c8de9bd710d596b76eba02152f3641e5ce2b23 + xz: 03078e82d4fb55c13837c69e56565fc49c451d11b1ca5e1b075d990d0957f181 + sha512: + gz: 6fa4191425ae71e41894b60bd9c31d483a562ee8216886360ce18238ab48115b95be0367708612c45f634e7584fba8940a524ba0113ce0f36ce4df78a112d0b7 + zip: 598def50ef9e8ae1f44e05ff2c4e35acf252437286f08644ba5e301ebff2db399140bafa72868877100d6ffa736a4474cb7b99ecea8bdf835ed113ab250bb3d9 + xz: 8b0e6e3ba7e5f95586b4438d965e7b09187ad599f4ac22dec3db7b176358514fe0c0890dde8912fef1ef92ffcde3f6f1228178eabadcf3a05601e5b6f05881ae + - version: 3.0.0-preview1 date: 2020-09-25 post: /en/news/2020/09/25/ruby-3-0-0-preview1-released/ From e6f483203e0aea5280d62f7c4d372394dccf70dd Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 8 Dec 2020 20:00:54 +0900 Subject: [PATCH 0200/1487] adjust markdown format for jekyll --- ...2020-12-08-ruby-3-0-0-preview2-released.md | 87 +++++++++++--- ...2020-12-08-ruby-3-0-0-preview2-released.md | 112 +++++++++++++----- 2 files changed, 152 insertions(+), 47 deletions(-) diff --git a/en/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md b/en/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md index 60161fcfb7..e9f1a21937 100644 --- a/en/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md +++ b/en/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md @@ -6,16 +6,26 @@ translator: date: 2020-12-08 00:00:00 +0000 lang: en --- + We are pleased to announce the release of Ruby 3.0.0-preview2. + It introduces a number of new features and performance improvements. + ## Static Analysis + ### RBS + RBS is a language to describe the types of Ruby programs. + Type checkers including TypeProf and other tools supporting RBS will understand Ruby programs much better with RBS definitions. + You can write down the definition of classes and modules: methods defined in the class, instance variables and their types, and inheritance/mix-in relations. + The goal of RBS is to support commonly seen patterns in Ruby programs and it allows writing advanced types including union types, method overloading, and generics. It also supports duck typing with _interface types_. + Ruby 3.0 ships with `rbs` gem, which allows parsing and processing type definitions written in RBS. The following is a small example of RBS with class, module, and constant definitions. + ``` rbs module ChatApp VERSION: String @@ -29,13 +39,21 @@ module ChatApp end end ``` + See [README of rbs gem](https://github.com/ruby/rbs) for more detail. + ### TypeProf + TypeProf is a type analysis tool bundled in the Ruby package. + Currently, TypeProf serves as a kind of type inference. + It reads plain (non-type-annotated) Ruby code, analyzes what methods are defined and how they are used, and generates a prototype of type signature in RBS format. + Here is a simple demo of TypeProf. + An example input: + ``` ruby # test.rb class User @@ -46,7 +64,9 @@ class User end User.new(name: "John", age: 20) ``` + An example output: + ``` $ typeprof test.rb # Classes @@ -56,16 +76,26 @@ class User def initialize : (name: String, age: Integer) -> [String, Integer] end ``` + You can run TypeProf by saving the input as "test.rb" and invoke a command called "typeprof test.rb". + You can also [try TypeProf online](https://mame.github.io/typeprof-playground/#rb=%23+test.rb%0Aclass+User%0A++def+initialize%28name%3A%2C+age%3A%29%0A++++%40name%2C+%40age+%3D+name%2C+age%0A++end%0A++%0A++attr_reader+%3Aname%2C+%3Aage%0Aend%0A%0AUser.new%28name%3A+%22John%22%2C+age%3A+20%29&rbs=). (It runs TypeProf on the server side, so sorry if it is out!) + See [the documentation](https://github.com/ruby/typeprof/blob/master/doc/doc.md) and [demos](https://github.com/ruby/typeprof/blob/master/doc/demo.md) for details. + TypeProf is experimental and not so mature yet; only a subset of the Ruby language is supported, and the detection of type errors is limited. But it is still growing rapidly to improve the coverage of language features, the analysis performance, and usability. Any feedback is very welcome. + ## Ractor (experimental) Ractor is an Actor-model like concurrent abstraction designed to provide a parallel execution feature without thread-safety concerns. + You can make multiple ractors and you can run them in parallel. Ractor enables you to make thread-safe parallel programs because ractors can not share normal objects. Communication between ractors are supported by message passing. + To limit sharing of objects, Ractor introduces several restrictions to the Ruby's syntax (without multiple Ractors, there is no restriction). + The specification and implmentation are not matured and may be changed in the future, so this feature is marked as experimental and show the "experimental feature" warning when the first `Ractor.new`. + The following small program calculates `n.prime?` (`n` is relatively a big integer) in parallel with two ractors. You will confirm that the program execution is about x2 times faster ompare with the sequential program on the parallel computer. + ``` ruby require 'prime' # n.prime? with sent integers in r1, r2 run in parallel @@ -82,10 +112,15 @@ r2.send 2**61 + 15 p r1.take #=> true p r2.take #=> true ``` + See [doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md) for more details. + ## Fiber Scheduler + `Fiber#scheduler` is introduced for intercepting blocking operations. This allows for light-weight concurrency without changing existing code. Watch ["Don't Wait For Me, Scalable Concurrency for Ruby 3"](https://www.youtube.com/watch?v=Y29SSOS4UOc) for an overview of how it works. + Currently supported classes/methods: + - `Mutex#lock`, `Mutex#unlock`, `Mutex#sleep` - `ConditionVariable#wait` - `Queue#pop`, `SizedQueue#push` @@ -98,6 +133,7 @@ Currently supported classes/methods: (Explain this:) 1. async is outer gem 2. async uses this new feature + ``` ruby require 'async' require 'net/http' @@ -110,7 +146,9 @@ Async do end end ``` + ## Other Notable New Features + * One-line pattern matching now uses `=>` instead of `in`. ``` ruby # version 3.0 @@ -131,30 +169,34 @@ end end ``` * Endless method definition is added. - ``` ruby - def square(x) = x * x - ``` + ``` ruby + def square(x) = x * x + ``` * Find pattern is added. - ``` ruby - case ["a", 1, "b", "c", 2, "d", "e", "f", 3] - in [*pre, String => x, String => y, *post] - p pre #=> ["a", 1] - p x #=> "b" - p y #=> "c" - p post #=> [2, "d", "e", "f", 3] - end - ``` + ``` ruby + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + ``` * `Hash#except` is now built-in. - ``` ruby - h = { a: 1, b: 2, c: 3 } - p h.except(:a) #=> {:b=>2, :c=>3} - ``` + ``` ruby + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + ``` * Memory view is added as an experimental feature * This is a new C-API set to exchange a raw memory area, such as a numeric array and a bitmap image, between extension libraries. The extension libraries can share also the metadata of the memory area that consists of the shape, the element format, and so on. Using these kinds of metadata, the extension libraries can share even a multidimensional array appropriately. This feature is designed by referring to Python's buffer protocol. + ## Performance improvements + * Many improvements were implemented in MJIT. See NEWS in detail. * Pasting long code to IRB is 53 times faster than bundled with Ruby 2.7.0. For example, the time required to paste [this sample code](https://gist.github.com/aycabta/30ab96334275bced5796f118c9220b0b) goes from 11.7 seconds to 0.22 seconds. + ## Other notable changes since 2.7 + * Keyword arguments are separated from other arguments. * In principle, code that prints a warning on Ruby 2.7 won't work. See the [document](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/) in detail. * By the way, arguments forwarding now supports leading arguments. @@ -203,30 +245,43 @@ end * tmpdir * tsort * weakref + See [NEWS](https://github.com/ruby/ruby/blob/v3_0_0_preview2/NEWS.md) or [commit logs](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_preview2) for more details. + {% assign release = site.data.releases | where: "version", "3.0.0-preview2" | first %} + With those changes, [{{ release.stats.files_changed }} files changed, {{ release.stats.insertions }} insertions(+), {{ release.stats.deletions }} deletions(-)](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0) since Ruby 2.7.0! + Please try Ruby 3.0.0-preview2, and give us any feedback! + ## Download + * <{{ release.url.gz }}> + SIZE: {{ release.size.gz }} SHA1: {{ release.sha1.gz }} SHA256: {{ release.sha256.gz }} SHA512: {{ release.sha512.gz }} + * <{{ release.url.xz }}> + SIZE: {{ release.size.xz }} SHA1: {{ release.sha1.xz }} SHA256: {{ release.sha256.xz }} SHA512: {{ release.sha512.xz }} + * <{{ release.url.zip }}> + SIZE: {{ release.size.zip }} SHA1: {{ release.sha1.zip }} SHA256: {{ release.sha256.zip }} SHA512: {{ release.sha512.zip }} + ## What is Ruby + Ruby was first developed by Matz (Yukihiro Matsumoto) in 1993, and is now developed as Open Source. It runs on multiple platforms and is used all over the world especially for web development. diff --git a/ja/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md b/ja/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md index c6b2107c19..39ec4ceffd 100644 --- a/ja/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md +++ b/ja/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md @@ -10,12 +10,19 @@ Ruby 3.0に向けてフィードバックを得るためのリリースである Ruby 3.0には、多くの新しい機能やパフォーマンスの改善が含まれます。 その一部を以下に紹介します。 ## 静的解析 ### RBS + RBSはRubyプログラムの型を記述するための言語です。 + TypeProfなどの型検査ツールを初めとする静的解析を行うツールは、RBSを利用することでRubyプログラムをより精度良く解析することができます。 + RBSでは、Rubyプログラムのクラスやモジュールの型を定義します。メソッドやインスタンス変数、定数とその型、継承やmixinなどの関係などが記述できます。 + RBSはRubyプログラムに頻出するパターンをサポートするように設計されており、ユニオン型、メソッドオーバーロード、ジェネリクスなどの機能を提供します。さらに「インタフェース型」によってダックタイピングをサポートします。 + Ruby 3.0には、このRBS言語で書かれた型定義を処理するためのライブラリである `rbs` gemが同梱されています。 + クラスやモジュール、定数を定義する、簡単なRBSの例を示します。 + ``` rbs module ChatApp VERSION: String @@ -29,13 +36,21 @@ module ChatApp end end ``` + 詳細については、[rbs gemのREADME](https://github.com/ruby/rbs)を参照してください。 + ### TypeProf + TypeProf は Ruby パッケージに同梱された型解析ツールです。 + TypeProf の現在の主な用途は一種の型推論です。 + 型注釈の無い普通の Ruby コードを入力し、どんなメソッドが定義されどのように使われているかを解析し、型シグネチャのプロトタイプを RBS フォーマットで生成します。 + 次は TypeProf の簡単なデモです。 + サンプル入力 + ``` ruby # test.rb class User @@ -46,7 +61,9 @@ class User end User.new(name: "John", age: 20) ``` + サンプル出力 + ``` $ typeprof test.rb # Classes @@ -56,16 +73,27 @@ class User def initialize : (name: String, age: Integer) -> [String, Integer] end ``` + サンプル入力を"test.rb"という名前で保存し、`typeprof test.rb`というコマンドで TypeProf の解析ができます。 + [TypeProf をオンラインで試す](https://mame.github.io/typeprof-playground/#rb=%23+test.rb%0Aclass+User%0A++def+initialize%28name%3A%2C+age%3A%29%0A++++%40name%2C+%40age+%3D+name%2C+age%0A++end%0A++%0A++attr_reader+%3Aname%2C+%3Aage%0Aend%0A%0AUser.new%28name%3A+%22John%22%2C+age%3A+20%29&rbs=)こともできます(サーバサイドで TypeProf を動かしているので、サーバが落ちたらごめんなさい)。 + 詳しくは[ドキュメント](https://github.com/ruby/typeprof/blob/master/doc/doc.md)や[デモ](https://github.com/ruby/typeprof/blob/master/doc/demo.md)を見てください。 + 残念ながら TypeProf はまだ実験的で、あまり完成度は高くありません。Ruby 言語のサブセットだけがサポートされていて、型エラー検出の機能は限定的です。ですがいま急速に改良中であり、言語機能のカバレッジ増強、解析効率の向上、利便性の向上などを行っています。フィードバックを歓迎します。 + ## Ractor (experimental) + Ractor はアクターモデル風の並行・並列制御機構であり、スレッド安全に関する懸念をなく、Rubyで並列処理を行うための機能として設計されています。 + 複数のRactorを作成すると、それらは並列計算機上で並列に実行されます。Ractor間では、ほとんどのオブジェクトが共有できないように設計されているため、スレッド安全なプログラムにすることができます。メッセージの送受信により、Ractor間のコミュニケーションを行うことが可能です。 + Ractor間でのオブジェクトの共有を制限するために、複数Ractorでの実行時には、いくつかのRubyの機能に制限が入ります(ただし、複数のRactorを用いない場合には、これまでのRubyと何も変わりません)。 + Ractorの仕様と実装は、まだ発展途上であるため、実験的機能として提供されます。初回のRactorの生成時には実験的機能であることが警告で表示されます。 + 次の小さなプログラムでは、二つのRactorを用いて`n.prime?`(`n`は比較的大きな値)の計算を並列に実行します。動かしてみると、逐次実行にくらべて、2コア以上の計算機で計算時間が半分程度になることが確認できます。 + ``` ruby require 'prime' # n.prime? with sent integers in r1, r2 run in parallel @@ -82,10 +110,14 @@ r2.send 2**61 + 15 p r1.take #=> true p r2.take #=> true ``` + より詳細は、[doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md) をご覧ください。 + ## Scheduler (experimental) + `Thread#scheduler` is introduced for intercepting blocking operations. This allows for light-weight concurrency without changing existing code. Watch ["Don't Wait For Me, Scalable Concurrency for Ruby 3"](https://www.youtube.com/watch?v=Y29SSOS4UOc) for an overview of how it works. Currently supported classes/methods: + - `Mutex#lock`, `Mutex#unlock`, `Mutex#sleep` - `ConditionVariable#wait` - `Queue#pop`, `SizedQueue#push` @@ -93,49 +125,56 @@ Currently supported classes/methods: - `Kernel#sleep` - `IO#wait`, `IO#read`, `IO#write` and related methods (e.g. `#wait_readable`, `#gets`, `#puts` and so on). - `IO#select` is *not supported*. + The current entry point for concurrency is `Fiber.schedule{...}` however this is subject to change by the time Ruby 3 is released. + Currently, there is a test scheduler available in [`Async::Scheduler`](https://github.com/socketry/async/pull/56). See [`doc/scheduler.md`](https://github.com/ruby/ruby/blob/master/doc/scheduler.md) for more details. + ## その他の主要な新機能 + * 1行パターンマッチが `in` の代わりに `=>` を使うようになりました。 -``` ruby - # version 3.0 - {a: 0, b: 1} => {a:} - p a # => 0 - # version 2.7 - {a: 0, b: 1} in {a:} - p a # => 0 -``` + ``` ruby + # version 3.0 + {a: 0, b: 1} => {a:} + p a # => 0 + # version 2.7 + {a: 0, b: 1} in {a:} + p a # => 0 + ``` * 一行メソッド定義が書けるようになりました。 -``` ruby - def square(x) = x * x -``` + ``` ruby + def square(x) = x * x + ``` * findパターンが書けるようになりました。 -``` ruby - case ["a", 1, "b", "c", 2, "d", "e", "f", 3] - in [*pre, String => x, String => y, *post] - p pre #=> ["a", 1] - p x #=> "b" - p y #=> "c" - p post #=> [2, "d", "e", "f", 3] - end -``` + ``` ruby + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + ``` * `Hash#except` が組み込みになりました。 -``` ruby - h = { a: 1, b: 2, c: 3 } - p h.except(:a) #=> {:b=>2, :c=>3} -``` + ``` ruby + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + ``` ## パフォーマンスの改善 + * MJITに多数の改善が行われています。詳細はNEWSを参照してください。 * IRB への長いコードの貼り付けは、Ruby 2.7.0 にバンドルされているものと比較して 53 倍の速さになります。例えば、[このサンプルコード](https://gist.github.com/aycabta/30ab96334275bced5796f118c9220b0b)の貼り付けに要する時間は、11.7 秒から 0.22 秒になります。 + ## その他の注目すべき 2.7 からの変更点 + * キーワード引数が通常の引数から分離されました。 * 原則として、2.7 で警告の出ていたコードは動かなくなります。詳細は[別ドキュメント](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/)を参照してください。 * 関連して、引数のフォワーディングの記法で先頭に引数を書けるようになりました。 -``` ruby - def method_missing(meth, ...) - send(:"do_#{ meth }", ...) - end -``` + ``` ruby + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end + ``` * `$SAFE` の機能が完全に削除され、ただのグローバル変数となりました。 * バックトレースの順序は2.5で逆転しましたが、3.0ではこれを取りやめることになりました。例外が起きた行が先に表示され、呼び出し元が後に表示されるように戻ります。 * いくつかの標準ライブラリがアップデートされました。 @@ -175,27 +214,38 @@ Currently, there is a test scheduler available in [`Async::Scheduler`](https://g * tmpdir * tsort * weakref + その他詳細については、[NEWS](https://github.com/ruby/ruby/blob/v3_0_0_preview2/NEWS) ファイルまたは[コミットログ](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_preview2)を参照してください。 + {% assign release = site.data.releases | where: "version", "3.0.0-preview2" | first %} + なお、こうした変更により、Ruby 2.7.0 以降では [{{ release.stats.files_changed }} 個のファイルに変更が加えられ、{{ release.stats.insertions }} 行の追加と {{ release.stats.deletions }} 行の削除が行われました](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0) ! + ぜひ Ruby 3.0.0-preview2 を試して、フィードバックをお願いします! + ## ダウンロード + * <{{ release.url.gz }}> + SIZE: {{ release.size.gz }} SHA1: {{ release.sha1.gz }} SHA256: {{ release.sha256.gz }} SHA512: {{ release.sha512.gz }} + * <{{ release.url.xz }}> + SIZE: {{ release.size.xz }} SHA1: {{ release.sha1.xz }} SHA256: {{ release.sha256.xz }} SHA512: {{ release.sha512.xz }} + * <{{ release.url.zip }}> + SIZE: {{ release.size.zip }} SHA1: {{ release.sha1.zip }} SHA256: {{ release.sha256.zip }} SHA512: {{ release.sha512.zip }} -## 3.0.0-preview2 予告 -静的型解析である["type-profiler"](https://github.com/mame/ruby-type-profiler)が入る予定です。お楽しみに。 + ## Ruby とは + Rubyはまつもとゆきひろ (Matz) によって1993年に開発が始められ、今もオープンソースソフトウェアとして開発が続けられています。Rubyは様々なプラットフォームで動き、世界中で、特にWebアプリケーション開発のために使われています。 From 5263234735a0f53b77db67ac5e689938e37b934e Mon Sep 17 00:00:00 2001 From: manga_osyo Date: Tue, 8 Dec 2020 20:00:25 +0900 Subject: [PATCH 0201/1487] Fix NEWS link. --- ja/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ja/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md b/ja/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md index 39ec4ceffd..dfea0be4cc 100644 --- a/ja/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md +++ b/ja/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md @@ -215,7 +215,7 @@ Currently, there is a test scheduler available in [`Async::Scheduler`](https://g * tsort * weakref -その他詳細については、[NEWS](https://github.com/ruby/ruby/blob/v3_0_0_preview2/NEWS) ファイルまたは[コミットログ](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_preview2)を参照してください。 +その他詳細については、[NEWS](https://github.com/ruby/ruby/blob/v3_0_0_preview2/NEWS.md) ファイルまたは[コミットログ](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_preview2)を参照してください。 {% assign release = site.data.releases | where: "version", "3.0.0-preview2" | first %} From 0301b8df6eba08d4cac4597e0aa2a5bf1aec977c Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Tue, 8 Dec 2020 20:22:04 +0900 Subject: [PATCH 0202/1487] Add more newlines to ja/3-0-0-preview2-released --- ja/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ja/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md b/ja/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md index dfea0be4cc..d5f1700ae6 100644 --- a/ja/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md +++ b/ja/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md @@ -6,9 +6,13 @@ translator: date: 2020-12-08 00:00:00 +0000 lang: ja --- + Ruby 3.0に向けてフィードバックを得るためのリリースである、Ruby 3.0.0-preview2が公開されました。 + Ruby 3.0には、多くの新しい機能やパフォーマンスの改善が含まれます。 その一部を以下に紹介します。 + ## 静的解析 + ### RBS RBSはRubyプログラムの型を記述するための言語です。 From 34f9ecd78c97a889a82c546426fb6bff485236da Mon Sep 17 00:00:00 2001 From: Benoit Tigeot Date: Tue, 8 Dec 2020 22:38:06 +0100 Subject: [PATCH 0203/1487] Remove duplicated "Find pattern is added." --- .../_posts/2020-12-08-ruby-3-0-0-preview2-released.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/en/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md b/en/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md index e9f1a21937..ffb099dc9a 100644 --- a/en/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md +++ b/en/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md @@ -172,16 +172,6 @@ end ``` ruby def square(x) = x * x ``` -* Find pattern is added. - ``` ruby - case ["a", 1, "b", "c", 2, "d", "e", "f", 3] - in [*pre, String => x, String => y, *post] - p pre #=> ["a", 1] - p x #=> "b" - p y #=> "c" - p post #=> [2, "d", "e", "f", 3] - end - ``` * `Hash#except` is now built-in. ``` ruby h = { a: 1, b: 2, c: 3 } From 0fe447a4203e36059f05b0598e49d099378115fe Mon Sep 17 00:00:00 2001 From: Beyar Date: Tue, 8 Dec 2020 23:03:34 +0100 Subject: [PATCH 0204/1487] Update 2020-12-08-ruby-3-0-0-preview2-released.md Fixed spelling --- en/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md b/en/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md index e9f1a21937..d3c2f7260d 100644 --- a/en/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md +++ b/en/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md @@ -92,7 +92,7 @@ You can make multiple ractors and you can run them in parallel. Ractor enables y To limit sharing of objects, Ractor introduces several restrictions to the Ruby's syntax (without multiple Ractors, there is no restriction). -The specification and implmentation are not matured and may be changed in the future, so this feature is marked as experimental and show the "experimental feature" warning when the first `Ractor.new`. +The specification and implementation are not matured and may be changed in the future, so this feature is marked as experimental and show the "experimental feature" warning when the first `Ractor.new`. The following small program calculates `n.prime?` (`n` is relatively a big integer) in parallel with two ractors. You will confirm that the program execution is about x2 times faster ompare with the sequential program on the parallel computer. From ccf7d957b9c7cfd937d403f1b5aa0bcb146b3ac1 Mon Sep 17 00:00:00 2001 From: Beyar Date: Tue, 8 Dec 2020 23:06:47 +0100 Subject: [PATCH 0205/1487] Update 2020-12-08-ruby-3-0-0-preview2-released.md --- en/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md b/en/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md index d3c2f7260d..afc7f6e482 100644 --- a/en/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md +++ b/en/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md @@ -94,7 +94,7 @@ To limit sharing of objects, Ractor introduces several restrictions to the Ruby' The specification and implementation are not matured and may be changed in the future, so this feature is marked as experimental and show the "experimental feature" warning when the first `Ractor.new`. -The following small program calculates `n.prime?` (`n` is relatively a big integer) in parallel with two ractors. You will confirm that the program execution is about x2 times faster ompare with the sequential program on the parallel computer. +The following small program calculates `n.prime?` (`n` is relatively a big integer) in parallel with two ractors. You will confirm that the program execution is about x2 times faster compared to the sequential program on the parallel computer. ``` ruby require 'prime' From d0c75879cfc1bd97b551e5c7df866ee280bcf320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20Ar=C4=B1l=C4=B1k?= Date: Sat, 12 Dec 2020 17:28:48 +0300 Subject: [PATCH 0206/1487] Translate 3.0.0-preview2 released post (tr) (#2565) --- ...2020-12-08-ruby-3-0-0-preview2-released.md | 297 ++++++++++++++++++ 1 file changed, 297 insertions(+) create mode 100644 tr/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md diff --git a/tr/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md b/tr/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md new file mode 100644 index 0000000000..b4d7c44106 --- /dev/null +++ b/tr/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md @@ -0,0 +1,297 @@ +--- +layout: news_post +title: "Ruby 3.0.0 Önizleme 2 Yayınlandı" +author: "naruse" +translator: "ismailarilik" +date: 2020-12-08 00:00:00 +0000 +lang: tr +--- + +Ruby 3.0.0-preview2'nin yayınlandığını duyurmaktan memnuniyet duyuyoruz. + +Bu sürüm birçok yeni özellik ve performans iyileştirmesi içermektedir. + +## Statik Analiz + +### RBS + +RBS, Ruby programlarındaki tipleri tanımlamada kullanılan bir dildir. + +RBS'yi destekleyen tip kontrol edicileri (TypeProf ve diğer araçlar da dahil), RBS tanımlamaları ile birlikte Ruby programlarını çok daha iyi anlayacaklardır. + +RBS ile sınıfların ve modüllerin tanımını yazabilirsiniz: bir sınıfta tanımlanmış metodlar, örnek değişkenleri ve bu değişkenlerin tipleri, ve miras/mix-in ilişkisi. + +RBS'nin amacı Ruby programlarında sıkça görülen desenleri desteklemektir. +RBS, union tiplerinin de dahil olduğu gelişmiş tipleri, metod aşırı yüklemeyi, ve genelleyicileri yazmaya izin verir. +Ayrıca _arayüz tipleri_ ile ördek tiplemesini de destekler. + +Ruby 3.0 `rbs` gem'i ile gelmektedir, bu gem RBS ile yazılmış tip tanımlarını ayrıştırma ve işlemeye izin verir. +Aşağıdaki kod sınıf, modül ve sabit tanımlamalarını içeren, RBS için küçük bir örnektir. + +``` rbs +module ChatApp + VERSION: String + class Channel + attr_reader name: String + attr_reader messages: Array[Message] + attr_reader users: Array[User | Bot] # `|`, union tip anlamına gelmektedir, `User` ya da `Bot`. + def initialize: (String) -> void + def post: (String, from: User | Bot) -> Message # Metod aşırı yükleme destekleniyor. + | (File, from: User | Bot) -> Message + end +end +``` + +Daha fazla ayrıntı için [rbs gem'inin README](https://github.com/ruby/rbs)'sine bakınız. + +### TypeProf + +TypeProf, Ruby ile paketlenmiş bir tip analizi aracıdır. + +Şu anda TypeProf, bir çeşit tip çıkarımı olarak hizmet vermektedir. + +TypeProf, sade (tiplerin belirtilmediği) Ruby kodunu okur, hangi metodların tanımlandığını ve bu metodların nasıl kullanıldığını analiz eder, ve RBS biçiminde prototip bir tip imzası oluşturur. + +İşte basit bir TypeProf demosu. + +Örnek bir girdi: + +``` ruby +# test.rb +class User + def initialize(name:, age:) + @name, @age = name, age + end + attr_reader :name, :age +end +User.new(name: "John", age: 20) +``` + +Örnek bir çıktı: + +``` +$ typeprof test.rb +# Classes +class User + attr_reader name : String + attr_reader age : Integer + def initialize : (name: String, age: Integer) -> [String, Integer] +end +``` + +TypeProf'u, girdiyi "test.rb" olarak kaydederek ve "typeprof test.rb" komutunu çağırarak çalıştırabilirsiniz. + +Ayrıca [TypeProf'u çevrimiçi deneyebilirsiniz](https://mame.github.io/typeprof-playground/#rb=%23+test.rb%0Aclass+User%0A++def+initialize%28name%3A%2C+age%3A%29%0A++++%40name%2C+%40age+%3D+name%2C+age%0A++end%0A++%0A++attr_reader+%3Aname%2C+%3Aage%0Aend%0A%0AUser.new%28name%3A+%22John%22%2C+age%3A+20%29&rbs=). +(Burası TypeProf'u sunucu tarafında çalıştırır, yani eğer çalışmazsa kusura bakmayın!) + +Ayrıntılar için [belgelendirmeye](https://github.com/ruby/typeprof/blob/master/doc/doc.md) ve [demolara](https://github.com/ruby/typeprof/blob/master/doc/demo.md) bakın. + +TypeProf şu anda deneysel ve oturmuş değil; Ruby'nin sadece bir alt kümesi destekleniyor, ve tip hatalarının tespit edilmesi kısıtlıdır. +Fakat TypeProf, dil özelliklerinin kapsamasını, analiz performansını ve kullanılırlığı hızlıca artırmak için gelişmektedir. +Herhangi bir geri bildirime çok ihtiyacımız var. + +## Ractor (deneysel) + +Ractor, thread güvenliği endişeleri olmadan paralel çalıştırma özelliğini sağlamak için tasarlanan eşzamanlı soyutlama gibi bir aktör-modeldir. + +Birden fazla ractor yapabilirsiniz ve bunları paralelde çalıştırabilirsiniz. +Ractor thread-güvenli paralel programlar yapmanıza izin verir çünkü ractor'lar normal nesneleri paylaşmazlar. +Ractor'lar arasındaki iletişim mesaj geçirme ile desteklenir. + + + + +Nesnelerin paylaşılmasını kısıtlamak için Ractor, Ruby'nin sözdizimine bazı kısıtlamalar getirir (birden fazla Ractor yoksa, değişiklik yoktur). + +Belirtim ve gerçekleme henüz tam oturmamıştır ve ileride değişecektir, bu sebeple bu özellik deneysel olarak işaretlenmiştir ve ilk `Ractor.new`'de "deneysel özellik" uyarısı gösterilir. + +Aşağıdaki küçük program `n.prime?`'ı (`n` nispeten büyük bir tamsayıdır) iki ractor ile paralelde hesaplar. +Bu programın çalışması paralel bilgisayarda ardışık bir programa göre aşağı yukarı 2 kat daha hızlıdır. + +``` ruby +require 'prime' +# r1 ve r2'deki, tamsayıların gönderildiği n.prime? paralelde çalışır +r1, r2 = *(1..2).map do + Ractor.new do + n = Ractor.recv + n.prime? + end +end +# parametreleri gönder +r1.send 2**61 - 1 +r2.send 2**61 + 15 +# 1. ve 2. deyimin sonuçlarını bekle +p r1.take #=> true +p r2.take #=> true +``` + +Daha fazla ayrıntı için [doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md)'ye bakın. + +## Fiber Zamanlayıcı + +`Fiber#scheduler` bloklayan işlemleri kesmek için tanıtılmıştır. +Bu, var olan kodu değiştirmeden hafif eşzamanlılığa izin verir. +Nasıl çalıştığının genel bir bakış için ["Beni Bekleme, Ruby 3'te Ölçeklenebilir Eşzamanlılık"](https://www.youtube.com/watch?v=Y29SSOS4UOc)'ı izleyin. + +Şu anda desteklenen sınıf ve metodlar: + +- `Mutex#lock`, `Mutex#unlock`, `Mutex#sleep` +- `ConditionVariable#wait` +- `Queue#pop`, `SizedQueue#push` +- `Thread#join` +- `Kernel#sleep` +- `Process.wait` +- `IO#wait`, `IO#read`, `IO#write` ve ilişkili metodlar (`#wait_readable`, `#gets`, `#puts`, vb. gibi). +- `IO#select` *desteklenmemektedir*. +(Async gem'ini bağlantılarla açıkla). +Bu örnek program birden çok HTTP isteğini eşzamanlı olarak gerçekleştirecektir: +(Bunu açıkla:) +1. async dışsal bir gem +2. async bu yeni özelliği kullanır + +``` ruby +require 'async' +require 'net/http' +require 'uri' +Async do + ["ruby", "python", "c"].each do |topic| + Async do + Net::HTTP.get(URI "https://www.google.com/search?q=#{topic}") + end + end +end +``` + +## Diğer Dikkate Değer Yeni Özellikler + +* Tek satırlık desen eşleştirme şimdi `in` yerine `=>` kullanıyor. + ``` ruby + # sürüm 3.0 + {a: 0, b: 1} => {a:} + p a # => 0 + # sürüm 2.7 + {a: 0, b: 1} in {a:} + p a # => 0 + ``` +* Bulma deseni eklendi. + ``` ruby + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + ``` +* Sonsuz metod tanımı eklendi. + ``` ruby + def square(x) = x * x + ``` +* `Hash#except` şimdi gömülü. + ``` ruby + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + ``` +* Hafıza görünümü deneysel bir özellik olarak eklendi. + * Bu, uzantı kütüphaneleri arasında sayısal bir dizi ve bir biteşlem görüntüsü gibi ham bir hafıza alanını takas etmek için yeni bir C-API'ıdır. + Uzantı kütüphaneleri ayrıca şekil, öğe biçimi, vb. içeren hafıza alanlarının üstverilerini de paylaşır. + Bu gibi üstverileri kullanarak, uzantı kütüphaneleri çok boyutlu dizileri bile uygun şekilde paylaşabilirler. + Bu özellik Python'ın tampon protokolüne danışılarak tasarlanmıştır. + +## Performans iyileştirmeleri + +* Birçok geliştirme MJIT'te gerçeklenmiştir. + Ayrıntılar için NEWS'e bakınız. +* Uzun bir kodu IRB'ye yapıştırmak, Ruby 2.7.0'da gelene göre 53 kat daha hızlı. + Örneğin, [şu örnek kodu](https://gist.github.com/aycabta/30ab96334275bced5796f118c9220b0b) yapıştırmak için gereken zaman 11.7 saniyeden 0.22 saniyeye düşmüştür. + +## 2.7'den bu yana diğer dikkate değer değişiklikler + +* Anahtar sözcük argümanları diğer argümanlardan ayrılmıştır. + * Prensipte, Ruby 2.7'de bir uyarı yazdıran kod çalışmayacaktır. + Ayrıntılar için [belgeye](https://www.ruby-lang.org/tr/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/) bakınız. + * Bu arada argüman yönlendirme artık sondaki argümanları da destekliyor. + ``` ruby + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end + ``` +* `$SAFE` özelliği tamamiyle silindi; şimdi sadece normal bir global değişken. +* Geriizleme sırası Ruby 2.5'te tersine çevrildi, fakat bu iptal edildi. + Şimdi Ruby 2.4'teki gibi bir davranış söz konusu; hata mesajı ve istisnanın meydana geldiği satır numarası ilk olarak yazdırılır, daha sonra ise çağırıcıları yazdırılır. +* Bazı standart kütüphaneler güncellendi. + * RubyGems 3.2.0.rc.1 + * Bundler 2.2.0.rc.1 + * IRB 1.2.6 + * Reline 0.1.5 +* Aşağıdaki kütüphaneler artık paketlenmiyor. + Bu özellikleri kullanmak için denk gelen gem'leri kurun. + * net-telnet + * xmlrpc +* Şu varsayılan gem'ler paketlenmiş gem'ler olarak düzenlendi. + * rexml + * rss +* Aşağıdaki stdlib dosyaları şimdi varsayılan gemler ve rubygems.org'da yayınlandı. + * abbrev + * base64 + * English + * erb + * find + * io-nonblock + * io-wait + * net-ftp + * net-http + * net-imap + * net-protocol + * nkf + * open-uri + * optparse + * resolv + * resolv-replace + * rinda + * securerandom + * set + * shellwords + * tempfile + * time + * tmpdir + * tsort + * weakref + +Daha fazla ayrıntı için [NEWS](https://github.com/ruby/ruby/blob/v3_0_0_preview2/NEWS.md)'e +ya da [işleme loglarına](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_preview2) +bakın. + +{% assign release = site.data.releases | where: "version", "3.0.0-preview2" | first %} + +Bu değişikliklerle birlikte, 2.7.0'dan bu yana [{{ release.stats.files_changed }} dosya değişti, {{ release.stats.insertions }} ekleme yapıldı(+), {{ release.stats.deletions }} silme yapıldı(-)](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0)! + +Lütfen Ruby 3.0.0-preview2'yi deneyin, ve bize herhangi bir geri bildirim verin! + +## İndirin + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Ruby nedir + +Ruby ilk olarak Matz (Yukihiro Matsumoto) tarafından 1993'te geliştirilmiştir, ve şu anda Açık Kaynak olarak geliştirilmektedir. +Birçok platformda çalışır ve tüm dünyada genellikle web geliştirmesi için kullanılır. From 0d5b4573be8ea12b72b0fa7a9ecd87ff2e3ecea0 Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Wed, 18 Nov 2020 23:41:33 +0700 Subject: [PATCH 0207/1487] Translate Ruby 3.0.0 Preview 1 released news (id) --- ...2020-09-25-ruby-3-0-0-preview1-released.md | 271 ++++++++++++++++++ 1 file changed, 271 insertions(+) create mode 100644 id/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md diff --git a/id/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md b/id/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md new file mode 100644 index 0000000000..a96108a9c0 --- /dev/null +++ b/id/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md @@ -0,0 +1,271 @@ +--- +layout: news_post +title: "Ruby 3.0.0 Preview 1 Dirilis" +author: "naruse" +translator: "meisyal" +date: 2020-09-25 00:00:00 +0000 +lang: id +--- + +Kami dengan senang hati mengumumkan rilis dari Ruby 3.0.0-preview1. + +Rilis ini mengenalkan sejumlah fitur baru dan perbaikan performa. + +## RBS + +RBS adalah sebuah bahasa yang mendeskripsikan tipe dari program Ruby. +*Type checker* termasuk *type-profiler* dan *tool* lainnya yang mendukung RBS +akan memahami program Ruby jauh lebih baik dengan definisi RBS. + +Anda dapat menuliskan definisi *class* dan *module*: *method* didefinisikan di +dalam *class*, *instance variables* dan tipenya, serta hubungan +*inheritance/mix-in*. RBS memiliki tujuan untuk mendukung pola yang biasanya +kita lihat dalam program Ruby dan memperbolehkan penulisan *advanced types* +yang berisi *union type*, *method overloading*, dan *generic*. RBS juga +mendukung *duck typing* dengan _interface types_. + +Ruby 3.0 dirilis dengan gem `rbs`, yang memperbolehkan untuk mem-*parse* dan +memproses definisi tipe yang ditulis di dalam RBS. + +Berikut ini adalah sebuah contoh kecil dari RBS. + +``` rbs +module ChatApp + VERSION: String + + class Channel + attr_reader name: String + attr_reader messages: Array[Message] + attr_reader users: Array[User | Bot] # `|` berarti union types, `User` atau `Bot`. + + def initialize: (String) -> void + + def post: (String, from: User | Bot) -> Message # Method overloading didukung. + | (File, from: User | Bot) -> Message + end +end +``` + +Lihat [README dari gem rbs](https://github.com/ruby/rbs) untuk lebih detail. + +## Ractor (eksperimental) + +*Ractor* adalah sebuah *Actor-model* seperti *concurrent abstraction* yang +didesain untuk menyediakan sebuah fitur eksekusi paralel tanpa mengkhawatirkan +*thread-safety*. + +Anda dapat membuat beberapa *ractor* dan menjalankannya secara paralel. *Ractor* +memungkinkan untuk membuat program paralel yang *thread-safe* karena *ractor* +tidak dapat membagi objek normal. Komunikasi antar *ractor* didukung oleh +*message passing*. + +Untuk membatasi pembagian objek, *Ractor* mengenalkan beberapa batasan pada +sintaks Ruby (tanpa banyak *Ractor*, maka tidak ada perubahan). + +Spesifikasi dan implementasi dari *Ractor* masih belum sempurna dan memungkinkan +adanya perubahan ke depan, sehingga fitur ini ditandai dengan eksperimental +dan peringatan fitur eksperimental akan ditampilkan ketika *Ractor* dibuat. + +Berikut adalah program kecil yang mengecek `prime?` secara paralel dengan +dua *ractor* dan memiliki kecepatan 2 kali lebih cepat dengan dua atau lebih +*core* dibanding program *sequential*. + +``` ruby +require 'prime' + +# n.prime? dengan integer r1, r2 jalan secara paralel +r1, r2 = *(1..2).map do + Ractor.new do + n = Ractor.recv + n.prime? + end +end + +# parameter dikirim +r1.send 2**61 - 1 +r2.send 2**61 + 15 + +# menunggu hasil dari expr1, expr2 +p r1.take #=> true +p r2.take #=> true +``` + +Lihat [doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md) +untuk lebih detail. + +## Scheduler (eksperimental) + +`Thread#scheduler` diperkenalkan untuk menghalangi operasi *blocking*. Ini +memperbolehkan *light-weight concurrency* tanpa pengubahan kode yang sudah ada. + +Saat ini, *class*/*method* yang didukung: + +- `Mutex#lock`, `Mutex#unlock`, `Mutex#sleep` +- `ConditionVariable#wait` +- `Queue#pop`, `SizedQueue#push` +- `Thread#join` +- `Kernel#sleep` +- `IO#wait`, `IO#read`, `IO#write` dan *method* yang berkaitan (seperti `#wait_readable`, `#gets`, `#puts` dan lainnya). +- `IO#select` *tidak didukung*. + +Titik masuk dari *concurrency* saat ini adalah `Fiber.schedule{...}`, namun +ini dapat berubah sewaktu-waktu ketika Ruby 3 dirilis. + +Sekarang, ada sebuah *test scheduler* yang tersedia di [`Async::Scheduler`](https://github.com/socketry/async/pull/56). Lihat [`doc/scheduler.md`](https://github.com/ruby/ruby/blob/master/doc/scheduler.md) +untuk lebih detail. [Feature #16786] + +**PERINGATAN**: Fitur ini masih eksperimental. Baik nama maupun fitur akan +berubah pada rilis *preview* berikutnya. + +## Fitur Baru Lainnya + +* *Rightward assignment statement* ditambahkan. + + ``` ruby + fib(10) => x + p x #=> 55 + ``` + +* Definisi *endless method* ditambahkan. + + ``` ruby + def square(x) = x * x + ``` + +* *Find pattern* ditambahkan. + + ``` ruby + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + ``` + +* `Hash#except` sekarang *built-in*. + + ``` ruby + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + ``` + +* *Memory view* ditambahkan sebagai sebuah fitur eksperimental + + * Ini adalah sebuah kumpulan C-API baru yang menukar sebuah area *raw memory*, seperti sebuah *numeric array* dan sebuah *bitmap image*, antara pustaka *extension*. Pustaka *extension* dapat juga membagikan *metadata* dari area *memory* yang terdiri dari bentuk, format elemen, dan sebagainya. Menggunakan semacam *metadata* seperti ini, pustaka *extension* bahkan dapat membagikan sebuah *multidimensional array* dengan tepat. Fitur ini didesain dengan merujuk pada *buffer protocol* dari Python. + +## Perbaikan performa + +* Banyak perbaikan yang telah diimplementasikan dalam MJIT. Lihat NEWS untuk detail. + +## Perubahan penting lainnya sejak 2.7 + +* *Keyword argument* dipisahkan dari *argument* lainnya. + * Pada dasarnya, kode yang mencetak sebuah peringatan pada Ruby 2.7 tidak akan +bekerja. Lihat [dokumen](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/) untuk detail. + * Omong-omong, *argument forwarding* sekarang mendukung *leading argument*. + + ``` ruby + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end + ``` + +* Fitur `$SAFE` telah dihilangkan; sekarang adalah sebuah variabel global. + +* Urutan dari *backtrace* telah dibalik pada Ruby 2.5, tetapi itu dibatalkan. Sekarang urutan berperilaku seperti Ruby 2.4; pesan *error* dan nomor baris di mana *exception* terjadi dicetak terlebih dahulu dan pemanggilnya baru dicetak kemudian. + +* Beberapa pustaka standar yang diperbarui. + * RubyGems 3.2.0.rc.1 + * Bundler 2.2.0.rc.1 + * IRB 1.2.6 + * Reline 0.1.5 + +* Berikut adalah pustaka yang tidak lagi masuk sebagai *bundled gem*. + Pasang *gem* berikut jika ingin menggunakan fiturnya. + * net-telnet + * xmlrpc + +* Memindahkan *default gem* ke *bundled gem*. + * rexml + * rss + +* Memindahkan *stdlib* ke *default gem*. Berikut adalah *default gem* yang telah dipublikasikan ke rubygems.org + * abbrev + * base64 + * English + * erb + * find + * io-nonblock + * io-wait + * net-ftp + * net-http + * net-imap + * net-protocol + * nkf + * open-uri + * optparse + * resolv + * resolv-replace + * rinda + * securerandom + * set + * shellwords + * tempfile + * time + * tmpdir + * tsort + * weakref + +Lihat [NEWS](https://github.com/ruby/ruby/blob/v3_0_0_preview1/NEWS.md) +atau [commit logs](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_preview1) +untuk lebih detail. + +{% assign release = site.data.releases | where: "version", "3.0.0-preview1" | first %} + +Dengan perubahan tersebut, [{{ release.stats.files_changed }} berkas berubah, {{ release.stats.insertions }} sisipan(+), {{ release.stats.deletions }} terhapus(-)](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_preview1) +sejak Ruby 2.7.0! + +Mohon coba Ruby 3.0.0-preview1 dan berikan kami umpan balik! + +## Unduh + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Cuplikan 3.0.0-preview2 + +Kami merencanakan untuk memasukkan ["type-profiler"](https://github.com/mame/ruby-type-profiler) +yang mana adalah sebuah fitur analisis *static type*. Nantikan! + +## Apa itu Ruby + +Ruby pertama kali dikembangkan oleh Matz (Yukihiro Matsumoto) pada 1993 +dan sekarang dikembangkan sebagai *Open Source*. Ruby berjalan di berbagai +jenis *platform* dan digunakan di seluruh dunia khususnya pengembangan *web*. From 0034de4fe74cf2536180b3cb367057f84ac0af4d Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Sat, 28 Nov 2020 21:57:45 +0700 Subject: [PATCH 0208/1487] Translate CVE-2020-25613: Potential HTTP Request Smuggling Vulnerability in WEBrick (id) --- ...9-http-request-smuggling-cve-2020-25613.md | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 id/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md diff --git a/id/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md b/id/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md new file mode 100644 index 0000000000..869d7b20e4 --- /dev/null +++ b/id/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md @@ -0,0 +1,42 @@ +--- +layout: news_post +title: "CVE-2020-25613: Potensi Kerentanan HTTP Request Smuggling pada WEBrick" +author: "mame" +translator: "meisyal" +date: 2020-09-29 06:30:00 +0000 +tags: security +lang: id +--- + +Sebuah potensi kerentanan HTTP *request smuggling* pada WEBrick telah dilaporkan. +Kerentanan ini ditetapkan sebagai penanda CVE +[CVE-2020-25613](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-25613). +Kami sangat merekomendasikan Anda untuk memperbarui *webrick gem*. + +## Detail + +WEBrick sangat toleran terhadap sebuah *Transfer-Encoding header* yang tidak +valid. Hal ini bisa menyebabkan interpretasi yang tidak konsisten antara +WEBrick dan beberapa HTTP *proxy server*, yang memperbolehkan penyerang untuk +"smuggle" sebuah *request*. Lihat +[CWE-444](https://cwe.mitre.org/data/definitions/444.html) untuk lebih detail. + +Mohon perbarui *webrick gem* ke versi 1.6.1 atau setelahnya. Anda dapat +menggunakan `gem update webrick` untuk memperbarui. Jika Anda menggunakan +*bundler*, tambahkan `gem "webrick", ">= 1.6.1"` pada `Gemfile` Anda. + +## Versi terimbas + +* *webrick gem* 1.6.0 atau sebelumnya +* versi *webrick* yang di-*bundle* Ruby 2.7.1 atau sebelumnya +* versi *webrick* yang di-*bundle* Ruby 2.6.6 atau sebelumnya +* versi *webrick* yang di-*bundle* Ruby 2.5.8 atau sebelumnya + +## Rujukan + +Terima kasih kepada [piao](https://hackerone.com/piao) yang telah menemukan +masalah ini. + +## Riwayat + +* Semula dipublikasikan pada 2020-09-29 06:30:00 (UTC) From 4b3713b8dbe6f890765afe4b2ff885629f6560af Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Fri, 4 Dec 2020 23:40:55 +0700 Subject: [PATCH 0209/1487] Translate Ruby 2.7.2 released news (id) --- .../_posts/2020-10-02-ruby-2-7-2-released.md | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 id/news/_posts/2020-10-02-ruby-2-7-2-released.md diff --git a/id/news/_posts/2020-10-02-ruby-2-7-2-released.md b/id/news/_posts/2020-10-02-ruby-2-7-2-released.md new file mode 100644 index 0000000000..ec498d8d29 --- /dev/null +++ b/id/news/_posts/2020-10-02-ruby-2-7-2-released.md @@ -0,0 +1,61 @@ +--- +layout: news_post +title: "Ruby 2.7.2 Dirilis" +author: "nagachika" +translator: "meisyal" +date: 2020-10-02 11:00:00 +0000 +lang: id +--- + +Ruby 2.7.2 telah dirilis. + +Rilis ini berisi *intentional incompatibility*. Peringatan *deprecation* +dinonaktifkan secara *default* pada 2.7.2 and versi selanjutnya. Anda dapat +mengaktifkan peringatan *deprecation* dengan menambahkan opsi -w atau +-W:deprecated pada *command-line*. Mohon cek topik-topik di bawah ini untuk +lebih detail. + +* [Feature #17000 2.7.2 turns off deprecation warnings by default](https://bugs.ruby-lang.org/issues/17000) +* [Feature #16345 Don't emit deprecation warnings by default.](https://bugs.ruby-lang.org/issues/16345) + +Rilis ini juga berisi versi baru dari *webrick* dengan sebuah perbaikan +keamanan yang dijelaskan pada artikel berikut. + +* [CVE-2020-25613: Potensi Kerentanan HTTP Request Smuggling pada WEBrick](/id/news/2020/09/29/http-request-smuggling-cve-2020-25613/) + +## Unduh + +{% assign release = site.data.releases | where: "version", "2.7.2" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Komentar Rilis + +Terima kasih kepada *committer*, pengembang, dan pengguna yang telah +menyediakan laporan dan kontribusi sehingga memungkinkan rilis ini. From 649f0f341b9ba2f67c17d5dad0d2a90f1c2145c4 Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Fri, 18 Dec 2020 22:47:30 +0700 Subject: [PATCH 0210/1487] Fix news link to a translated news (id) --- id/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/id/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md b/id/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md index a96108a9c0..101a9c246e 100644 --- a/id/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md +++ b/id/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md @@ -163,7 +163,7 @@ berubah pada rilis *preview* berikutnya. * *Keyword argument* dipisahkan dari *argument* lainnya. * Pada dasarnya, kode yang mencetak sebuah peringatan pada Ruby 2.7 tidak akan -bekerja. Lihat [dokumen](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/) untuk detail. +bekerja. Lihat [dokumen](https://www.ruby-lang.org/id/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/) untuk detail. * Omong-omong, *argument forwarding* sekarang mendukung *leading argument*. ``` ruby From d75b6045d6e0098a7e41dab1d26f82e45297ca8a Mon Sep 17 00:00:00 2001 From: "NARUSE, Yui" Date: Mon, 21 Dec 2020 01:03:53 +0900 Subject: [PATCH 0211/1487] Ruby 3.0.0 RC1 Released (#2567) --- _data/downloads.yml | 2 +- _data/releases.yml | 28 ++ .../2020-12-20-ruby-3-0-0-rc1-released.md | 308 ++++++++++++++++++ .../2020-12-20-ruby-3-0-0-rc1-released.md | 285 ++++++++++++++++ 4 files changed, 622 insertions(+), 1 deletion(-) create mode 100644 en/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md create mode 100644 ja/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md diff --git a/_data/downloads.yml b/_data/downloads.yml index 6f321476f9..c8bbbe8244 100644 --- a/_data/downloads.yml +++ b/_data/downloads.yml @@ -4,7 +4,7 @@ # optional preview: - - 3.0.0-preview2 + - 3.0.0-rc1 stable: diff --git a/_data/releases.yml b/_data/releases.yml index 3f2710052a..11f3cd02fa 100644 --- a/_data/releases.yml +++ b/_data/releases.yml @@ -21,6 +21,34 @@ # 3.0 series +- version: 3.0.0-rc1 + date: 2020-12-20 + post: /en/news/2020/12/20/ruby-3-0-0-rc1-released/ + stats: + files_changed: 3889 + insertions: 195560 + deletions: 152740 + url: + gz: https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.0-rc1.tar.gz + zip: https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.0-rc1.zip + xz: https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.0-rc1.tar.xz + size: + gz: 19488885 + zip: 23902334 + xz: 14341128 + sha1: + gz: 34ede2128a90ef3217d9cab9efcdf20fc444f67c + zip: e3e20b4d0ec895e579ae416f2b7552c6be3596f7 + xz: deff34cf67373dca166e9961051b6c4723aaaec6 + sha256: + gz: e1270f38b969ce7b124f0a4c217e33eda643f75c7cb20debc62c17535406e37f + zip: 25ced95fa544af6a64d348dc5eace008edfda22f55ed1f6ad9f932b344e6196d + xz: f1adda082f9291e394d25ed32975abbef90962dc4c8b11130586a0151558e79a + sha512: + gz: 798926db82d27366b39be97556ac5cb322986b96df913c398449bd3ece533e484a3047fe35e7a6241dfbd0f7da803438f5b04b805b33f95c73e3e41d0bb51183 + zip: c81b3bf7ce582bf39fd7bc1e691d0777ed4cf38ca6b4d54bc9edaef076ae8bcecb6a86ebfd773591f7d8533e772517033c762d35fdc8b05cb4db4488c2bacec2 + xz: f4f13dbfa1c96088eb3dbfba0cb1fe99f4e17197ee2d4b78fbe16496780797a10daa3f2ff9c38d2d7b316974101eccf45184708ad05491fb49898b3a7cc6d673 + - version: 3.0.0-preview2 date: 2020-12-08 post: /en/news/2020/12/08/ruby-3-0-0-preview2-released/ diff --git a/en/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md b/en/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md new file mode 100644 index 0000000000..5f8424309c --- /dev/null +++ b/en/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md @@ -0,0 +1,308 @@ +--- +layout: news_post +title: "Ruby 3.0.0 RC1 Released" +author: "naruse" +translator: +date: 2020-12-20 00:00:00 +0000 +lang: en +--- + +We are pleased to announce the release of Ruby 3.0.0-rc1. + +It introduces a number of new features and performance improvements. + +## Static Analysis + +### RBS + +RBS is a language to describe the types of Ruby programs. + +Type checkers including TypeProf and other tools supporting RBS will understand Ruby programs much better with RBS definitions. + +You can write down the definition of classes and modules: methods defined in the class, instance variables and their types, and inheritance/mix-in relations. + +The goal of RBS is to support commonly seen patterns in Ruby programs and it allows writing advanced types including union types, method overloading, and generics. It also supports duck typing with _interface types_. + +Ruby 3.0 ships with `rbs` gem, which allows parsing and processing type definitions written in RBS. +The following is a small example of RBS with class, module, and constant definitions. + +``` rbs +module ChatApp + VERSION: String + class Channel + attr_reader name: String + attr_reader messages: Array[Message] + attr_reader users: Array[User | Bot] # `|` means union types, `User` or `Bot`. + def initialize: (String) -> void + def post: (String, from: User | Bot) -> Message # Method overloading is supported. + | (File, from: User | Bot) -> Message + end +end +``` + +See [README of rbs gem](https://github.com/ruby/rbs) for more detail. + +### TypeProf + +TypeProf is a type analysis tool bundled in the Ruby package. + +Currently, TypeProf serves as a kind of type inference. + +It reads plain (non-type-annotated) Ruby code, analyzes what methods are defined and how they are used, and generates a prototype of type signature in RBS format. + +Here is a simple demo of TypeProf. + +An example input: + +``` ruby +# test.rb +class User + def initialize(name:, age:) + @name, @age = name, age + end + attr_reader :name, :age +end +User.new(name: "John", age: 20) +``` + +An example output: + +``` +$ typeprof test.rb +# Classes +class User + attr_reader name : String + attr_reader age : Integer + def initialize : (name: String, age: Integer) -> [String, Integer] +end +``` + +You can run TypeProf by saving the input as "test.rb" and invoke a command called "typeprof test.rb". + +You can also [try TypeProf online](https://mame.github.io/typeprof-playground/#rb=%23+test.rb%0Aclass+User%0A++def+initialize%28name%3A%2C+age%3A%29%0A++++%40name%2C+%40age+%3D+name%2C+age%0A++end%0A++%0A++attr_reader+%3Aname%2C+%3Aage%0Aend%0A%0AUser.new%28name%3A+%22John%22%2C+age%3A+20%29&rbs=). (It runs TypeProf on the server side, so sorry if it is out!) + +See [the documentation](https://github.com/ruby/typeprof/blob/master/doc/doc.md) and [demos](https://github.com/ruby/typeprof/blob/master/doc/demo.md) for details. + +TypeProf is experimental and not so mature yet; only a subset of the Ruby language is supported, and the detection of type errors is limited. But it is still growing rapidly to improve the coverage of language features, the analysis performance, and usability. Any feedback is very welcome. + +## Ractor (experimental) +Ractor is an Actor-model like concurrent abstraction designed to provide a parallel execution feature without thread-safety concerns. + +You can make multiple ractors and you can run them in parallel. Ractor enables you to make thread-safe parallel programs because ractors can not share normal objects. Communication between ractors are supported by message passing. + +To limit sharing of objects, Ractor introduces several restrictions to the Ruby's syntax (without multiple Ractors, there is no restriction). + +The specification and implementation are not matured and may be changed in the future, so this feature is marked as experimental and show the "experimental feature" warning when the first `Ractor.new`. + +The following small program calculates `n.prime?` (`n` is relatively a big integer) in parallel with two ractors. You will confirm that the program execution is about x2 times faster compared to the sequential program on the parallel computer. + +``` ruby +require 'prime' +# n.prime? with sent integers in r1, r2 run in parallel +r1, r2 = *(1..2).map do + Ractor.new do + n = Ractor.recv + n.prime? + end +end +# send parameters +r1.send 2**61 - 1 +r2.send 2**61 + 15 +# wait for the results of expr1, expr2 +p r1.take #=> true +p r2.take #=> true +``` + +See [doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md) for more details. + +## Fiber Scheduler + +`Fiber#scheduler` is introduced for intercepting blocking operations. This allows for light-weight concurrency without changing existing code. Watch ["Don't Wait For Me, Scalable Concurrency for Ruby 3"](https://www.youtube.com/watch?v=Y29SSOS4UOc) for an overview of how it works. + +Currently supported classes/methods: + +- `Mutex#lock`, `Mutex#unlock`, `Mutex#sleep` +- `ConditionVariable#wait` +- `Queue#pop`, `SizedQueue#push` +- `Thread#join` +- `Kernel#sleep` +- `Process.wait` +- `IO#wait`, `IO#read`, `IO#write` and related methods (e.g. `#wait_readable`, `#gets`, `#puts` and so on). +- `IO#select` is *not supported*. + +(Explain Async gem with links). This example program will perform several HTTP requests concurrently: + +(Explain this:) +1. async is outer gem +2. async uses this new feature + +``` ruby +require 'async' +require 'net/http' +require 'uri' +Async do + ["ruby", "python", "c"].each do |topic| + Async do + Net::HTTP.get(URI "https://www.google.com/search?q=#{topic}") + end + end +end +``` + +## Other Notable New Features + +* One-line pattern matching is redesigned. (experimental) + * `=>` is added. It can be used as like rightward assignment. + + ```ruby + 0 => a + p a #=> 0 + + {b: 0, c: 1} => {b:} + p b #=> 0 + ``` + * `in` is changed to return `true` or `false`. + + ```ruby + # version 3.0 + 0 in 1 #=> false + + # version 2.7 + 0 in 1 #=> raise NoMatchingPatternError + ``` + +* Find pattern is added. (experimental) + ``` ruby + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + ``` +* Endless method definition is added. + ``` ruby + def square(x) = x * x + ``` +* `Hash#except` is now built-in. + ``` ruby + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + ``` +* Memory view is added as an experimental feature + * This is a new C-API set to exchange a raw memory area, such as a numeric array and a bitmap image, between extension libraries. The extension libraries can share also the metadata of the memory area that consists of the shape, the element format, and so on. Using these kinds of metadata, the extension libraries can share even a multidimensional array appropriately. This feature is designed by referring to Python's buffer protocol. + +## Performance improvements + +* Many improvements were implemented in MJIT. See NEWS in detail. +* Pasting long code to IRB is 53 times faster than bundled with Ruby 2.7.0. For example, the time required to paste [this sample code](https://gist.github.com/aycabta/30ab96334275bced5796f118c9220b0b) goes from 11.7 seconds to 0.22 seconds. + +## Other notable changes since 2.7 + +* Keyword arguments are separated from other arguments. + * In principle, code that prints a warning on Ruby 2.7 won't work. See the [document](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/) in detail. + * By the way, arguments forwarding now supports leading arguments. + ``` ruby + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end + ``` +* Pattern matching (`case/in`) is no longer experimental. +* The `$SAFE` feature was completely removed; now it is a normal global variable. +* The order of backtrace had been reversed at Ruby 2.5, and is reverted. Now it behaves like Ruby 2.4; an error message and the line number where the exception occurs are printed first, and its callers are printed later. +* Some standard libraries are updated. + * RubyGems 3.2.2 + * Bundler 2.2.2 + * IRB 1.2.6 + * Reline 0.1.5 + * Pysch 3.2.1 + * JSON 2.4.1 + * BigDecimal 3.0.0 + * CSV 3.1.9 + * Digest 3.0.0 + * Fiddle 1.0.4 + * StringIO 3.0.0 + * StringScanner 3.0.0 +* The following libraries are no longer bundled gems. + Install the corresponding gems to use these features. + * net-telnet + * xmlrpc +* The following default gems are now bundled gems. + * rexml + * rss +* The following stdlib files are now default gems and are published on rubygems.org. + * English + * abbrev + * base64 + * drb + * debug + * erb + * find + * net-ftp + * net-http + * net-imap + * net-protocol + * open-uri + * optparse + * pp + * prettyprint + * resolv-replace + * resolv + * rinda + * set + * securerandom + * shellwords + * tempfile + * tmpdir + * time + * tsort + * un + * weakref + * digest + * io-nonblock + * io-wait + * nkf + * pathname + * syslog + * win32ole + +See [NEWS](https://github.com/ruby/ruby/blob/v3_0_0_rc1/NEWS.md) +or [commit logs](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_rc1) +for more details. + +{% assign release = site.data.releases | where: "version", "3.0.0-rc1" | first %} + +With those changes, [{{ release.stats.files_changed }} files changed, {{ release.stats.insertions }} insertions(+), {{ release.stats.deletions }} deletions(-)](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0) +since Ruby 2.7.0! + +Please try Ruby 3.0.0-rc1, and give us any feedback! + +## Download + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## What is Ruby + +Ruby was first developed by Matz (Yukihiro Matsumoto) in 1993, +and is now developed as Open Source. It runs on multiple platforms +and is used all over the world especially for web development. diff --git a/ja/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md b/ja/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md new file mode 100644 index 0000000000..3e69eac879 --- /dev/null +++ b/ja/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md @@ -0,0 +1,285 @@ +--- +layout: news_post +title: "Ruby 3.0.0 RC1 リリース" +author: "naruse" +translator: +date: 2020-12-20 00:00:00 +0000 +lang: ja +--- + +Ruby 3.0に向けてフィードバックを得るためのリリースである、Ruby 3.0.0-rc1が公開されました。 + +Ruby 3.0には、多くの新しい機能やパフォーマンスの改善が含まれます。 その一部を以下に紹介します。 + +## 静的解析 + +### RBS + +RBSはRubyプログラムの型を記述するための言語です。 + +TypeProfなどの型検査ツールを初めとする静的解析を行うツールは、RBSを利用することでRubyプログラムをより精度良く解析することができます。 + +RBSでは、Rubyプログラムのクラスやモジュールの型を定義します。メソッドやインスタンス変数、定数とその型、継承やmixinなどの関係などが記述できます。 + +RBSはRubyプログラムに頻出するパターンをサポートするように設計されており、ユニオン型、メソッドオーバーロード、ジェネリクスなどの機能を提供します。さらに「インタフェース型」によってダックタイピングをサポートします。 + +Ruby 3.0には、このRBS言語で書かれた型定義を処理するためのライブラリである `rbs` gemが同梱されています。 + +クラスやモジュール、定数を定義する、簡単なRBSの例を示します。 + +``` rbs +module ChatApp + VERSION: String + class Channel + attr_reader name: String + attr_reader messages: Array[Message] + attr_reader users: Array[User | Bot] # `|` は `User` か `Bot` のインスタンスを表現する「ユニオン型」です + def initialize: (String) -> void + def post: (String, from: User | Bot) -> Message # メソッドオーバーロードを記述することもできます + | (File, from: User | Bot) -> Message + end +end +``` + +詳細については、[rbs gemのREADME](https://github.com/ruby/rbs)を参照してください。 + +### TypeProf + +TypeProf は Ruby パッケージに同梱された型解析ツールです。 + +TypeProf の現在の主な用途は一種の型推論です。 + +型注釈の無い普通の Ruby コードを入力し、どんなメソッドが定義されどのように使われているかを解析し、型シグネチャのプロトタイプを RBS フォーマットで生成します。 + +次は TypeProf の簡単なデモです。 + +サンプル入力 + +``` ruby +# test.rb +class User + def initialize(name:, age:) + @name, @age = name, age + end + attr_reader :name, :age +end +User.new(name: "John", age: 20) +``` + +サンプル出力 + +``` +$ typeprof test.rb +# Classes +class User + attr_reader name : String + attr_reader age : Integer + def initialize : (name: String, age: Integer) -> [String, Integer] +end +``` + +サンプル入力を"test.rb"という名前で保存し、`typeprof test.rb`というコマンドで TypeProf の解析ができます。 + +[TypeProf をオンラインで試す](https://mame.github.io/typeprof-playground/#rb=%23+test.rb%0Aclass+User%0A++def+initialize%28name%3A%2C+age%3A%29%0A++++%40name%2C+%40age+%3D+name%2C+age%0A++end%0A++%0A++attr_reader+%3Aname%2C+%3Aage%0Aend%0A%0AUser.new%28name%3A+%22John%22%2C+age%3A+20%29&rbs=)こともできます(サーバサイドで TypeProf を動かしているので、サーバが落ちたらごめんなさい)。 + +詳しくは[ドキュメント](https://github.com/ruby/typeprof/blob/master/doc/doc.md)や[デモ](https://github.com/ruby/typeprof/blob/master/doc/demo.md)を見てください。 + +残念ながら TypeProf はまだ実験的で、あまり完成度は高くありません。Ruby 言語のサブセットだけがサポートされていて、型エラー検出の機能は限定的です。ですがいま急速に改良中であり、言語機能のカバレッジ増強、解析効率の向上、利便性の向上などを行っています。フィードバックを歓迎します。 + +## Ractor (experimental) + +Ractor はアクターモデル風の並行・並列制御機構であり、スレッド安全に関する懸念なく、Rubyで並列処理を行うための機能として設計されています。 + +複数のRactorを作成すると、それらは並列計算機上で並列に実行されます。Ractor間では、ほとんどのオブジェクトが共有できないように設計されているため、スレッド安全なプログラムにすることができます。メッセージの送受信により、Ractor間のコミュニケーションを行うことが可能です。 + +Ractor間でのオブジェクトの共有を制限するために、複数Ractorでの実行時には、いくつかのRubyの機能に制限が入ります(ただし、複数のRactorを用いない場合には、これまでのRubyと何も変わりません)。 + +Ractorの仕様と実装は、まだ発展途上であるため、実験的機能として提供されます。初回のRactorの生成時には実験的機能であることが警告で表示されます。 + +次の小さなプログラムでは、二つのRactorを用いて`n.prime?`(`n`は比較的大きな値)の計算を並列に実行します。動かしてみると、逐次実行にくらべて、2コア以上の計算機で計算時間が半分程度になることが確認できます。 + +``` ruby +require 'prime' +# n.prime? with sent integers in r1, r2 run in parallel +r1, r2 = *(1..2).map do + Ractor.new do + n = Ractor.receive + n.prime? + end +end +# send parameters +r1.send 2**61 - 1 +r2.send 2**61 + 15 +# wait for the results of expr1, expr2 +p r1.take #=> true +p r2.take #=> true +``` + +より詳細は、[doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md) をご覧ください。 + +## Scheduler (experimental) + +`Thread#scheduler` is introduced for intercepting blocking operations. This allows for light-weight concurrency without changing existing code. Watch ["Don't Wait For Me, Scalable Concurrency for Ruby 3"](https://www.youtube.com/watch?v=Y29SSOS4UOc) for an overview of how it works. +Currently supported classes/methods: + +- `Mutex#lock`, `Mutex#unlock`, `Mutex#sleep` +- `ConditionVariable#wait` +- `Queue#pop`, `SizedQueue#push` +- `Thread#join` +- `Kernel#sleep` +- `IO#wait`, `IO#read`, `IO#write` and related methods (e.g. `#wait_readable`, `#gets`, `#puts` and so on). +- `IO#select` is *not supported*. + +The current entry point for concurrency is `Fiber.schedule{...}` however this is subject to change by the time Ruby 3 is released. + +Currently, there is a test scheduler available in [`Async::Scheduler`](https://github.com/socketry/async/pull/56). See [`doc/scheduler.md`](https://github.com/ruby/ruby/blob/master/doc/scheduler.md) for more details. + +## その他の主要な新機能 + +* 1行パターンマッチが再設計されました。 (experimental) + * `=>` を新たに使うようになりました。右代入のように使うことができます。 + + ```ruby + 0 => a + p a #=> 0 + + {b: 0, c: 1} => {b:} + p b #=> 0 + ``` + * `in` は `true` または `false` を返すようになりました。 + + ```ruby + # version 3.0 + 0 in 1 #=> false + + # version 2.7 + 0 in 1 #=> raise NoMatchingPatternError + ``` +* findパターンが追加されました。 (experimental) + ``` ruby + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + ``` + +* 一行メソッド定義が書けるようになりました。 + ``` ruby + def square(x) = x * x + ``` + +* `Hash#except` が組み込みになりました。 + ``` ruby + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + ``` +## パフォーマンスの改善 + +* MJITに多数の改善が行われています。詳細はNEWSを参照してください。 +* IRB への長いコードの貼り付けは、Ruby 2.7.0 にバンドルされているものと比較して 53 倍の速さになります。例えば、[このサンプルコード](https://gist.github.com/aycabta/30ab96334275bced5796f118c9220b0b)の貼り付けに要する時間は、11.7 秒から 0.22 秒になります。 + +## その他の注目すべき 2.7 からの変更点 + +* キーワード引数が通常の引数から分離されました。 + * 原則として、2.7 で警告の出ていたコードは動かなくなります。詳細は[別ドキュメント](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/)を参照してください。 + * 関連して、引数のフォワーディングの記法で先頭に引数を書けるようになりました。 + ``` ruby + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end + ``` +* パターンマッチ(`case/in`)が実験的な機能ではなくなりました。 +* `$SAFE` の機能が完全に削除され、ただのグローバル変数となりました。 +* バックトレースの順序は2.5で逆転しましたが、3.0ではこれを取りやめることになりました。例外が起きた行が先に表示され、呼び出し元が後に表示されるように戻ります。 +* いくつかの標準ライブラリがアップデートされました。 + * RubyGems 3.2.2 + * Bundler 2.2.2 + * IRB 1.2.6 + * Reline 0.1.5 + * Pysch 3.2.1 + * JSON 2.4.1 + * BigDecimal 3.0.0 + * CSV 3.1.9 + * Digest 3.0.0 + * Fiddle 1.0.4 + * StringIO 3.0.0 + * StringScanner 3.0.0 +* 以下のライブラリは標準添付ライブラリから削除されました。3.0 以降で使いたい場合は rubygems から利用してください。 + * net-telnet + * xmlrpc +* 以下のライブラリが新たに bundled gems になりました。Bundler から利用する場合は Gemfile に明示的に指定してください。 + * rexml + * rss +* 以下のライブラリが新たに default gems になりました。rubygems.org からアップデート可能です。 + * English + * abbrev + * base64 + * drb + * debug + * erb + * find + * net-ftp + * net-http + * net-imap + * net-protocol + * open-uri + * optparse + * pp + * prettyprint + * resolv-replace + * resolv + * rinda + * set + * securerandom + * shellwords + * tempfile + * tmpdir + * time + * tsort + * un + * weakref + * digest + * io-nonblock + * io-wait + * nkf + * pathname + * syslog + * win32ole + +その他詳細については、[NEWS](https://github.com/ruby/ruby/blob/v3_0_0_rc1/NEWS.md) ファイルまたは[コミットログ](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_rc1)を参照してください。 + +{% assign release = site.data.releases | where: "version", "3.0.0-rc1" | first %} + +なお、こうした変更により、Ruby 2.7.0 以降では [{{ release.stats.files_changed }} 個のファイルに変更が加えられ、{{ release.stats.insertions }} 行の追加と {{ release.stats.deletions }} 行の削除が行われました](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0) ! + +ぜひ Ruby 3.0.0-rc1 を試して、フィードバックをお願いします! + +## ダウンロード + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Ruby とは + +Rubyはまつもとゆきひろ (Matz) によって1993年に開発が始められ、今もオープンソースソフトウェアとして開発が続けられています。Rubyは様々なプラットフォームで動き、世界中で、特にWebアプリケーション開発のために使われています。 From 0e22e3de5c74a55ce7b8ca5f06634ab3a1b47364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20T=C3=A1mara=20Pati=C3=B1o?= Date: Sun, 20 Dec 2020 12:01:53 -0500 Subject: [PATCH 0212/1487] Translate Ruby 3.0.0-preview2 released (es) (#2568) * Translate Ruby 3.0.0-previe2 released (es) --- ...2020-12-08-ruby-3-0-0-preview2-released.md | 366 ++++++++++++++++++ 1 file changed, 366 insertions(+) create mode 100644 es/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md diff --git a/es/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md b/es/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md new file mode 100644 index 0000000000..9329ac757c --- /dev/null +++ b/es/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md @@ -0,0 +1,366 @@ +--- +layout: news_post +title: "Publicado Ruby 3.0.0 versión previa 2" +author: "naruse" +translator: vtamara +date: 2020-12-08 00:00:00 +0000 +lang: es +--- + +Nos complace anunciar la publicación de Ruby 3.0.0-preview2. + +Introduce una serie de características nuevas y mejoras en +desempeño. + +## Análisis Estático + +###RBS + +RBS es un lenguaje para describir los tipos de los programas Ruby. + +Los verificadores de tipos, incluyendo TypeProf y otras herramientas +que soporten RBS entenderán mejor los programas Ruby con definiciones RBS. + +Usted puede escribir la definición de clases y módulos: métodos que se +definen en la clase, variables de instancia y sus tipos, y relaciones +herencia/mix-in. + +El objetivo de RBS es soportar los patrones que comúnmente se ven +en programas en Ruby y permitir escribir tipos avanzados incluyendo +tipos unión, sobrecarga de métodos y genéricos. También soporta tipado +pato (duck typing) con _tipos de interfaz_. + +Ruby 3.0 se distribuye con la gema `rbs`, que permite analizar +y procesar definiciones de tipos escritas en RBS. +El siguiente es un pequeño ejemplo de RBS con una clase, un modulo y +definiciones de constantes. + +``` rbs +module AplicacionMensajeria + VERSION: String + class Channel + attr_reader nombre: String + attr_reader mensajes: Array[Mensaje] + attr_reader usuarios: Array[Usuario | Robot] # `|` significa tipos unión, `Usuario` o `Robot`. + + def initialize: (String) -> void + + def publicar: (String, de: Usuario | Robot) -> Mensaje # Se soporta sobrecarga de métodos. + | (File, de: Usuaurio | Robot) -> Mensaje + end +end +``` + +Ver más detalles en el +[archivo README de la gema rbs](https://github.com/ruby/rbs). + + +### TypeProf + +TypeProf es una herramienta para análisis de tipos incluida en el paquete +Ruby. + +Actualmente, TypeProf sirve como una forma de inferencia de tipos. + +Lee código Ruby plano (sin anotiaciones de tipos), analiza que métodos se +definen y como se usan, y genera un prototipo de la firma de los tipos en +formato RBS. + +Aquí hay una simple demostración de TypeProf. + +Entrada de ejemplo: + +``` ruby +# test.rb +class User + def initialize(name:, age:) + @name, @age = name, age + end + attr_reader :name, :age +end +User.new(name: "John", age: 20) +``` + +Salida de ejemplo: + +``` +$ typeprof test.rb +# Classes +class User + attr_reader name : String + attr_reader age : Integer + def initialize : (name: String, age: Integer) -> [String, Integer] +end +``` + +Puede ejecutar TypeProf guardando el archivo de entrada como "test.rb" y +ejecutandolo como "typeprof test.rb". + +También puede [probar TypeProf en línea](https://mame.github.io/typeprof-playground/#rb=%23+test.rb%0Aclass+User%0A++def+initialize%28name%3A%2C+age%3A%29%0A++++%40name%2C+%40age+%3D+name%2C+age%0A++end%0A++%0A++attr_reader+%3Aname%2C+%3Aage%0Aend%0A%0AUser.new%28name%3A+%22John%22%2C+age%3A+20%29&rbs=). (TypeProf corre al lado del servidor, así que ¡disculpe si no está operando!) + +Ver detalles en [la documentación](https://github.com/ruby/typeprof/blob/master/doc/doc.md) y en [demostraciones](https://github.com/ruby/typeprof/blob/master/doc/demo.md). + +TypeProf es experimental y aún no es una herramienta madura, sólo soporta un +subconjunto del lenguaje Ruby, y la detección de errores en tipos es limitada. +Pero está creciendo rapidamente para mejorar la cobertura de las +características del lenguaje, el desempeño del análisis y la usabilidad. +Toda retroalimentación es bienvenida. + +## Ractor (experimental) + +Un Ractor es una abstracción de concurrencia al estilo Actor-modelo, +diseñada para brindar una forma de ejecución en paralelo sin +preocuparse por la seguridad de los hilos (thread-safe) de ejecución. + +Puede crear múltiples ractors y puede ejecutarlos en paralelo. +Un Ractor permite hacer programas paralelos con seguridad en los hilos +de ejecución porque los ractors no comparten objetos normales. +La comunicación entre ractors se soporta mediante envío de +mensajes. + +Para limitar los objetos que se comparten, Ractor introduce diversas +restricciones a la sintaxis de Ruby (no hay cambio cuando no hay múltiples +Ractors). + +La especificación e implementación no es madura y podría cambiar a +futuro, por eso esta característica se señala como experimental +y con el primer `Ractor.new` se presenta una advertencia de característica +experimental. + +El siguiente programita calcula `prime?` en paralelo con dos +ractores. Podrá comprobar que la ejecución es casi 2 veces más rápida +que la del programa secuencial en un computador paralelo. + +``` ruby +require 'prime' + +# n.prime? con enteros enviados en r1, r2 que corren en paralelo +r1, r2 = *(1..2).map do + Ractor.new do + n = Ractor.recv + n.prime? + end +end + +# enviar parámetros +r1.send 2**61 - 1 +r2.send 2**61 + 15 + +# esperar resultados de expr1 y expr2 +p r1.take #=> true +p r2.take #=> true +``` + +Ver más detalles en +[doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md). + + +## Planificador (__Scheduler__) de Fibras + +Se introduce `Fiber#scheduler` para interceptar operaciones que bloquean. +Esto permite una concurrencia liviana sin cambiar el +código existente. Dar un vistazo general y ver como funciona en ["Don't Wait For Me, Scalable Concurrency for Ruby 3"](https://www.youtube.com/watch?v=Y29SSOS4UOc). + +Los métodos y clases que se soportan en el momento son: + +- `Mutex#lock`, `Mutex#unlock`, `Mutex#sleep` +- `ConditionVariable#wait` +- `Queue#pop`, `SizedQueue#push` +- `Thread#join` +- `Kernel#sleep` +- `Process.wait` +- `IO#wait`, `IO#read`, `IO#write` y métodos relacionados (e.g. + `#wait_readable`, `#gets`, `#puts` y así sucesivamente). +- `IO#select` *no es soportado*. + +El actual punto de entrada para la concurrencia es +`Fiber.schedule{...}` sin embargo está sujeto a cambios para +cuando se publique Ruby 3. + +(Explicar la gema Async con enlaces). Este programa de ejemplo realizará +varias peticiones HTTP de manera concurrente: +(Explicar esto:) +1. async es una gema exterior +2. async usa esta nueva característica + +``` ruby +require 'async' +require 'net/http' +require 'uri' +Async do + ["ruby", "python", "c"].each do |topic| + Async do + Net::HTTP.get(URI "https://www.google.com/search?q=#{topic}") + end + end +end +``` + + +## Otras características notables + +* El reconocimiento de patrones en una línea ahora usa `=>` en lugar + de `in`. + + ``` ruby + # version 3.0 + {a: 0, b: 1} => {a:} + p a # => 0 + # version 2.7 + {a: 0, b: 1} in {a:} + p a # => 0 + ``` + +* Se agrega un patrón Encontrar (__Find__). + + ``` ruby + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + ``` + +* Se agrega una definición de métodos que no requiere `end`. + + ``` ruby + def cuadrado(x) = x * x + ``` + +* `Hash#except` ahora es un método incorporado. + + ``` ruby + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + ``` + +* __Memory view__ se agrega como característica experimental + + * Este es un nuevo conjunto de llamados en la API de C para intercambiar + áreas de memoria puras entre las librerías que son extensiones, por + ejemplo para intercambiar un arreglo numérico con un mapa de bits. + Las librerías que son extensiones pueden compartir también los + metadatos del área de memoria que constan de la forma, el formato del + elemento y así sucesivamente. Usando esta clase de metadatos, las + librerías que son extensiones pueden compartir apropiadamente incluso un + arreglo multidimensional. Esta nueva característica se diseñó empleando + como referencia el protocolo de colchón (__buffer__ ) de Python. + +## Mejoras en desempeño + +* Se implemetaron muchas mejoras en MJIT. Ver detalles en el archivo + NEWS. +* Pegar código largo en IRB es 53 veces más rápido que con Ruby 2.7.0. + Por ejemplo el tiempo requerido para pegar [este código de ejemplo](https://gist.github.com/aycabta/30ab96334275bced5796f118c9220b0b) + pasa de 11.7 segundos a 0.22 segundos. + + +## Otros cambios notables desde 2.7 + +* Los argumentos de palabra clave se separan de otros argumentos. + * En principio, el código que presente una advertencia en Ruby 2.7 no + funcionará. Ver detalles en + [este documento](https://www.ruby-lang.org/es/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/). + * Por cierto, el re-envío de argumentos ahora soporta argumentos principales. + ``` ruby + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end + ``` + +* La característica `$SAFE` se eliminó por completo; ahora es una variable + global normal. + +* El orden de la traza de llamados (__backtrace__) se había invertido + en Ruby 2.5, pero esto se ha revertido. Ahora se comporta como + Ruby 2.4; se imprime primero un mensaje de error y el número de línea donde + ocurrió la excepción; las funciones que había hecho la llamada se imprimen + después. + +* Se actualizaron algunas librerías estándar. + * RubyGems 3.2.0.rc.1 + * Bundler 2.2.0.rc.1 + * IRB 1.2.6 + * Reline 0.1.5 + +* Las siguientes librerías ya no son gemas distribuidas con Ruby. + Instale las gemas correspondientes para usar sus funcionalidades. + * net-telnet + * xmlrpc + +* Las siguientes gemas por omisión se volvieron gemas distribuidas + con Ruby. + * rexml + * rss + +* Los siguientes archivos de stdlib ahora son gemas y se publicaron en + rubygems.org. + * abbrev + * base64 + * English + * erb + * find + * io-nonblock + * io-wait + * net-ftp + * net-http + * net-imap + * net-protocol + * nkf + * open-uri + * optparse + * resolv + * resolv-replace + * rinda + * securerandom + * set + * shellwords + * tempfile + * time + * tmpdir + * tsort + * weakref + +Ver más detalles en el archivo +[NEWS](https://github.com/ruby/ruby/blob/v3_0_0_preview2/NEWS.md) +o [en la bitácora de contribuciones](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_preview2). + +{% assign release = site.data.releases | where: "version", "3.0.0-preview2" | first %} + +Con estos cambios, [{{ release.stats.files_changed }} archivos cambiados, {{ release.stats.insertions }} inserciones(+), {{ release.stats.deletions }} eliminaciones(-)](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0) +desde Ruby 2.7.0! + +¡Por favor pruebe Ruby 3.0.0-preview2, y denos cualquier retroalimentación! + +## Descargas + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + + +## Qué es Ruby + +Ruby fue desarrollado inicialmente por Matz (Yukihiro Matsumoto) en 1993, +y ahora es desarrollado como código abierto. Corre en muchas +plataformas y se usa en todas partes del mundo especialmente para +desarrollos web. From 259ef2901f83c8f0442c30a6ad303c06d977d914 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Mon, 21 Dec 2020 22:31:14 +0100 Subject: [PATCH 0213/1487] Update rouge to 3.25.0 Remove restriction to rouge < 3.24.0 and update rouge. The bug in rouge 3.24.0 concerning syntax highlighting of regular expressions has been fixed in version 3.25.0, see * https://github.com/rouge-ruby/rouge/issues/1618 * https://github.com/rouge-ruby/rouge/pull/1624 --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 86d3d10afa..43685579d2 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ ruby "~> 2.7.2" gem "rake" gem "jekyll", "~> 4.0" -gem "rouge", "< 3.24.0" +gem "rouge" gem "unicorn" gem "lanyon" diff --git a/Gemfile.lock b/Gemfile.lock index 8e9a4b977c..ad86aa304c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -68,7 +68,7 @@ GEM rb-inotify (0.10.1) ffi (~> 1.0) rexml (3.2.4) - rouge (3.23.0) + rouge (3.25.0) safe_yaml (1.0.5) sassc (2.4.0) ffi (~> 1.9) @@ -106,7 +106,7 @@ DEPENDENCIES rack-rewrite rack-ssl rake - rouge (< 3.24.0) + rouge spidr (~> 0.6) unicorn validate-website (~> 1.6) From a8abc9c499da32ba12e7e295323017d5aee430e4 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Mon, 21 Dec 2020 23:17:27 +0100 Subject: [PATCH 0214/1487] Fix wrong indentation of code blocks in 3.0.0-rc1 post Indenting the code blocks too much causes surplus leading spaces on the rendered page. --- .../2020-12-20-ruby-3-0-0-rc1-released.md | 68 ++++++++++------- .../2020-12-20-ruby-3-0-0-rc1-released.md | 73 +++++++++++-------- 2 files changed, 81 insertions(+), 60 deletions(-) diff --git a/en/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md b/en/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md index 5f8424309c..f04fb8490b 100644 --- a/en/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md +++ b/en/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md @@ -86,6 +86,7 @@ See [the documentation](https://github.com/ruby/typeprof/blob/master/doc/doc.md) TypeProf is experimental and not so mature yet; only a subset of the Ruby language is supported, and the detection of type errors is limited. But it is still growing rapidly to improve the coverage of language features, the analysis performance, and usability. Any feedback is very welcome. ## Ractor (experimental) + Ractor is an Actor-model like concurrent abstraction designed to provide a parallel execution feature without thread-safety concerns. You can make multiple ractors and you can run them in parallel. Ractor enables you to make thread-safe parallel programs because ractors can not share normal objects. Communication between ractors are supported by message passing. @@ -152,45 +153,54 @@ end ## Other Notable New Features * One-line pattern matching is redesigned. (experimental) + * `=>` is added. It can be used as like rightward assignment. - ```ruby - 0 => a - p a #=> 0 + ```ruby + 0 => a + p a #=> 0 + + {b: 0, c: 1} => {b:} + p b #=> 0 + ``` - {b: 0, c: 1} => {b:} - p b #=> 0 - ``` * `in` is changed to return `true` or `false`. - ```ruby - # version 3.0 - 0 in 1 #=> false + ```ruby + # version 3.0 + 0 in 1 #=> false - # version 2.7 - 0 in 1 #=> raise NoMatchingPatternError - ``` + # version 2.7 + 0 in 1 #=> raise NoMatchingPatternError + ``` * Find pattern is added. (experimental) - ``` ruby - case ["a", 1, "b", "c", 2, "d", "e", "f", 3] - in [*pre, String => x, String => y, *post] - p pre #=> ["a", 1] - p x #=> "b" - p y #=> "c" - p post #=> [2, "d", "e", "f", 3] - end - ``` + + ``` ruby + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + ``` + * Endless method definition is added. - ``` ruby - def square(x) = x * x - ``` + + ``` ruby + def square(x) = x * x + ``` + * `Hash#except` is now built-in. - ``` ruby - h = { a: 1, b: 2, c: 3 } - p h.except(:a) #=> {:b=>2, :c=>3} - ``` + + ``` ruby + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + ``` + * Memory view is added as an experimental feature + * This is a new C-API set to exchange a raw memory area, such as a numeric array and a bitmap image, between extension libraries. The extension libraries can share also the metadata of the memory area that consists of the shape, the element format, and so on. Using these kinds of metadata, the extension libraries can share even a multidimensional array appropriately. This feature is designed by referring to Python's buffer protocol. ## Performance improvements @@ -203,11 +213,13 @@ end * Keyword arguments are separated from other arguments. * In principle, code that prints a warning on Ruby 2.7 won't work. See the [document](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/) in detail. * By the way, arguments forwarding now supports leading arguments. + ``` ruby def method_missing(meth, ...) send(:"do_#{ meth }", ...) end ``` + * Pattern matching (`case/in`) is no longer experimental. * The `$SAFE` feature was completely removed; now it is a normal global variable. * The order of backtrace had been reversed at Ruby 2.5, and is reverted. Now it behaves like Ruby 2.4; an error message and the line number where the exception occurs are printed first, and its callers are printed later. diff --git a/ja/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md b/ja/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md index 3e69eac879..8a38c91b0c 100644 --- a/ja/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md +++ b/ja/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md @@ -137,45 +137,52 @@ Currently, there is a test scheduler available in [`Async::Scheduler`](https://g ## その他の主要な新機能 * 1行パターンマッチが再設計されました。 (experimental) - * `=>` を新たに使うようになりました。右代入のように使うことができます。 - ```ruby - 0 => a - p a #=> 0 + * `=>` を新たに使うようになりました。右代入のように使うことができます。 + + ```ruby + 0 => a + p a #=> 0 + + {b: 0, c: 1} => {b:} + p b #=> 0 + ``` - {b: 0, c: 1} => {b:} - p b #=> 0 - ``` * `in` は `true` または `false` を返すようになりました。 - ```ruby - # version 3.0 - 0 in 1 #=> false + ```ruby + # version 3.0 + 0 in 1 #=> false + + # version 2.7 + 0 in 1 #=> raise NoMatchingPatternError + ``` - # version 2.7 - 0 in 1 #=> raise NoMatchingPatternError - ``` * findパターンが追加されました。 (experimental) - ``` ruby - case ["a", 1, "b", "c", 2, "d", "e", "f", 3] - in [*pre, String => x, String => y, *post] - p pre #=> ["a", 1] - p x #=> "b" - p y #=> "c" - p post #=> [2, "d", "e", "f", 3] - end - ``` + + ``` ruby + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + ``` * 一行メソッド定義が書けるようになりました。 - ``` ruby - def square(x) = x * x - ``` + + ``` ruby + def square(x) = x * x + ``` * `Hash#except` が組み込みになりました。 - ``` ruby - h = { a: 1, b: 2, c: 3 } - p h.except(:a) #=> {:b=>2, :c=>3} - ``` + + ``` ruby + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + ``` + ## パフォーマンスの改善 * MJITに多数の改善が行われています。詳細はNEWSを参照してください。 @@ -186,11 +193,13 @@ Currently, there is a test scheduler available in [`Async::Scheduler`](https://g * キーワード引数が通常の引数から分離されました。 * 原則として、2.7 で警告の出ていたコードは動かなくなります。詳細は[別ドキュメント](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/)を参照してください。 * 関連して、引数のフォワーディングの記法で先頭に引数を書けるようになりました。 + ``` ruby - def method_missing(meth, ...) - send(:"do_#{ meth }", ...) - end + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end ``` + * パターンマッチ(`case/in`)が実験的な機能ではなくなりました。 * `$SAFE` の機能が完全に削除され、ただのグローバル変数となりました。 * バックトレースの順序は2.5で逆転しましたが、3.0ではこれを取りやめることになりました。例外が起きた行が先に表示され、呼び出し元が後に表示されるように戻ります。 From e09e0ab45f04af9a647b264f7f6caa31d1af060e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20Ar=C4=B1l=C4=B1k?= Date: Tue, 22 Dec 2020 08:22:24 +0300 Subject: [PATCH 0215/1487] Translate 3.0.0 RC1 post (tr) (#2571) --- .../2020-12-20-ruby-3-0-0-rc1-released.md | 328 ++++++++++++++++++ 1 file changed, 328 insertions(+) create mode 100644 tr/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md diff --git a/tr/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md b/tr/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md new file mode 100644 index 0000000000..99528740e6 --- /dev/null +++ b/tr/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md @@ -0,0 +1,328 @@ +--- +layout: news_post +title: "Ruby 3.0.0 RC1 Yayınlandı" +author: "naruse" +translator: "ismailarilik" +date: 2020-12-20 00:00:00 +0000 +lang: tr +--- + +Ruby 3.0.0-rc1'in yayınlandığını duyurmaktan memnuniyet duyuyoruz. + +Bu sürüm birçok yeni özellik ve performans iyileştirmesi içermektedir. + +## Statik Analiz + +### RBS + +RBS, Ruby programlarındaki tipleri tanımlamada kullanılan bir dildir. + +RBS'yi destekleyen tip kontrol edicileri (TypeProf ve diğer araçlar da dahil), RBS tanımlamaları ile birlikte Ruby programlarını çok daha iyi anlayacaklardır. + +RBS ile sınıfların ve modüllerin tanımını yazabilirsiniz: bir sınıfta tanımlanmış metodlar, örnek değişkenleri ve bu değişkenlerin tipleri, ve miras/mix-in ilişkisi. + +RBS'nin amacı Ruby programlarında sıkça görülen desenleri desteklemektir. +RBS, union tiplerinin de dahil olduğu gelişmiş tipleri, metod aşırı yüklemeyi, ve genelleyicileri yazmaya izin verir. +Ayrıca _arayüz tipleri_ ile ördek tiplemesini de destekler. + +Ruby 3.0 `rbs` gem'i ile gelmektedir, bu gem RBS ile yazılmış tip tanımlarını ayrıştırma ve işlemeye izin verir. +Aşağıdaki kod sınıf, modül ve sabit tanımlamalarını içeren, RBS için küçük bir örnektir. + +``` rbs +module ChatApp + VERSION: String + class Channel + attr_reader name: String + attr_reader messages: Array[Message] + attr_reader users: Array[User | Bot] # `|`, union tip anlamına gelmektedir, `User` ya da `Bot`. + def initialize: (String) -> void + def post: (String, from: User | Bot) -> Message # Metod aşırı yükleme destekleniyor. + | (File, from: User | Bot) -> Message + end +end +``` + +Daha fazla ayrıntı için [rbs gem'inin README](https://github.com/ruby/rbs)'sine bakınız. + +### TypeProf + +TypeProf, Ruby ile paketlenmiş bir tip analizi aracıdır. + +Şu anda TypeProf, bir çeşit tip çıkarımı olarak hizmet vermektedir. + +TypeProf, sade (tiplerin belirtilmediği) Ruby kodunu okur, hangi metodların tanımlandığını ve bu metodların nasıl kullanıldığını analiz eder, ve RBS biçiminde prototip bir tip imzası oluşturur. + +İşte basit bir TypeProf demosu. + +Örnek bir girdi: + +``` ruby +# test.rb +class User + def initialize(name:, age:) + @name, @age = name, age + end + attr_reader :name, :age +end +User.new(name: "John", age: 20) +``` + +Örnek bir çıktı: + +``` +$ typeprof test.rb +# Classes +class User + attr_reader name : String + attr_reader age : Integer + def initialize : (name: String, age: Integer) -> [String, Integer] +end +``` + +TypeProf'u, girdiyi "test.rb" olarak kaydederek ve "typeprof test.rb" komutunu çağırarak çalıştırabilirsiniz. + +Ayrıca [TypeProf'u çevrimiçi deneyebilirsiniz](https://mame.github.io/typeprof-playground/#rb=%23+test.rb%0Aclass+User%0A++def+initialize%28name%3A%2C+age%3A%29%0A++++%40name%2C+%40age+%3D+name%2C+age%0A++end%0A++%0A++attr_reader+%3Aname%2C+%3Aage%0Aend%0A%0AUser.new%28name%3A+%22John%22%2C+age%3A+20%29&rbs=). +(Burası TypeProf'u sunucu tarafında çalıştırır, yani eğer çalışmazsa kusura bakmayın!) + +Ayrıntılar için [belgelendirmeye](https://github.com/ruby/typeprof/blob/master/doc/doc.md) ve [demolara](https://github.com/ruby/typeprof/blob/master/doc/demo.md) bakın. + +TypeProf şu anda deneysel ve oturmuş değil; Ruby'nin sadece bir alt kümesi destekleniyor, ve tip hatalarının tespit edilmesi kısıtlıdır. +Fakat TypeProf, dil özelliklerinin kapsamasını, analiz performansını ve kullanılırlığı hızlıca artırmak için gelişmektedir. +Herhangi bir geri bildirime çok ihtiyacımız var. + +## Ractor (deneysel) + +Ractor, thread güvenliği endişeleri olmadan paralel çalıştırma özelliğini sağlamak için tasarlanan eşzamanlı soyutlama gibi bir aktör-modeldir. + +Birden fazla ractor yapabilirsiniz ve bunları paralelde çalıştırabilirsiniz. +Ractor thread-güvenli paralel programlar yapmanıza izin verir çünkü ractor'lar normal nesneleri paylaşmazlar. +Ractor'lar arasındaki iletişim mesaj geçirme ile desteklenir. + +Nesnelerin paylaşılmasını kısıtlamak için Ractor, Ruby'nin sözdizimine bazı kısıtlamalar getirir (birden fazla Ractor yoksa, değişiklik yoktur). + +Belirtim ve gerçekleme henüz tam oturmamıştır ve ileride değişecektir, bu sebeple bu özellik deneysel olarak işaretlenmiştir ve ilk `Ractor.new`'de "deneysel özellik" uyarısı gösterilir. + +Aşağıdaki küçük program `n.prime?`'ı (`n` nispeten büyük bir tamsayıdır) iki ractor ile paralelde hesaplar. +Bu programın çalışması paralel bilgisayarda ardışık bir programa göre aşağı yukarı 2 kat daha hızlıdır. + +``` ruby +require 'prime' +# r1 ve r2'deki, tamsayıların gönderildiği n.prime? paralelde çalışır +r1, r2 = *(1..2).map do + Ractor.new do + n = Ractor.recv + n.prime? + end +end +# parametreleri gönder +r1.send 2**61 - 1 +r2.send 2**61 + 15 +# 1. ve 2. deyimin sonuçlarını bekle +p r1.take #=> true +p r2.take #=> true +``` + +Daha fazla ayrıntı için [doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md)'ye bakın. + +## Fiber Zamanlayıcı + +`Fiber#scheduler` bloklayan işlemleri kesmek için tanıtılmıştır. +Bu, var olan kodu değiştirmeden hafif eşzamanlılığa izin verir. +Nasıl çalıştığının genel bir bakış için ["Beni Bekleme, Ruby 3'te Ölçeklenebilir Eşzamanlılık"](https://www.youtube.com/watch?v=Y29SSOS4UOc)'ı izleyin. + +Şu anda desteklenen sınıf ve metodlar: + +- `Mutex#lock`, `Mutex#unlock`, `Mutex#sleep` +- `ConditionVariable#wait` +- `Queue#pop`, `SizedQueue#push` +- `Thread#join` +- `Kernel#sleep` +- `Process.wait` +- `IO#wait`, `IO#read`, `IO#write` ve ilişkili metodlar (`#wait_readable`, `#gets`, `#puts`, vb. gibi). +- `IO#select` *desteklenmemektedir*. + +(Async gem'ini bağlantılarla açıkla). +Bu örnek program birden çok HTTP isteğini eşzamanlı olarak gerçekleştirecektir: + +(Bunu açıkla:) +1. async dışsal bir gem +2. async bu yeni özelliği kullanır + +``` ruby +require 'async' +require 'net/http' +require 'uri' +Async do + ["ruby", "python", "c"].each do |topic| + Async do + Net::HTTP.get(URI "https://www.google.com/search?q=#{topic}") + end + end +end +``` + +## Other Notable New Features + +* Tek satır desen eşleştirme yeniden tasarlandı. (deneysel) + * `=>` eklendi. + Sağ taraf ataması olarak kullanılabilir. + + ```ruby + 0 => a + p a #=> 0 + + {b: 0, c: 1} => {b:} + p b #=> 0 + ``` + * `in`, `true` ya da `false` döndürmesi için değiştirildi. + + ```ruby + # sürüm 3.0 + 0 in 1 #=> false + + # sürüm 2.7 + 0 in 1 #=> NoMatchingPatternError yükseltir + ``` + +* Bulma deseni eklendi. (deneysel) + ``` ruby + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + ``` + +* Sonsuz metod tanımı eklendi. + ``` ruby + def square(x) = x * x + ``` +* `Hash#except` şimdi gömülü. + ``` ruby + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + ``` + +* Hafıza görünümü deneysel bir özellik olarak eklendi. + * Bu, uzantı kütüphaneleri arasında sayısal bir dizi ve bir biteşlem görüntüsü gibi ham bir hafıza alanını takas etmek için yeni bir C-API'ıdır. + Uzantı kütüphaneleri ayrıca şekil, öğe biçimi, vb. içeren hafıza alanlarının üstverilerini de paylaşır. + Bu gibi üstverileri kullanarak, uzantı kütüphaneleri çok boyutlu dizileri bile uygun şekilde paylaşabilirler. + Bu özellik Python'ın tampon protokolüne danışılarak tasarlanmıştır. + +## Performans iyileştirmeleri + +* Birçok geliştirme MJIT'te gerçeklenmiştir. + Ayrıntılar için NEWS'e bakınız. +* Uzun bir kodu IRB'ye yapıştırmak, Ruby 2.7.0'da gelene göre 53 kat daha hızlı. + Örneğin, [şu örnek kodu](https://gist.github.com/aycabta/30ab96334275bced5796f118c9220b0b) yapıştırmak için gereken zaman 11.7 saniyeden 0.22 saniyeye düşmüştür. + +## 2.7'den bu yana diğer dikkate değer değişiklikler + +* Anahtar sözcük argümanları diğer argümanlardan ayrılmıştır. + * Prensipte, Ruby 2.7'de bir uyarı yazdıran kod çalışmayacaktır. + Ayrıntılar için [belgeye](https://www.ruby-lang.org/tr/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/) bakınız. + * Bu arada argüman yönlendirme artık sondaki argümanları da destekliyor. + ``` ruby + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end + ``` +* Desen eşleştirme (`case/in`) artık deneysel değil. +* `$SAFE` özelliği tamamiyle silindi; şimdi sadece normal bir global değişken. +* Geriizleme sırası Ruby 2.5'te tersine çevrildi, fakat bu iptal edildi. + Şimdi Ruby 2.4'teki gibi bir davranış söz konusu; hata mesajı ve istisnanın meydana geldiği satır numarası ilk olarak yazdırılır, daha sonra ise çağırıcıları yazdırılır. +* Bazı standart kütüphaneler güncellendi. + * RubyGems 3.2.2 + * Bundler 2.2.2 + * IRB 1.2.6 + * Reline 0.1.5 + * Pysch 3.2.1 + * JSON 2.4.1 + * BigDecimal 3.0.0 + * CSV 3.1.9 + * Digest 3.0.0 + * Fiddle 1.0.4 + * StringIO 3.0.0 + * StringScanner 3.0.0 +* Aşağıdaki kütüphaneler artık paketlenmiyor. + Bu özellikleri kullanmak için denk gelen gem'leri kurun. + * net-telnet + * xmlrpc +* Şu varsayılan gem'ler paketlenmiş gem'ler olarak düzenlendi. + * rexml + * rss +* Aşağıdaki stdlib dosyaları şimdi varsayılan gemler ve rubygems.org'da yayınlandı. + * English + * abbrev + * base64 + * drb + * debug + * erb + * find + * net-ftp + * net-http + * net-imap + * net-protocol + * open-uri + * optparse + * pp + * prettyprint + * resolv-replace + * resolv + * rinda + * set + * securerandom + * shellwords + * tempfile + * tmpdir + * time + * tsort + * un + * weakref + * digest + * io-nonblock + * io-wait + * nkf + * pathname + * syslog + * win32ole + +Daha fazla ayrıntı için [NEWS](https://github.com/ruby/ruby/blob/v3_0_0_rc1/NEWS.md)'e +ya da [işleme loglarına](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_rc1) +bakın. + +{% assign release = site.data.releases | where: "version", "3.0.0-rc1" | first %} + +Bu değişikliklerle birlikte, 2.7.0'dan bu yana [{{ release.stats.files_changed }} dosya değişti, {{ release.stats.insertions }} ekleme yapıldı(+), {{ release.stats.deletions }} silme yapıldı(-)](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0)! + +Lütfen Ruby 3.0.0-rc1'i deneyin, ve bize herhangi bir geri bildirim verin! + +## Download + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Ruby nedir + +Ruby ilk olarak Matz (Yukihiro Matsumoto) tarafından 1993'te geliştirilmiştir, ve şu anda Açık Kaynak olarak geliştirilmektedir. +Birçok platformda çalışır ve tüm dünyada genellikle web geliştirmesi için kullanılmaktadır. From 899f2a1d7fc2d0a7cef51950bf9bfb298d593cae Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Mon, 21 Dec 2020 23:29:07 +0100 Subject: [PATCH 0216/1487] Update example code in 3.0.0-rc1 post Prefer Ractor::receive over its alias Ractor::recv. --- en/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md | 2 +- tr/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/en/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md b/en/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md index f04fb8490b..d6e498f079 100644 --- a/en/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md +++ b/en/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md @@ -102,7 +102,7 @@ require 'prime' # n.prime? with sent integers in r1, r2 run in parallel r1, r2 = *(1..2).map do Ractor.new do - n = Ractor.recv + n = Ractor.receive n.prime? end end diff --git a/tr/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md b/tr/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md index 99528740e6..73ed563f95 100644 --- a/tr/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md +++ b/tr/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md @@ -110,7 +110,7 @@ require 'prime' # r1 ve r2'deki, tamsayıların gönderildiği n.prime? paralelde çalışır r1, r2 = *(1..2).map do Ractor.new do - n = Ractor.recv + n = Ractor.receive n.prime? end end From 031461984539d048f94ef774d2f378efec857426 Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Fri, 25 Dec 2020 02:04:01 +0300 Subject: [PATCH 0217/1487] Fix wrong indentation of code blocks in 3.0.0-rc1 post (tr) See a8abc9c499da32ba12e7e295323017d5aee430e4. --- .../2020-12-20-ruby-3-0-0-rc1-released.md | 65 +++++++++++-------- 1 file changed, 37 insertions(+), 28 deletions(-) diff --git a/tr/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md b/tr/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md index 73ed563f95..4c9f1a0021 100644 --- a/tr/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md +++ b/tr/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md @@ -164,48 +164,55 @@ end ## Other Notable New Features * Tek satır desen eşleştirme yeniden tasarlandı. (deneysel) + * `=>` eklendi. Sağ taraf ataması olarak kullanılabilir. - ```ruby - 0 => a - p a #=> 0 + ```ruby + 0 => a + p a #=> 0 + + {b: 0, c: 1} => {b:} + p b #=> 0 + ``` - {b: 0, c: 1} => {b:} - p b #=> 0 - ``` * `in`, `true` ya da `false` döndürmesi için değiştirildi. - ```ruby - # sürüm 3.0 - 0 in 1 #=> false + ```ruby + # sürüm 3.0 + 0 in 1 #=> false - # sürüm 2.7 - 0 in 1 #=> NoMatchingPatternError yükseltir - ``` + # sürüm 2.7 + 0 in 1 #=> NoMatchingPatternError yükseltir + ``` * Bulma deseni eklendi. (deneysel) - ``` ruby - case ["a", 1, "b", "c", 2, "d", "e", "f", 3] - in [*pre, String => x, String => y, *post] - p pre #=> ["a", 1] - p x #=> "b" - p y #=> "c" - p post #=> [2, "d", "e", "f", 3] - end - ``` + + ``` ruby + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + ``` * Sonsuz metod tanımı eklendi. - ``` ruby - def square(x) = x * x - ``` + + ``` ruby + def square(x) = x * x + ``` + * `Hash#except` şimdi gömülü. - ``` ruby - h = { a: 1, b: 2, c: 3 } - p h.except(:a) #=> {:b=>2, :c=>3} - ``` + + ``` ruby + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + ``` * Hafıza görünümü deneysel bir özellik olarak eklendi. + * Bu, uzantı kütüphaneleri arasında sayısal bir dizi ve bir biteşlem görüntüsü gibi ham bir hafıza alanını takas etmek için yeni bir C-API'ıdır. Uzantı kütüphaneleri ayrıca şekil, öğe biçimi, vb. içeren hafıza alanlarının üstverilerini de paylaşır. Bu gibi üstverileri kullanarak, uzantı kütüphaneleri çok boyutlu dizileri bile uygun şekilde paylaşabilirler. @@ -224,11 +231,13 @@ end * Prensipte, Ruby 2.7'de bir uyarı yazdıran kod çalışmayacaktır. Ayrıntılar için [belgeye](https://www.ruby-lang.org/tr/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/) bakınız. * Bu arada argüman yönlendirme artık sondaki argümanları da destekliyor. + ``` ruby def method_missing(meth, ...) send(:"do_#{ meth }", ...) end ``` + * Desen eşleştirme (`case/in`) artık deneysel değil. * `$SAFE` özelliği tamamiyle silindi; şimdi sadece normal bir global değişken. * Geriizleme sırası Ruby 2.5'te tersine çevrildi, fakat bu iptal edildi. From 564e08b94b74a64d939fa8163617debdd89e2727 Mon Sep 17 00:00:00 2001 From: "NARUSE, Yui" Date: Fri, 25 Dec 2020 13:25:41 +0900 Subject: [PATCH 0218/1487] Ruby 3.0.0 Released (#2570) * Ruby 3.0.0 Released Co-authored-by: Marcus Stollsteimer --- _data/branches.yml | 4 +- _data/downloads.yml | 2 +- _data/releases.yml | 29 ++ .../_posts/2020-12-25-ruby-3-0-0-released.md | 388 ++++++++++++++++++ .../_posts/2020-12-25-ruby-3-0-0-released.md | 383 +++++++++++++++++ 5 files changed, 803 insertions(+), 3 deletions(-) create mode 100644 en/news/_posts/2020-12-25-ruby-3-0-0-released.md create mode 100644 ja/news/_posts/2020-12-25-ruby-3-0-0-released.md diff --git a/_data/branches.yml b/_data/branches.yml index 8c7d486e4a..a223071472 100644 --- a/_data/branches.yml +++ b/_data/branches.yml @@ -9,8 +9,8 @@ # eol_date: date of EOL (YYYY-MM-DD) - name: 3.0 - status: preview - date: + status: normal maintenance + date: 2020-12-25 eol_date: - name: 2.7 diff --git a/_data/downloads.yml b/_data/downloads.yml index c8bbbe8244..7178265b8f 100644 --- a/_data/downloads.yml +++ b/_data/downloads.yml @@ -4,10 +4,10 @@ # optional preview: - - 3.0.0-rc1 stable: + - 3.0.0 - 2.7.2 - 2.6.6 diff --git a/_data/releases.yml b/_data/releases.yml index 11f3cd02fa..44d17f8954 100644 --- a/_data/releases.yml +++ b/_data/releases.yml @@ -21,6 +21,35 @@ # 3.0 series +- version: 3.0.0 + tag: v3_0_0 + date: 2020-12-25 + post: /en/news/2020/12/25/ruby-3-0-0-released/ + stats: + files_changed: 4028 + insertions: 200058 + deletions: 154063 + url: + gz: https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.0.tar.gz + zip: https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.0.zip + xz: https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.0.tar.xz + size: + gz: 19539509 + zip: 23862057 + xz: 14374176 + sha1: + gz: 233873708c1ce9fdc295e0ef1c25e64f9b98b062 + zip: 2a9629102d71c7fe7f31a8c91f64e570a40d093c + xz: c142899d70a1326c5a71311b17168f98c15e5d89 + sha256: + gz: a13ed141a1c18eb967aac1e33f4d6ad5f21be1ac543c344e0d6feeee54af8e28 + zip: a5e4fa7dc5434a7259e9a29527eeea2c99eeb5e82708f66bb07731233bc860f4 + xz: 68bfaeef027b6ccd0032504a68ae69721a70e97d921ff328c0c8836c798f6cb1 + sha512: + gz: e62f4f63dc12cff424e8a09adc06477e1fa1ee2a9b2b6e28ca22fd52a211e8b8891c0045d47935014a83f2df2d6fc7c8a4fd87f01e63c585afc5ef753e1dd1c1 + zip: e5bf742309d79f05ec1bd1861106f4b103e4819ca2b92a826423ff451465b49573a917cb893d43a98852435966323e2820a4b9f9377f36cf771b8c658f80fa5b + xz: 2a23c2894e62e24bb20cec6b2a016b66d7df05083668726b6f70af8338211cfec417aa3624290d1f5ccd130f65ee7b52b5db7d428abc4a9460459c9a5dd1a450 + - version: 3.0.0-rc1 date: 2020-12-20 post: /en/news/2020/12/20/ruby-3-0-0-rc1-released/ diff --git a/en/news/_posts/2020-12-25-ruby-3-0-0-released.md b/en/news/_posts/2020-12-25-ruby-3-0-0-released.md new file mode 100644 index 0000000000..2cf09596b4 --- /dev/null +++ b/en/news/_posts/2020-12-25-ruby-3-0-0-released.md @@ -0,0 +1,388 @@ +--- +layout: news_post +title: "Ruby 3.0.0 Released" +author: "naruse" +translator: +date: 2020-12-25 00:00:00 +0000 +lang: en +--- +{% assign release = site.data.releases | where: "version", "3.0.0" | first %} + +We are pleased to announce the release of Ruby {{ release.version }}. From 2015 we developed hard toward Ruby 3, whose goal is performance, concurrency, and Typing. Especially about performance, Matz stated "Ruby3 will be 3 times faster than Ruby2" a.k.a. [Ruby 3x3](https://blog.heroku.com/ruby-3-by-3). + +![Optcarrot 3000 graph](https://i.imgur.com/mqOkcWi.png) + +With [Optcarrot benchmark](https://github.com/mame/optcarrot), which measures single thread performance based on NES's game emulation workload, it achieved 3x faster performance than Ruby 2.0!

These were measured at the environment written in https://benchmark-driver.github.io/hardware.html. [8c510e4095](http://github.com/ruby/ruby/commit/8c510e4095) was used as Ruby 3.0. It may not be 3x faster depending on your environment or benchmark.
+ +Ruby 3.0.0 covers those goals by +* Performance + * MJIT +* Concurrency + * Ractor + * Fiber Scheduler +* Typing (Static Analysis) + * RBS + * TypeProf + +With above performance improvement Ruby 3.0 introduces a number of new features described below. + +## Performance + +> When I first declared "Ruby3x3" in the conference keynote, many including members of the core team felt "Matz is a boaster". In fact, I felt so too. But we did. I am honored to see the core team actually accomplished to make Ruby3.0 three times faster than Ruby2.0 (in some benchmarks). -- Matz + +### MJIT + +Many improvements were implemented in MJIT. See NEWS for details. + +As of Ruby 3.0, JIT is supposed to give performance improvements in limited workloads, such as games ([Optcarrot](https://benchmark-driver.github.io/benchmarks/optcarrot/commits.html#chart-1)), AI ([Rubykon](https://benchmark-driver.github.io/benchmarks/rubykon/commits.html)), or whatever application that spends majority of time in calling a few methods many times. + +Although Ruby 3.0 [significantly decreased a size of JIT-ed code](https://twitter.com/k0kubun/status/1256142302608650244), it is still not ready for optimizing workloads like Rails, which often spend time on so many methods and therefore suffer from i-cache misses exacerbated by JIT. Stay tuned for Ruby 3.1 for further improvements on this issue. + +## Concurrency / Parallel + +> It's multi-core age today. Concurrency is very important. With Ractor, along with Async Fiber, Ruby will be a real concurrent language. --- Matz + +### Ractor (experimental) +Ractor is an Actor-model like concurrent abstraction designed to provide a parallel execution feature without thread-safety concerns. + +You can make multiple ractors and you can run them in parallel. Ractor enables you to make thread-safe parallel programs because ractors can not share normal objects. Communication between ractors are supported by exchaning messages. + +To limit sharing of objects, Ractor introduces several restrictions to the Ruby's syntax (without multiple Ractors, there is no restriction). + +The specification and implementation are not matured and may be changed in the future, so this feature is marked as experimental and show the "experimental feature" warning when the first `Ractor.new`. + +The following small program measures the execution time of famous benchmark tak function ([Tak (function) - Wikipedia](https://en.wikipedia.org/wiki/Tak_(function))), by executing it 4 times sequentially or 4 times in parallel with ractors. + +``` ruby +def tarai(x, y, z) = + x <= y ? y : tarai(tarai(x-1, y, z), + tarai(y-1, z, x), + tarai(z-1, x, y)) +require 'benchmark' +Benchmark.bm do |x| + # sequential version + x.report('seq'){ 4.times{ tarai(14, 7, 0) } } + + # parallel version + x.report('par'){ + 4.times.map do + Ractor.new { tarai(14, 7, 0) } + end.each(&:take) + } +end +``` + +``` +Benchmark result: + user system total real +seq 64.560736 0.001101 64.561837 ( 64.562194) +par 66.422010 0.015999 66.438009 ( 16.685797) +``` + +The result was measured on Ubuntu 20.04, Intel(R) Core(TM) i7-6700 (4 cores, 8 hardware threads). It shows that the parallel version is 3.87 times faster than the sequential version. + + +See [doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md) for more details. + +### Fiber Scheduler + +`Fiber#scheduler` is introduced for intercepting blocking operations. This allows for light-weight concurrency without changing existing code. Watch ["Don't Wait For Me, Scalable Concurrency for Ruby 3"](https://www.youtube.com/watch?v=Y29SSOS4UOc) for an overview of how it works. + +Currently supported classes/methods: + +- `Mutex#lock`, `Mutex#unlock`, `Mutex#sleep` +- `ConditionVariable#wait` +- `Queue#pop`, `SizedQueue#push` +- `Thread#join` +- `Kernel#sleep` +- `Process.wait` +- `IO#wait`, `IO#read`, `IO#write` and related methods (e.g. `#wait_readable`, `#gets`, `#puts` and so on). +- `IO#select` is *not supported*. + +This example program will perform several HTTP requests concurrently: + +``` ruby +require 'async' +require 'net/http' +require 'uri' + +Async do + ["ruby", "rails", "async"].each do |topic| + Async do + Net::HTTP.get(URI "https://www.google.com/search?q=#{topic}") + end + end +end +``` + +It uses [async](https://github.com/socketry/async) which provides the event loop. This event loop uses the `Fiber#scheduler` hooks to make `Net::HTTP` non-blocking. Other gems can use this interface to provide non-blocking execution for Ruby, and those gems can be compatible with other implementations of Ruby (e.g. JRuby, TruffleRuby) which can support the same non-blocking hooks. + +## Static Analysis + +> 2010s were an age of statically type programming languages. Ruby seeks the future with static type checking, without type declaration, using abstract interpretation. RBS & TypeProf are the first step to the future. More steps to come. --- Matz + +### RBS + +RBS is a language to describe the types of Ruby programs. + +Type checkers including TypeProf and other tools supporting RBS will understand Ruby programs much better with RBS definitions. + +You can write down the definition of classes and modules: methods defined in the class, instance variables and their types, and inheritance/mix-in relations. + +The goal of RBS is to support commonly seen patterns in Ruby programs and it allows writing advanced types including union types, method overloading, and generics. It also supports duck typing with _interface types_. + +Ruby 3.0 ships with `rbs` gem, which allows parsing and processing type definitions written in RBS. +The following is a small example of RBS with class, module, and constant definitions. + +``` rbs +module ChatApp + VERSION: String + class Channel + attr_reader name: String + attr_reader messages: Array[Message] + attr_reader users: Array[User | Bot] # `|` means union types, `User` or `Bot`. + def initialize: (String) -> void + def post: (String, from: User | Bot) -> Message # Method overloading is supported. + | (File, from: User | Bot) -> Message + end +end +``` + +See [README of rbs gem](https://github.com/ruby/rbs) for more detail. + +### TypeProf + +TypeProf is a type analysis tool bundled in the Ruby package. + +Currently, TypeProf serves as a kind of type inference. + +It reads plain (non-type-annotated) Ruby code, analyzes what methods are defined and how they are used, and generates a prototype of type signature in RBS format. + +Here is a simple demo of TypeProf. + +An example input: + +``` ruby +# test.rb +class User + def initialize(name:, age:) + @name, @age = name, age + end + attr_reader :name, :age +end +User.new(name: "John", age: 20) +``` + +An example output: + +``` +$ typeprof test.rb +# Classes +class User + attr_reader name : String + attr_reader age : Integer + def initialize : (name: String, age: Integer) -> [String, Integer] +end +``` + +You can run TypeProf by saving the input as "test.rb" and invoke a command called "typeprof test.rb". + +You can also [try TypeProf online](https://mame.github.io/typeprof-playground/#rb=%23+test.rb%0Aclass+User%0A++def+initialize%28name%3A%2C+age%3A%29%0A++++%40name%2C+%40age+%3D+name%2C+age%0A++end%0A++%0A++attr_reader+%3Aname%2C+%3Aage%0Aend%0A%0AUser.new%28name%3A+%22John%22%2C+age%3A+20%29&rbs=). (It runs TypeProf on the server side, so sorry if it is out!) + +See [the documentation](https://github.com/ruby/typeprof/blob/master/doc/doc.md) and [demos](https://github.com/ruby/typeprof/blob/master/doc/demo.md) for details. + +TypeProf is experimental and not so mature yet; only a subset of the Ruby language is supported, and the detection of type errors is limited. But it is still growing rapidly to improve the coverage of language features, the analysis performance, and usability. Any feedback is very welcome. + +## Other Notable New Features + +* One-line pattern matching is redesigned. (experimental) + + * `=>` is added. It can be used as like rightward assignment. + + ```ruby + 0 => a + p a #=> 0 + + {b: 0, c: 1} => {b:} + p b #=> 0 + ``` + * `in` is changed to return `true` or `false`. + + ```ruby + # version 3.0 + 0 in 1 #=> false + + # version 2.7 + 0 in 1 #=> raise NoMatchingPatternError + ``` + +* Find pattern is added. (experimental) + + ``` ruby + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + ``` + +* Endless method definition is added. + + ``` ruby + def square(x) = x * x + ``` + +* `Hash#except` is now built-in. + + ``` ruby + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + ``` + +* Memory view is added as an experimental feature + + * This is a new C-API set to exchange a raw memory area, such as a numeric array and a bitmap image, between extension libraries. The extension libraries can share also the metadata of the memory area that consists of the shape, the element format, and so on. Using these kinds of metadata, the extension libraries can share even a multidimensional array appropriately. This feature is designed by referring to Python's buffer protocol. + +## Performance improvements + +* Pasting long code to IRB is 53 times faster than bundled with Ruby 2.7.0. For example, the time required to paste [this sample code](https://gist.github.com/aycabta/30ab96334275bced5796f118c9220b0b) goes from 11.7 seconds to 0.22 seconds. + + + + + +* The `measure` command has been added to IRB. It allows simple execution time measurement. + + ``` + irb(main):001:0> 3 + => 3 + irb(main):002:0> measure + TIME is added. + => nil + irb(main):003:0> 3 + processing time: 0.000058s + => 3 + irb(main):004:0> measure :off + => nil + irb(main):005:0> 3 + => 3 + ``` + +## Other notable changes since 2.7 + +* Keyword arguments are separated from other arguments. + * In principle, code that prints a warning on Ruby 2.7 won't work. See the [document](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/) in detail. + * By the way, arguments forwarding now supports leading arguments. + + ``` ruby + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end + ``` + +* Pattern matching (`case/in`) is no longer experimental. +* The `$SAFE` feature was completely removed; now it is a normal global variable. +* The order of backtrace had been reversed at Ruby 2.5, and is reverted. Now it behaves like Ruby 2.4; an error message and the line number where the exception occurs are printed first, and its callers are printed later. +* Some standard libraries are updated. + * RubyGems 3.2.3 + * Bundler 2.2.3 + * IRB 1.2.6 + * Reline 0.1.5 + * Pysch 3.3.0 + * JSON 2.5.0 + * BigDecimal 3.0.0 + * CSV 3.1.9 + * Date 3.1.1 + * Digest 3.0.0 + * Fiddle 1.0.5 + * StringIO 3.0.0 + * StringScanner 3.0.0 + * etc. +* The following libraries are no longer bundled gems or standard libraries. + Install the corresponding gems to use these features. + * sdbm + * webrick + * net-telnet + * xmlrpc +* The following default gems are now bundled gems. + * rexml + * rss +* The following stdlib files are now default gems and are published on rubygems.org. + * English + * abbrev + * base64 + * drb + * debug + * erb + * find + * net-ftp + * net-http + * net-imap + * net-protocol + * open-uri + * optparse + * pp + * prettyprint + * resolv-replace + * resolv + * rinda + * set + * securerandom + * shellwords + * tempfile + * tmpdir + * time + * tsort + * un + * weakref + * digest + * io-nonblock + * io-wait + * nkf + * pathname + * syslog + * win32ole + +See [NEWS](https://github.com/ruby/ruby/blob/{{ release.tag }}/NEWS.md) +or [commit logs](https://github.com/ruby/ruby/compare/v2_7_0...{{ release.tag }}) +for more details. + +With those changes, [{{ release.stats.files_changed }} files changed, {{ release.stats.insertions }} insertions(+), {{ release.stats.deletions }} deletions(-)](https://github.com/ruby/ruby/compare/v2_7_0...{{ release.tag }}#file_bucket) +since Ruby 2.7.0! + +> Ruby3.0 is a milestone. The language is evolved, keeping compatibility. But it's not the end. Ruby will keep progressing, and become even greater. Stay tuned! --- Matz + +Please try Ruby {{ release.version }}, and give us any feedback! + +## Download + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## What is Ruby + +Ruby was first developed by Matz (Yukihiro Matsumoto) in 1993, +and is now developed as Open Source. It runs on multiple platforms +and is used all over the world especially for web development. diff --git a/ja/news/_posts/2020-12-25-ruby-3-0-0-released.md b/ja/news/_posts/2020-12-25-ruby-3-0-0-released.md new file mode 100644 index 0000000000..ba20cb3d7e --- /dev/null +++ b/ja/news/_posts/2020-12-25-ruby-3-0-0-released.md @@ -0,0 +1,383 @@ +--- +layout: news_post +title: "Ruby 3.0.0 リリース" +author: "naruse" +translator: +date: 2020-12-25 00:00:00 +0000 +lang: ja +--- +{% assign release = site.data.releases | where: "version", "3.0.0" | first %} + +Ruby 3.0系初のリリースである、Ruby {{ release.version }} が公開されました。 + +これまで、Ruby3に向けてパフォーマンスの改善、並行処理、静的解析という3つの目標を掲げて、活発に開発が行われてきました。特にパフォーマンスの改善については、[Ruby 3x3](https://blog.heroku.com/ruby-3-by-3) として「Ruby3はRuby2の3倍速くする」ことを目指してきました。 + +![Optcarrot 3000 graph](https://i.imgur.com/mqOkcWi.png) + +Ruby 3.0では開発の指標の一つとしてきた[Optcarotベンチマーク](https://github.com/mame/optcarrot)で3倍を達成するとともに、以下のような取り組みが行われています。
These were measured at the environment written in https://benchmark-driver.github.io/hardware.html. [8c510e4095](http://github.com/ruby/ruby/commit/8c510e4095) was used as Ruby 3.0. It may not be 3x faster depending on your environment or benchmark.
+ + +Ruby 3 では以下の目標を達成しました。 +* パフォーマンスの改善 + * MJIT +* 並行処理 + * Ractor + * Fiber Scheduler +* 静的解析 + * RBS + * TypeProf + +他にも、Ruby 3.0 では Ruby 2.7 に比べて、多くの新しい機能やパフォーマンスの改善が含まれます。 その一部を以下に紹介します。 + +## パフォーマンスの改善 + +> わたしが最初にRuby3x3というスローガンを宣言した時、コアチームメンバーを含むほとんどの人は、「またそんな夢物語を」と思ったことでしょう。実際、わたしもそう思ってました。しかし、皆の努力によって(ある程度)達成できました。この成果をこころから誇りに思います。 --- Matz + +### MJIT + +Many improvements were implemented in MJIT. See NEWS for details. + +As of Ruby 3.0, JIT is supposed to give performance improvements in limited workloads, such as games ([Optcarrot](https://benchmark-driver.github.io/benchmarks/optcarrot/commits.html#chart-1)), AI ([Rubykon](https://benchmark-driver.github.io/benchmarks/rubykon/commits.html)), or whatever application that spends majority of time in calling a few methods many times. + +Although Ruby 3.0 [significantly decreased a size of JIT-ed code](https://twitter.com/k0kubun/status/1256142302608650244), it is still not ready for optimizing workloads like Rails, which often spend time on so many methods and therefore suffer from i-cache misses exacerbated by JIT. Stay tuned for Ruby 3.1 for further improvements on this issue. + +## Concurrency / Parallel + +> マルチコア時代と呼んでも過言ではない現代、コンカレンシーは非常に重要です。RactorとAsync Fiberの導入でようやくRubyもコンカレント言語になれそうです。 -- Matz + +### Ractor (experimental) + +Ractor はアクターモデル風の並行・並列制御機構であり、スレッド安全に関する懸念なく、Rubyで並列処理を行うための機能として設計されています。 + +複数のRactorを作成すると、それらは並列計算機上で並列に実行されます。Ractor間では、ほとんどのオブジェクトが共有できないように設計されているため、スレッド安全なプログラムにすることができます。メッセージの送受信により、Ractor間のコミュニケーションを行うことが可能です。 + +Ractor間でのオブジェクトの共有を制限するために、複数Ractorでの実行時には、いくつかのRubyの機能に制限が入ります(ただし、複数のRactorを用いない場合には、これまでのRubyと何も変わりません)。 + +Ractorの仕様と実装は、まだ発展途上であるため、実験的機能として提供されます。初回のRactorの生成時には実験的機能であることが警告で表示されます。 + +次の小さなプログラムでは、有名なベンチマーク用関数である竹内関数([竹内関数 - Wikipedia](https://ja.wikipedia.org/wiki/%E7%AB%B9%E5%86%85%E9%96%A2%E6%95%B0) )を用いて、4回逐次的に実行する場合と、Ractorを用いて4並列で実行する場合で、それぞれ実行時間を計測しています。 + +``` ruby +def tarai(x, y, z) = + x <= y ? y : tarai(tarai(x-1, y, z), + tarai(y-1, z, x), + tarai(z-1, x, y)) +require 'benchmark' +Benchmark.bm do |x| + # sequential version + x.report('seq'){ 4.times{ tarai(14, 7, 0) } } + + # parallel version + x.report('par'){ + 4.times.map do + Ractor.new { tarai(14, 7, 0) } + end.each(&:take) + } +end +``` + +``` +Benchmark result: + user system total real +seq 64.560736 0.001101 64.561837 ( 64.562194) +par 66.422010 0.015999 66.438009 ( 16.685797) +``` + +結果は Ubuntu 20.04, Intel(R) Core(TM) i7-6700 (4 cores, 8 hardware threads) で実行したものになります。逐次実行したときよりも、並列化によって3.87倍の高速化していることがわかります。 + + +より詳細は、[doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md) をご覧ください。 + +### Fiber Scheduler + +`Fiber#scheduler` is introduced for intercepting blocking operations. This allows for light-weight concurrency without changing existing code. Watch ["Don't Wait For Me, Scalable Concurrency for Ruby 3"](https://www.youtube.com/watch?v=Y29SSOS4UOc) for an overview of how it works. + +Currently supported classes/methods: + +- `Mutex#lock`, `Mutex#unlock`, `Mutex#sleep` +- `ConditionVariable#wait` +- `Queue#pop`, `SizedQueue#push` +- `Thread#join` +- `Kernel#sleep` +- `Process.wait` +- `IO#wait`, `IO#read`, `IO#write` and related methods (e.g. `#wait_readable`, `#gets`, `#puts` and so on). +- `IO#select` is *not supported*. + +This example program will perform several HTTP requests concurrently: + +``` ruby +require 'async' +require 'net/http' +require 'uri' + +Async do + ["ruby", "rails", "async"].each do |topic| + Async do + Net::HTTP.get(URI "https://www.google.com/search?q=#{topic}") + end + end +end +``` + +It uses [async](https://github.com/socketry/async) which provides the event loop. This event loop uses the `Fiber#scheduler` hooks to make `Net::HTTP` non-blocking. Other gems can use this interface to provide non-blocking execution for Ruby, and those gems can be compatible with other implementations of Ruby (e.g. JRuby, TruffleRuby) which can support the same non-blocking hooks. + +## 静的解析 + +> 2010年代は静的型言語の時代でした。Rubyは抽象解釈を武器に、型宣言なしで静的型チェックする未来を目指します。RBSとTypeProfはその第一歩です。Rubyがもたらす誰も見たことがない静的型の世界を見守ってください --- Matz + +### RBS + +RBSはRubyプログラムの型を記述するための言語です。 + +TypeProfなどの型検査ツールを初めとする静的解析を行うツールは、RBSを利用することでRubyプログラムをより精度良く解析することができます。 + +RBSでは、Rubyプログラムのクラスやモジュールの型を定義します。メソッドやインスタンス変数、定数とその型、継承やmixinなどの関係などが記述できます。 + +RBSはRubyプログラムに頻出するパターンをサポートするように設計されており、ユニオン型、メソッドオーバーロード、ジェネリクスなどの機能を提供します。さらに「インタフェース型」によってダックタイピングをサポートします。 + +Ruby 3.0には、このRBS言語で書かれた型定義を処理するためのライブラリである `rbs` gemが同梱されています。 + +クラスやモジュール、定数を定義する、簡単なRBSの例を示します。 + +``` rbs +module ChatApp + VERSION: String + class Channel + attr_reader name: String + attr_reader messages: Array[Message] + attr_reader users: Array[User | Bot] # `|` は `User` か `Bot` のインスタンスを表現する「ユニオン型」です + def initialize: (String) -> void + def post: (String, from: User | Bot) -> Message # メソッドオーバーロードを記述することもできます + | (File, from: User | Bot) -> Message + end +end +``` + +詳細については、[rbs gemのREADME](https://github.com/ruby/rbs)を参照してください。 + +### TypeProf + +TypeProf は Ruby パッケージに同梱された型解析ツールです。 + +TypeProf の現在の主な用途は一種の型推論です。 + +型注釈の無い普通の Ruby コードを入力し、どんなメソッドが定義されどのように使われているかを解析し、型シグネチャのプロトタイプを RBS フォーマットで生成します。 + +次は TypeProf の簡単なデモです。 + +サンプル入力 + +``` ruby +# test.rb +class User + def initialize(name:, age:) + @name, @age = name, age + end + attr_reader :name, :age +end +User.new(name: "John", age: 20) +``` + +サンプル出力 + +``` +$ typeprof test.rb +# Classes +class User + attr_reader name : String + attr_reader age : Integer + def initialize : (name: String, age: Integer) -> [String, Integer] +end +``` + +サンプル入力を"test.rb"という名前で保存し、`typeprof test.rb`というコマンドで TypeProf の解析ができます。 + +[TypeProf をオンラインで試す](https://mame.github.io/typeprof-playground/#rb=%23+test.rb%0Aclass+User%0A++def+initialize%28name%3A%2C+age%3A%29%0A++++%40name%2C+%40age+%3D+name%2C+age%0A++end%0A++%0A++attr_reader+%3Aname%2C+%3Aage%0Aend%0A%0AUser.new%28name%3A+%22John%22%2C+age%3A+20%29&rbs=)こともできます(サーバサイドで TypeProf を動かしているので、サーバが落ちたらごめんなさい)。 + +詳しくは[ドキュメント](https://github.com/ruby/typeprof/blob/master/doc/doc.md)や[デモ](https://github.com/ruby/typeprof/blob/master/doc/demo.md)を見てください。 + +残念ながら TypeProf はまだ実験的で、あまり完成度は高くありません。Ruby 言語のサブセットだけがサポートされていて、型エラー検出の機能は限定的です。ですがいま急速に改良中であり、言語機能のカバレッジ増強、解析効率の向上、利便性の向上などを行っています。フィードバックを歓迎します。 + +## その他の主要な新機能 + +* 1行パターンマッチが再設計されました。 (experimental) + + * `=>` を新たに使うようになりました。右代入のように使うことができます。 + + ```ruby + 0 => a + p a #=> 0 + + {b: 0, c: 1} => {b:} + p b #=> 0 + ``` + + * `in` は `true` または `false` を返すようになりました。 + + ```ruby + # version 3.0 + 0 in 1 #=> false + + # version 2.7 + 0 in 1 #=> raise NoMatchingPatternError + ``` + +* findパターンが追加されました。 (experimental) + + ``` ruby + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + ``` + +* 一行メソッド定義が書けるようになりました。 + + ``` ruby + def square(x) = x * x + ``` + +* `Hash#except` が組み込みになりました。 + + ``` ruby + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + ``` + +## パフォーマンスの改善 + +* IRB への長いコードの貼り付けは、Ruby 2.7.0 にバンドルされているものと比較して 53 倍の速さになります。例えば、[このサンプルコード](https://gist.github.com/aycabta/30ab96334275bced5796f118c9220b0b)の貼り付けに要する時間は、11.7 秒から 0.22 秒になります。 + + + + +* IRB に `measure` コマンドが追加されました。簡単な実行時間計測が可能です。 + + ``` + irb(main):001:0> 3 + => 3 + irb(main):002:0> measure + TIME is added. + => nil + irb(main):003:0> 3 + processing time: 0.000058s + => 3 + irb(main):004:0> measure :off + => nil + irb(main):005:0> 3 + => 3 + ``` + +## その他の注目すべき 2.7 からの変更点 + +* キーワード引数が通常の引数から分離されました。 + * 原則として、2.7 で警告の出ていたコードは動かなくなります。詳細は[別ドキュメント](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/)を参照してください。 + * 関連して、引数のフォワーディングの記法で先頭に引数を書けるようになりました。 + + ``` ruby + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end + ``` + +* パターンマッチ(`case/in`)が実験的な機能ではなくなりました。 +* `$SAFE` の機能が完全に削除され、ただのグローバル変数となりました。 +* バックトレースの順序は2.5で逆転しましたが、3.0ではこれを取りやめることになりました。例外が起きた行が先に表示され、呼び出し元が後に表示されるように戻ります。 +* いくつかの標準ライブラリがアップデートされました。 + * RubyGems 3.2.3 + * Bundler 2.2.3 + * IRB 1.2.6 + * Reline 0.1.5 + * Pysch 3.3.0 + * JSON 2.5.0 + * BigDecimal 3.0.0 + * CSV 3.1.9 + * Date 3.1.1 + * Digest 3.0.0 + * Fiddle 1.0.5 + * StringIO 3.0.0 + * StringScanner 3.0.0 + * etc. +* 以下のライブラリは標準添付ライブラリから削除されました。3.0 以降で使いたい場合は rubygems から利用してください。 + * sdbm + * webrick + * net-telnet + * xmlrpc +* 以下のライブラリが新たに bundled gems になりました。Bundler から利用する場合は Gemfile に明示的に指定してください。 + * rexml + * rss +* 以下のライブラリが新たに default gems になりました。rubygems.org からアップデート可能です。 + * English + * abbrev + * base64 + * drb + * debug + * erb + * find + * net-ftp + * net-http + * net-imap + * net-protocol + * open-uri + * optparse + * pp + * prettyprint + * resolv-replace + * resolv + * rinda + * set + * securerandom + * shellwords + * tempfile + * tmpdir + * time + * tsort + * un + * weakref + * digest + * io-nonblock + * io-wait + * nkf + * pathname + * syslog + * win32ole + +その他詳細については、[NEWS](https://github.com/ruby/ruby/blob/{{ release.tag }}/NEWS.md) ファイルまたは[コミットログ](https://github.com/ruby/ruby/compare/v2_7_0...{{ release.tag }})を参照してください。 + +なお、こうした変更により、Ruby 2.7.0 以降では [{{ release.stats.files_changed }} 個のファイルに変更が加えられ、{{ release.stats.insertions }} 行の追加と {{ release.stats.deletions }} 行の削除が行われました](https://github.com/ruby/ruby/compare/v2_7_0...{{ release.tag }}#file_bucket) ! + +> Ruby3.0はマイルストーンです。言語は互換性を保ったまま大きく進化しました。しかし、これで終わりではありません。今後もRubyは進化し続け、より偉大な言語になることでしょう。ご期待下さい!。 --- Matz + +メリークリスマス、様々な機能が追加された Ruby 3.0 をぜひお楽しみ下さい! + +## ダウンロード + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Ruby とは + +Rubyはまつもとゆきひろ (Matz) によって1993年に開発が始められ、今もオープンソースソフトウェアとして開発が続けられています。Rubyは様々なプラットフォームで動き、世界中で、特にWebアプリケーション開発のために使われています。 From 02756c5626ebddd58172eb47afa9e79a240a7fd5 Mon Sep 17 00:00:00 2001 From: "NARUSE, Yui" Date: Fri, 25 Dec 2020 13:59:50 +0900 Subject: [PATCH 0219/1487] Edit image and video (#2577) * Edit image and video * translate MJIT * Use ruby's s3 --- en/news/_posts/2020-12-25-ruby-3-0-0-released.md | 6 +++--- ja/news/_posts/2020-12-25-ruby-3-0-0-released.md | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/en/news/_posts/2020-12-25-ruby-3-0-0-released.md b/en/news/_posts/2020-12-25-ruby-3-0-0-released.md index 2cf09596b4..e9826920df 100644 --- a/en/news/_posts/2020-12-25-ruby-3-0-0-released.md +++ b/en/news/_posts/2020-12-25-ruby-3-0-0-released.md @@ -10,7 +10,7 @@ lang: en We are pleased to announce the release of Ruby {{ release.version }}. From 2015 we developed hard toward Ruby 3, whose goal is performance, concurrency, and Typing. Especially about performance, Matz stated "Ruby3 will be 3 times faster than Ruby2" a.k.a. [Ruby 3x3](https://blog.heroku.com/ruby-3-by-3). -![Optcarrot 3000 graph](https://i.imgur.com/mqOkcWi.png) +Optcarrot 3000 frames With [Optcarrot benchmark](https://github.com/mame/optcarrot), which measures single thread performance based on NES's game emulation workload, it achieved 3x faster performance than Ruby 2.0!
These were measured at the environment written in https://benchmark-driver.github.io/hardware.html. [8c510e4095](http://github.com/ruby/ruby/commit/8c510e4095) was used as Ruby 3.0. It may not be 3x faster depending on your environment or benchmark.
@@ -250,7 +250,7 @@ TypeProf is experimental and not so mature yet; only a subset of the Ruby langua * Pasting long code to IRB is 53 times faster than bundled with Ruby 2.7.0. For example, the time required to paste [this sample code](https://gist.github.com/aycabta/30ab96334275bced5796f118c9220b0b) goes from 11.7 seconds to 0.22 seconds. -
4 -

루비 20분 가이드

+

Ruby 20분 가이드

--- ## 소개 -이 문서는 20분 정도면 따라 해볼 수 있는 간단한 루비 튜토리얼입니다. -이 튜토리얼을 따라 하기 위해서는 컴퓨터에 루비가 설치되어 있어야 -합니다. (아직 루비가 설치되어 있지 않다면, 시작하기 전에 +이 문서는 20분 정도면 따라 해볼 수 있는 간단한 Ruby 튜토리얼입니다. +이 튜토리얼을 따라 하기 위해서는 컴퓨터에 Ruby가 설치되어 있어야 +합니다. (아직 Ruby가 설치되어 있지 않다면, 시작하기 전에 [설치][installation]하시기 바랍니다.) -## 대화형 루비 셸(irb) +## 대화형 Ruby 셸(irb) -루비에는 당신이 입력한 루비 구문을 바로 결과로 보여주는 프로그램이 -동봉되어 있습니다. 대화형 세션에서 루비 코드를 가지고 노는 것은 -루비를 배울 수 있는 훌륭한 방법입니다. +Ruby에는 당신이 입력한 Ruby 구문을 바로 결과로 보여주는 프로그램이 +동봉되어 있습니다. 대화형 세션에서 Ruby 코드를 가지고 노는 것은 +Ruby를 배울 수 있는 훌륭한 방법입니다. irb(Interactive Ruby의 약자)를 시작하십시오. * **macOS**를 사용한다면, 터미널 애플리케이션을 시작하여 `irb`라고 입력하고 엔터를 누릅니다. * **Linux**를 사용한다면, 셸을 시작하여 `irb`라고 입력하고 엔터를 누릅니다. -* **Windows**를 사용한다면, 시작 메뉴의 루비 섹션에서 `Interactive Ruby`를 +* **Windows**를 사용한다면, 시작 메뉴의 Ruby 섹션에서 `Interactive Ruby`를 시작합니다. {% highlight irb %} @@ -49,10 +49,10 @@ irb(main):001:0> "Hello World" => "Hello World" {% endhighlight %} -## 당신의 첫 루비 코드가 실행되었습니다! +## 당신의 첫 Ruby 코드가 실행되었습니다! 지금 무엇을 한 거냐고요? 세상에서 제일 짧은 “Hello World” 프로그램을 -짰을까요? 아닙니다. IRB는 입력한 루비 코드를 실행한 결과를 다음 줄에 +짰을까요? 아닙니다. IRB는 입력한 Ruby 코드를 실행한 결과를 다음 줄에 보여준 것뿐입니다. 만약 “Hello World”를 출력하고 싶다면, 다음과 같이 해야 합니다. @@ -62,10 +62,10 @@ Hello World => nil {% endhighlight %} -`puts`는 루비에서 출력할 때 주로 사용하는 명령어입니다. 그럼 -`=> nil` 부분은 무슨 뜻일까요? 바로 우리가 입력한 루비 코드가 +`puts`는 Ruby에서 출력할 때 주로 사용하는 명령어입니다. 그럼 +`=> nil` 부분은 무슨 뜻일까요? 바로 우리가 입력한 Ruby 코드가 반환한 값입니다. `puts` 명령어는 언제나 nil을 반환합니다. -루비에서의 nil은 절대적으로 아무것도 없는(absolutely-positively-nothing) 값입니다. +Ruby에서의 nil은 절대적으로 아무것도 없는(absolutely-positively-nothing) 값입니다. ## 무료 탁상용 계산기 @@ -93,7 +93,7 @@ irb(main):005:0> 3**2 => 9 {% endhighlight %} -루비에서 `**`는 "거듭제곱"을 뜻합니다. 제곱근은 어떻게 구할까요? +Ruby에서 `**`는 "거듭제곱"을 뜻합니다. 제곱근은 어떻게 구할까요? {% highlight irb %} irb(main):006:0> Math.sqrt(9) @@ -105,7 +105,7 @@ irb(main):006:0> Math.sqrt(9) ## 모듈, 용도에 따른 코드 분류 -`Math`는 수학계산을 위한 내부 모듈입니다. 루비에서 모듈은 두 가지 +`Math`는 수학계산을 위한 내부 모듈입니다. Ruby에서 모듈은 두 가지 역할을 합니다. 위의 예는 이중 한 가지를 보여주고 있습니다. 즉, 관련이 있는 여러 메서드를 하나의 이름으로 묶어두는 것이지요. `Math`에는 `sin()`과 `tan()` 같은 메서드도 들어있답니다. diff --git a/ko/documentation/ruby-from-other-languages/index.md b/ko/documentation/ruby-from-other-languages/index.md index 18a9e1dcf1..b593f4baeb 100644 --- a/ko/documentation/ruby-from-other-languages/index.md +++ b/ko/documentation/ruby-from-other-languages/index.md @@ -1,37 +1,37 @@ --- layout: page -title: "다른 언어에서 루비로" +title: "다른 언어에서 Ruby로" lang: ko --- -처음 루비 코드를 볼 때, 그것은 당신이 사용했던 다른 프로그래밍 언어를 -연상하게 할 수 있습니다. 이것은 의도적입니다. 대부분의 문법은 펄, 파이썬, -자바나 다른 언어들과 유사합니다. 다른 언어를 사용한 적이 있다면 루비를 +처음 Ruby 코드를 볼 때, 그것은 당신이 사용했던 다른 프로그래밍 언어를 +연상하게 할 수 있습니다. 이것은 의도적입니다. 대부분의 문법은 Perl, Python, +Java나 다른 언어들과 유사합니다. 다른 언어를 사용한 적이 있다면 Ruby를 배우기는 아주 쉬울 것입니다. {: .summary} -이 문서에는 두 가지 주요 단원이 있습니다. 첫번째는 *어떤* 언어에서 루비로 +이 문서에는 두 가지 주요 단원이 있습니다. 첫번째는 *어떤* 언어에서 Ruby로 넘어올 때의 빠른 요약입니다. 두번째는 이미 잘 알고있는 것과 비교할 수 있도록 언어의 주요 기능을 다룹니다. -## 차이점들: *어떤 언어*에서 루비로 +## 차이점들: *어떤 언어*에서 Ruby로 -* [C 나 C++에서 루비로](/en/documentation/ruby-from-other-languages/to-ruby-from-c-and-cpp/) -* [자바에서 루비로](to-ruby-from-java/) -* [펄에서 루비로](/en/documentation/ruby-from-other-languages/to-ruby-from-perl/) -* [PHP에서 루비로](/en/documentation/ruby-from-other-languages/to-ruby-from-php/) -* [파이썬에서 루비로](to-ruby-from-python/) +* [C나 C++에서 Ruby로](/en/documentation/ruby-from-other-languages/to-ruby-from-c-and-cpp/) +* [Java에서 Ruby로](to-ruby-from-java/) +* [Perl에서 Ruby로](/en/documentation/ruby-from-other-languages/to-ruby-from-perl/) +* [PHP에서 Ruby로](/en/documentation/ruby-from-other-languages/to-ruby-from-php/) +* [Python에서 Ruby로](to-ruby-from-python/) ## 언어의 중요한 기능과 알아둘 점 -루비를 배우는 동안 보게 될 루비의 주요 기능들의 요점과 힌트들을 알아봅시다. +Ruby를 배우는 동안 보게 될 Ruby의 주요 기능들의 요점과 힌트들을 알아봅시다. ### 이터레이션 -익숙해져야 하지만 전에 본 것과는 다를 수 있는 루비의 두 가지 기능은 "블록"과 -이터레이터입니다. (C, C++, or pre-1.5 자바처럼) 인덱스로 반복하거나 (펄의 -`for (@a) {...}`나 파이썬의 `for i in aList: ...`처럼) 리스트로 반복하는 -대신, 루비에서는 매우 자주 다음과 같은 구문을 사용하는 것을 보게 됩니다. +익숙해져야 하지만 전에 본 것과는 다를 수 있는 Ruby의 두 가지 기능은 "블록"과 +이터레이터입니다. (C, C++, pre-1.5 Java처럼) 인덱스로 반복하거나 (Perl의 +`for (@a) {...}`나 Python의 `for i in aList: ...`처럼) 리스트로 반복하는 +대신, Ruby에서는 매우 자주 다음과 같은 구문을 사용하는 것을 보게 됩니다. {% highlight ruby %} some_list.each do |this_item| @@ -61,7 +61,7 @@ z # => true ### 심볼은 가벼운 문자열이 아니다 -많은 루비 뉴비들은 심볼을 이해하는데 어려워하고, 어디에 사용하는 것인지 +많은 Ruby 뉴비들은 심볼을 이해하는데 어려워하고, 어디에 사용하는 것인지 궁금해 합니다. 심볼은 최선의 아이덴티티라고 할 수 있습니다. 심볼은 **무엇**인지에 대한 @@ -84,7 +84,7 @@ irb(main):003:0> 이제 문자열 (“george”)를 살펴봅시다. `object_id`가 일치하지 않습니다. 이 말은 메모리 안의 다른 객체를 참조하고 있다는 뜻입니다. 새로운 문자열을 -사용할 때마다, 루비는 매번 메모리에 할당 합니다. +사용할 때마다, Ruby는 매번 메모리에 할당 합니다. 심볼을 사용해야 할지 문자열을 사용해야 할지 결정해야 한다면, 무엇이 더 중요한지 생각해보세요. 객체의 아이덴티티가 중요한 경우(예를 들어 해시 키로 @@ -114,7 +114,7 @@ end ### 이름 규칙 -루비는 몇몇 이름 규칙을 강제합니다. 대문자로 시작하는 식별자는 상수입니다. +Ruby는 몇몇 이름 규칙을 강제합니다. 대문자로 시작하는 식별자는 상수입니다. 달러 기호(`$`)로 시작하면 전역 변수입니다. `@`로 시작하면 인스턴스 변수입니다. `@@`로 시작하면 클래스 변수입니다. @@ -132,7 +132,7 @@ end ### 키워드 인자 -루비 2.0부터 메서드는 파이썬처럼 키워드 인자로 선언할 +Ruby 2.0부터 메서드는 Python처럼 키워드 인자로 선언할 수 있습니다. {% highlight ruby %} @@ -148,22 +148,22 @@ deliver(via: "Pony Express", from: "B", to: "A") ### 범용적인 참 -루비에서는, **nil**과 **false**를 제외한 모든 것이 참으로 간주됩니다. -C나 파이썬이나 많은 다른 언어들에서 0과 빈 리스트같은 값들이 거짓으로 -간주됩니다. 다음 파이썬 코드를 보시죠. (이 예제는 다른 언어에도 적용됩니다) +Ruby에서는, **nil**과 **false**를 제외한 모든 것이 참으로 간주됩니다. +C나 Python이나 많은 다른 언어들에서 0과 빈 리스트같은 값들이 거짓으로 +간주됩니다. 다음 Python 코드를 보시죠. (이 예제는 다른 언어에도 적용됩니다) {% highlight python %} -# 파이썬 +# Python if 0: print("0 is true") else: print("0 is false") {% endhighlight %} -이 구문은 “0 is false”를 출력합니다. 같은 구문은 루비에서: +이 구문은 “0 is false”를 출력합니다. 같은 구문은 Ruby에서: {% highlight ruby %} -# 루비 +# Ruby if 0 puts "0 is true" else @@ -175,7 +175,7 @@ end ### 액세스 한정자는 스코프의 끝까지 적용 -다음 루비 코드에서, +다음 Ruby 코드에서, {% highlight ruby %} class MyClass @@ -206,18 +206,18 @@ end ### 메서드 액세스 -자바에서, `public`은 누구라도 액세스 할 수 있음을 의미합니다. `protected`는 +Java에서, `public`은 누구라도 액세스 할 수 있음을 의미합니다. `protected`는 클래스의 인스턴스, 하위 클래스의 인스턴스, 같은 패키지의 클래스의 인스턴스 는 액세스할 수 있지만, 그 밖의 장소에서는 액세스 할 수 없음을 의미합니다. `private`은 클래스의 인스턴스를 제외한 장소에서는 액세스 할 수 없음을 의미합니다. -루비는 약간 다릅니다. `public`은 말 그대로 공개입니다. `private`은 메서드에서만 +Ruby는 약간 다릅니다. `public`은 말 그대로 공개입니다. `private`은 메서드에서만 명시적인 수신기 없이 메서드를 호출할 수 있다는 말입니다. **self**만이 private 메서드 호출의 리시버로 허용됩니다. `protected` 밖에서부터 호출했을 때 주의해야 한다는 뜻입니다. `protected` 메서드는 클래스나 하위 클래스 인스턴스에서 호출할 수 있고, 다른 인스턴스를 리시버로 -사용할 수 있습니다. [루비 FAQ][faq]에서 가져온 예제입니다. +사용할 수 있습니다. [Ruby FAQ][faq]에서 가져온 예제입니다. {% highlight ruby %} class Test @@ -256,9 +256,9 @@ t1 == t2 ### 열린 클래스 -루비의 클래스는 열려 있습니다. 언제든 클래스를 열어서, 추가하고, 변경할 수 +Ruby의 클래스는 열려 있습니다. 언제든 클래스를 열어서, 추가하고, 변경할 수 있습니다. `Integer`나 심지어 모든 객체의 부모인 `Object` 같은 코어 클래스도 -예외는 아닙니다. 루비 온 레일즈에서는 시간을 제어하기 위해 `Integer`에 많은 +예외는 아닙니다. Ruby on Rails에서는 시간을 제어하기 위해 `Integer`에 많은 메서드를 추가해서 사용합니다. 밑을 보세요. {% highlight ruby %} @@ -276,7 +276,7 @@ Time.mktime(2006, 01, 01) + 14.hours # => Sun Jan 01 14:00:00 ### 웃긴 메서드 이름 -루비에서는, 메서드 이름이 물음표나 느낌표로 끝날 수 있습니다. +Ruby에서는, 메서드 이름이 물음표나 느낌표로 끝날 수 있습니다. 관례에 의하면, 질문에 답하는 메서드는 물음표로 끝납니다. (예를 들어 리시버가 비었을 때 **true**를 반환하는 `Array#empty?`) 관례에서 "위험할" 수 있는 메서드는 느낌표로 끝납니다. @@ -313,7 +313,7 @@ other_car.inspect # => Cheap car ### 없는 메서드 -루비는 특정 메시지에 응답할 메서드를 찾을 수 없을 때에도 포기하지 +Ruby는 특정 메시지에 응답할 메서드를 찾을 수 없을 때에도 포기하지 않습니다. 찾을 수 없었던 메서드의 이름과 인자를 가지고 `method_missing` 메서드를 호출합니다. 기본적으로 `method_missing`은 NameError 예외를 일으키지만, 애플리케이션에 맞게 재정의 할 수 있고 @@ -376,7 +376,7 @@ method(:puts).call "puts is an object!" ### 연산자는 신택스 슈거 -루비의 대부분의 연산자는 메서드 호출의 (몇가지 우선순위 규칙을 +Ruby의 대부분의 연산자는 메서드 호출의 (몇가지 우선순위 규칙을 포함한) 신택스 슈거입니다. 예를 들어, Integer의 + 메서드를 오버라이드 할 수 있습니다. @@ -405,7 +405,7 @@ C++의 `operator+` 같은 건 필요 없습니다. ## 더 읽을 거리 -더 많은 루비에 관한 정보를 보고 싶으시면 [문서](/ko/documentation) 항목을 +더 많은 Ruby에 관한 정보를 보고 싶으시면 [문서](/ko/documentation) 항목을 보세요. diff --git a/ko/documentation/ruby-from-other-languages/to-ruby-from-java/index.md b/ko/documentation/ruby-from-other-languages/to-ruby-from-java/index.md index f10a071d09..ea8a9528af 100644 --- a/ko/documentation/ruby-from-other-languages/to-ruby-from-java/index.md +++ b/ko/documentation/ruby-from-other-languages/to-ruby-from-java/index.md @@ -1,17 +1,17 @@ --- layout: page -title: "자바에서 루비로" +title: "Java에서 Ruby로" lang: ko --- -자바는 성숙하고 검증되어있고 (자바를 싫어하는 사람들은 여전히 이의를 -제기하겠지만) 빠릅니다. 하지만 장황하기도 합니다. 자바에서 루비로 +Java는 성숙하고 검증되어있고 (Java를 싫어하는 사람들은 여전히 이의를 +제기하겠지만) 빠릅니다. 하지만 장황하기도 합니다. Java에서 Ruby로 전환하면 코드량이 상당히 적어질 것입니다. 또 빠르게 프로토타입을 만들 때 시간이 적게 걸릴 것입니다. ### 비슷한 점들 -자바처럼, 루비에서도... +Java처럼, Ruby에서도... * 메모리는 가비지 컬렉터에서 관리합니다. * 객체는 강 타입입니다. @@ -21,12 +21,12 @@ lang: ko ### 다른 점들 -자바와는 다르게, 루비에서는... +Java와는 다르게, Ruby에서는... * 코드를 컴파일 할 필요가 없습니다. 직접 실행하시면 됩니다. -* 여러 인기있는 서드파티 GUI 툴킷이 있습니다. 루비 유저는 +* 여러 인기있는 서드파티 GUI 툴킷이 있습니다. Ruby 유저는 [WxRuby][1], [FXRuby][2], [Ruby-GNOME2][3], [Qt][4]나 - [루비 Tk](https://github.com/ruby/tk) 등을 사용할 수 있습니다. + [Ruby Tk](https://github.com/ruby/tk) 등을 사용할 수 있습니다. * 클래스 같은 것을 정의할 때 코드 블록에 중괄호를 넣는 대신, 선언 뒤에 `end` 키워드를 사용합니다. * `import` 대신 `require`를 사용합니다. @@ -44,9 +44,9 @@ lang: ko * 인터페이스 대신 “mixins”을 사용합니다. * YAML을 XML보다 선호하는 경향이 있습니다. * `null` 대신 `nil`을 사용합니다. -* 루비는 `==`과 `equals()`을 다르게 취급합니다. 루비에서 값이 같은지를 - 확인하려면 `==`를 사용하고(자바에서는 `equals()`), 객체가 같은지를 확인하려면 - `equal?()`를 사용합니다.(자바에서는 `==`) +* Ruby는 `==`과 `equals()`을 다르게 취급합니다. Ruby에서 값이 같은지를 + 확인하려면 `==`를 사용하고(Java에서는 `equals()`), 객체가 같은지를 확인하려면 + `equal?()`를 사용합니다.(Java에서는 `==`) diff --git a/ko/documentation/ruby-from-other-languages/to-ruby-from-python/index.md b/ko/documentation/ruby-from-other-languages/to-ruby-from-python/index.md index 95cf4c0103..6fd599331e 100644 --- a/ko/documentation/ruby-from-other-languages/to-ruby-from-python/index.md +++ b/ko/documentation/ruby-from-other-languages/to-ruby-from-python/index.md @@ -1,35 +1,35 @@ --- layout: page -title: "파이썬에서 루비로" +title: "Python에서 Ruby로" lang: ko --- -파이썬도 매우 좋은 범용적인 프로그래밍 언어입니다. 파이썬에서 루비로 -넘어오면 파이썬을 배울 때보다 조금 더 구문이 늘었을 뿐이라는 걸 +Python도 매우 좋은 범용적인 프로그래밍 언어입니다. Python에서 Ruby로 +넘어오면 Python을 배울 때보다 조금 더 구문이 늘었을 뿐이라는 걸 알게 될 것입니다. ### 비슷한 점들 -파이썬처럼, 루비에서도... +Python처럼, Ruby에서도... * 대화형 프롬프트가 있습니다. (`irb`라고 부릅니다.) * 커맨드 라인에서 문서를 읽을 수 있습니다. (`pydoc` 대신 `ri` 명령을 사용합니다.) * 라인 종결이 없습니다. (정상적인 줄 바꿈 제외). -* 문자열 리터럴은 파이썬의 3따옴표로 감싼 문자열처럼 여러 줄에 걸쳐 +* 문자열 리터럴은 Python의 3따옴표로 감싼 문자열처럼 여러 줄에 걸쳐 입력할 수 있습니다. -* 괄호는 리스트에, 중괄호는 사전형에 사용합니다.(사전형은 루비에선 +* 괄호는 리스트에, 중괄호는 사전형에 사용합니다.(사전형은 Ruby에선 "해시"라고 부릅니다.) * 배열은 같은 동작을 합니다. (배열을 더하면 하나의 긴 배열을 만들지만, `a3 = [ a1, a2 ]`처럼 구성하면 배열의 배열이 됩니다.) * 객체는 강(strongly)타입인 동시에 동적(dynamically)타입입니다. * 모든 것은 객체이며, 변수는 객체의 참조일 뿐입니다. * 키워드는 조금 다르지만, 예외는 거의 비슷하게 동작합니다. -* 내장형 문서화 툴이 있습니다. (루비에서는 rdoc이라 부릅니다.) +* 내장형 문서화 툴이 있습니다. (Ruby에서는 rdoc이라 부릅니다.) ### 다른 점들 -파이썬과는 다르게, 루비에서는... +Python과는 다르게, Ruby에서는... * 문자열은 변경 가능합니다. * 상수(변경할 의도가 없는 변수)를 만들 수 있습니다. @@ -38,19 +38,19 @@ lang: ko * 한 종류의 리스트 컨테이너(배열)밖에 없으며 배열은 변경 가능합니다. * 따옴표를 사용한 문자열은 (`\t` 같은) 이스케이프 시퀀스와 특수한 "표현식 치환" 신택스를 사용할 수 있습니다.(이는 `"add " + "strings " + "together"`처럼 - 적을 필요 없이 루비 표현식을 문자열 사이에 넣을 수 있게 합니다.) - 홀 따옴표는 파이썬의 `r"raw strings"`와 같습니다. + 적을 필요 없이 Ruby 표현식을 문자열 사이에 넣을 수 있게 합니다.) + 홀 따옴표는 Python의 `r"raw strings"`와 같습니다. * "새로운 스타일", "옛날 스타일" 클래스가 없습니다. 한 종류입니다. - (파이썬 3 이상은 이 문제가 없습니다만, 파이썬 2와의 완벽한 하위 호환은 + (Python 3 이상은 이 문제가 없습니다만, Python 2와의 완벽한 하위 호환은 되지 않습니다.) -* 속성을 직접 액세스할 수 없습니다. 루비에서는 전부 메서드 호출입니다. +* 속성을 직접 액세스할 수 없습니다. Ruby에서는 전부 메서드 호출입니다. * 메서드를 호출할 때의 괄호는 대부분 생략가능합니다. -* 파이썬의 `_자발적인_` 밑줄 `__규칙__` 대신 `public`, `private`, +* Python의 `_자발적인_` 밑줄 `__규칙__` 대신 `public`, `private`, `protected`로 액세스를 강제할 수 있습니다. * “mixins”은 다중 상속 대신 사용합니다. * 빌트인 클래스에 추가하고 수정할 수 있습니다. 두 언어 다 어느 시점에서든 - 클래스를 열고 수정할 수 있지만, 파이썬은 빌트인 클래스의 수정을 방지하고 - 있고, 루비는 아닙니다. + 클래스를 열고 수정할 수 있지만, Python은 빌트인 클래스의 수정을 방지하고 + 있고, Ruby는 아닙니다. * `True`나 `False` 대신 `true`나 `false`를 받습니다. (그리고 `None` 대신 `nil`을 받습니다.) * 참거짓을 평가할 때 `false`와 `nil`만이 거짓 값으로 평가됩니다. @@ -60,7 +60,7 @@ lang: ko * 코드 (아래의 docstring 대신) 위의 평범한 주석을 문서를 생성하는 데 사용합니다. * 좀 더 기억해야 하지만, 빨리 배울 수 있는 많은 단축 명령이 있습니다. - 단축명령들은 루비를 좀 더 재미있고, 생산적이게 합니다. -* (파이썬의 `del`문처럼) 한 번 설정한 변수를 해제하는 방법은 없습니다. + 단축명령들은 Ruby를 좀 더 재미있고, 생산적이게 합니다. +* (Python의 `del`문처럼) 한 번 설정한 변수를 해제하는 방법은 없습니다. 낡은 콘텐츠를 가비지 컬렉션하도록 변수를 nil로 리셋할 수는 있지만 변수는 스코프가 끝날 때까지 심볼 테이블에 남습니다. diff --git a/ko/documentation/success-stories/index.md b/ko/documentation/success-stories/index.md index 9c51ca88f3..d000e16d45 100644 --- a/ko/documentation/success-stories/index.md +++ b/ko/documentation/success-stories/index.md @@ -4,40 +4,40 @@ title: "사용 사례" lang: ko --- -많은 사람들이 현업이나 취미로 일상적으로 루비를 사용하고 있습니다. -여기에 참고로 실생활에서 루비를 사용하고 있는 예를 모아 보았습니다. +많은 사람들이 현업이나 취미로 일상적으로 Ruby를 사용하고 있습니다. +여기에 참고로 실생활에서 Ruby를 사용하고 있는 예를 모아 보았습니다. {: .summary} #### 시뮬레이션 -* [NASA Langley Research Center][1]에서는 루비를 지휘 시뮬레이션에 +* [NASA Langley Research Center][1]에서는 Ruby를 지휘 시뮬레이션에 사용하고 있습니다. -* [Motorola][2]의 연구 그룹에서는 루비를 시나리오를 생성하고 데이터의 +* [Motorola][2]의 연구 그룹에서는 Ruby를 시나리오를 생성하고 데이터의 처리를 저장하는 시뮬레이터를 작성하는 곳에 사용합니다. #### 3D 모델링 -* [Google SketchUp][3]은 루비를 마이크로 스크립팅 API로 사용한 +* [Google SketchUp][3]은 Ruby를 마이크로 스크립팅 API로 사용한 3D 모델링 애플리케이션입니다. #### 비지니스 * [Toronto Rehab][4]은 IT 헬프 데스크 IT 오퍼레이션의 전화, 웹 고객지원을 - 관리하고 추적하는데 루비 웹 다이얼로그 기반의 애플리케이션을 사용합니다. + 관리하고 추적하는데 Ruby 웹 다이얼로그 기반의 애플리케이션을 사용합니다. #### 로봇공학 -* MORPHA 프로젝트에서는, 루비는 Siemens 서비스 로봇의 반응 컨트롤 +* MORPHA 프로젝트에서는, Ruby는 Siemens 서비스 로봇의 반응 컨트롤 부분에 사용되고 있습니다. #### 전화 -* 루비는 3G 무선 전화 제품인 Lucent에서도 사용됩니다. +* Ruby는 3G 무선 전화 제품인 Lucent에서도 사용됩니다. #### 시스템 관리 -* 루비는 전 세계에 흩어져 있는 1700대의 UNIX (Solaris와 Linux) 서버에서 +* Ruby는 전 세계에 흩어져 있는 1700대의 UNIX (Solaris와 Linux) 서버에서 성능 정보를 수집하는 유닉스 한계측정(Capacity) 플래닝 시스템인 [Level 3 Communications][8]의 중앙 정보 수집 부분을 작성하는데에도 사용되었습니다. @@ -45,10 +45,10 @@ lang: ko #### 웹 애플리케이션 * [Basecamp][9]는 [37signals][10]에서 개발한 웹기반 프로젝트 관리 툴입니다. - 코드는 전부 루비로 되어있습니다. + 코드는 전부 Ruby로 되어있습니다. * [A List Apart][11]는 1997년부터 발행된 웹 사이트를 만드는 사람들을 위한 - 메거진입니다. 최근에 루비 온 레일즈로 만들어진 독자적인 애플리케이션으로 + 메거진입니다. 최근에 Ruby on Rails로 만들어진 독자적인 애플리케이션으로 리뉴얼하였습니다. #### 보안 @@ -59,7 +59,7 @@ lang: ko 테스트 플랫폼입니다. Metasploit 프로젝트의 코드 700,000 라인으로 구성되어 있으며 2010년에만 백만 회 이상 다운로드 되었습니다. 상용 버전인 Metasploit Express와 Metasploit Pro도 - Rapid7에서 개발하였으며 루비를 사용합니다. + Rapid7에서 개발하였으며 Ruby를 사용합니다. diff --git a/ko/downloads/index.md b/ko/downloads/index.md index bc51a953ae..18e37a19cf 100644 --- a/ko/downloads/index.md +++ b/ko/downloads/index.md @@ -1,17 +1,17 @@ --- layout: page -title: "루비 다운로드" +title: "Ruby 다운로드" lang: ko --- -자신이 선호하는 방식으로 최신 루비 배포판을 설치할 수 있습니다. +자신이 선호하는 방식으로 최신 Ruby 배포판을 설치할 수 있습니다. 현재 안정 버전은 {{ site.data.downloads.stable[0] }}입니다. -[루비 라이센스][license]를 읽어 보세요. +[Ruby 라이선스][license]를 읽어 보세요. {: .summary} -### 루비를 설치하는 방법 +### Ruby를 설치하는 방법 -각 주요 플랫폼에서 루비를 설치할 수 있는 몇 가지 도구가 있습니다. +각 주요 플랫폼에서 Ruby를 설치할 수 있는 몇 가지 도구가 있습니다. * Linux/UNIX에서는 시스템에 포함된 패키지 관리 시스템이나 서드파티 도구([rbenv][rbenv]나 [RVM][rvm])를 사용할 수 있습니다. @@ -23,35 +23,35 @@ lang: ko 물론, 주요 플랫폼에서 소스 코드로부터 설치할 수도 있습니다. -### 루비 컴파일하기 - 소스 코드 +### Ruby 컴파일하기 - 소스 코드 사용 중인 플랫폼에 충분히 익숙하고, 자신의 환경을 위한 특별한 설정이 필요한 경우, 소스 코드로 설치하면 좋습니다. 플랫폼에 미리 만들어진 패키지가 없을 때에도 좋은 해결책이 되죠. -루비를 소스에서 빌드하려면 [설치][installation] 페이지에서 -자세한 내용을 참고하세요. 루비를 컴파일하는 데 문제가 있다면, +Ruby를 소스에서 빌드하려면 [설치][installation] 페이지에서 +자세한 내용을 참고하세요. Ruby를 컴파일하는 데 문제가 있다면, 위에서 소개한 서드파티 도구 중 하나를 이용해 보세요. 도움이 될 것입니다. * **안정 릴리스:**{% for version in site.data.downloads.stable %}{% assign release = site.data.releases | where: "version", version | first %} - * [루비 {{ release.version }}]({{ release.url.gz }})
+ * [Ruby {{ release.version }}]({{ release.url.gz }})
sha256: {{ release.sha256.gz }}{% endfor %} {% if site.data.downloads.preview %} * **프리뷰 릴리스:**{% for version in site.data.downloads.preview %}{% assign release = site.data.releases | where: "version", version | first %} - * [루비 {{ release.version }}]({{ release.url.gz }})
+ * [Ruby {{ release.version }}]({{ release.url.gz }})
sha256: {{ release.sha256.gz }}{% endfor %} {% endif %} {% if site.data.downloads.security_maintenance %} * **보안 유지보수 단계(곧 EOL 예정!):**{% for version in site.data.downloads.security_maintenance %}{% assign release = site.data.releases | where: "version", version | first %} - * [루비 {{ release.version }}]({{ release.url.gz }})
+ * [Ruby {{ release.version }}]({{ release.url.gz }})
sha256: {{ release.sha256.gz }}{% endfor %} {% endif %} {% if site.data.downloads.eol %} * **더 이상 유지보수 없음(EOL):**{% for version in site.data.downloads.eol %}{% assign release = site.data.releases | where: "version", version | first %} - * [루비 {{ release.version }}]({{ release.url.gz }})
+ * [Ruby {{ release.version }}]({{ release.url.gz }})
sha256: {{ release.sha256.gz }}{% endfor %} {% endif %} @@ -65,13 +65,13 @@ lang: ko 특정 릴리스(특히 오래된 것이나 프리뷰 버전의 경우)에 대한 자세한 정보는 [릴리스 페이지][releases]에서 볼 수 있습니다. -여러 루비 브랜치의 현 유지보수 상태에 대해서는 [브랜치 페이지][branches]에서 +여러 Ruby 브랜치의 현 유지보수 상태에 대해서는 [브랜치 페이지][branches]에서 볼 수 있습니다. -루비 서브버전과 Git 저장소에 대한 정보는, [루비 코어](/ko/community/ruby-core/) +Ruby 서브버전과 Git 저장소에 대한 정보는, [Ruby 코어](/ko/community/ruby-core/) 페이지를 읽어 보세요. -루비 소스는 전세계의 [미러 사이트][mirrors]에서 사용할 수 있습니다. +Ruby 소스는 전세계의 [미러 사이트][mirrors]에서 사용할 수 있습니다. 자신과 가까운 곳의 미러를 이용해 주세요. diff --git a/ko/examples/cities.md b/ko/examples/cities.md index d85dec096c..185b3699e1 100644 --- a/ko/examples/cities.md +++ b/ko/examples/cities.md @@ -3,7 +3,7 @@ layout: null --- {% highlight ruby %} -# 루비는 당신의 말을 +# Ruby는 당신의 말을 # 이해합니다. 전체 # 배열의 계산을 하려고 # 할 때에도 말이죠. diff --git a/ko/examples/hello_world.md b/ko/examples/hello_world.md index 6ab81d8682..b90ea32910 100644 --- a/ko/examples/hello_world.md +++ b/ko/examples/hello_world.md @@ -4,8 +4,8 @@ layout: null {% highlight ruby %} # Hello World 프로그램은 -# 루비로 짜면 간단합니다 -# 불 필요한 것들: +# Ruby로 짜면 간단합니다 +# 불필요한 것들: # # * "main" 메서드 # * 줄 바꿈 diff --git a/ko/index.html b/ko/index.html index dee30bec1f..dcba85096a 100644 --- a/ko/index.html +++ b/ko/index.html @@ -1,6 +1,6 @@ --- layout: homepage -title: "루비 : 개발자의 단짝 친구" +title: Ruby 프로그래밍 언어 lang: ko header: | @@ -9,20 +9,32 @@ intro: |
-

루비는...

+

Ruby는...

- 간결함과 생산성을 강조한 동적인 오픈 소스 프로그래밍 언어입니다. -

-

- 루비의 우아한 문법으로 자연스럽게 읽히고 쓰기 편한 프로그램을 만들 수 있습니다. + 단순함과 생산성에 초점을 둔 동적 + 오픈 소스 프로그래밍 언어입니다. 자연스럽게 읽히고 쓰기 쉬운 + 우아한 문법을 가지고 있습니다.

- 루비 다운로드 + Ruby 다운로드 또는 - 자세히 읽기... + 자세히 알아보기... +
-
+
--- diff --git a/ko/libraries/index.md b/ko/libraries/index.md index b1d3070a3a..2e6b7eacf5 100644 --- a/ko/libraries/index.md +++ b/ko/libraries/index.md @@ -4,14 +4,14 @@ title: "라이브러리" lang: ko --- -대부분의 프로그래밍 언어와 마찬가지로 루비에서도 폭넓은 서드파티 라이브러리가 +대부분의 프로그래밍 언어와 마찬가지로 Ruby에서도 폭넓은 서드파티 라이브러리가 제공되고 있습니다. {: .summary} -대부분의 서드파티 라이브러리들은 **젬** 방식으로 배포되고 있습니다. [**RubyGems**][1]는 -루비에 특화된 `apt-get` 비슷한 분산 패키지 시스템으로 라이브러리의 작성이나 공개, -설치를 도와주는 시스템입니다. 루비 1.9 이후 버전부터 RubyGems는 루비에 동봉되어 -있습니다. 이전 버전의 루비에서는 [직접 설치][2]할 필요가 있습니다. +대부분의 서드파티 라이브러리들은 **gem** 방식으로 배포되고 있습니다. [**RubyGems**][1]는 +Ruby에 특화된 `apt-get` 비슷한 분산 패키지 시스템으로 라이브러리의 작성이나 공개, +설치를 도와주는 시스템입니다. Ruby 1.9 이후 버전부터 RubyGems는 Ruby에 동봉되어 +있습니다. 이전 버전의 Ruby에서는 [직접 설치][2]할 필요가 있습니다. 그 외의 라이브러리는 **소스 코드** 디렉터리를 압축(.zip, .tar.gz)한 형태로 배포됩니다. 설치 방법은 다양하지만 보통 `README`나 `INSTALL`에 방법이 적혀있습니다. @@ -20,21 +20,21 @@ lang: ko ### 라이브러리 찾기 -루비의 라이브러리는 보동 [**RubyGems.org**][1]에서 젬으로 제공됩니다. 직접 +Ruby의 라이브러리는 보동 [**RubyGems.org**][1]에서 gem으로 제공됩니다. 직접 웹사이트에서 둘러보거나 `gem` 명령어로 이용할 수 있습니다. `gem search -r` 명령어를 사용해 RubyGems의 저장소를 조사할 수 있습니다. 예를 들어 -`gem search -r rails`는 레일즈와 관련된 젬들의 목록을 돌려줍니다. -`--local` (`-l`) 옵션을 사용하면 설치된 젬들에 대해 로컬 검색할 수 있습니다. 젬을 -설치하려면 `gem install [gem]`을 사용합니다. 설치된 젬을 보려면 `gem +`gem search -r rails`는 Rails와 관련된 gem들의 목록을 돌려줍니다. +`--local` (`-l`) 옵션을 사용하면 설치된 gem에 대해 로컬 검색할 수 있습니다. gem을 +설치하려면 `gem install [gem]`을 사용합니다. 설치된 gem을 보려면 `gem list`를 사용합니다. 좀 더 정보가 필요하시면 아래 내용을 좀 더 읽으시거나 [RubyGems의 문서][3]를 참조하세요. -다른 라이브러리의 배포처도 있습니다. [**GitHub**][5]는 루비 관련 라이브러리의 -주요 배포처입니다. 완전한 젬은 RubyGems.org에 공개되어 있지만, 대부분의 젬의 +다른 라이브러리의 배포처도 있습니다. [**GitHub**][5]는 Ruby 관련 라이브러리의 +주요 배포처입니다. 완전한 gem은 RubyGems.org에 공개되어 있지만, 대부분의 gem의 소스코드는 GitHub에서 볼 수 있습니다. -[**The Ruby Toolbox**][6]는 오픈소스이며 루비 프로젝트를 검색하기 쉽게 하기 위한 +[**The Ruby Toolbox**][6]는 오픈소스이며 Ruby 프로젝트를 검색하기 쉽게 하기 위한 프로젝트입니다. 다양한 종류의 일반적인 개발 작업을 카테고리로 릴리스나 커밋의 활발함, 라이브러리의 의존관계 등 각 프로젝트의 다양한 정보를 모았습니다. 또 RubyGems.org와 GitHub의 인기를 바탕으로 프로젝트의 순위를 매깁니다. 검색을 하면 원하는 것을 쉽게 찾으실 @@ -45,9 +45,9 @@ GitHub의 인기를 바탕으로 프로젝트의 순위를 매깁니다. 검색 많이 쓰이는 `gem` 명령어를 가볍게 보시려면, 이 패키지 관리시스템의 전반에 대한 [좀 더 자세한 문서][7]도 있습니다. -#### 젬 찾기 +#### gem 찾기 -특정 이름으로 젬을 찾기 위해서는 **search** 명령을 사용합니다. 예를 들어 “html”이란 단어를 포함한 젬을 찾고 +특정 이름으로 gem을 찾기 위해서는 **search** 명령을 사용합니다. 예를 들어 “html”이란 단어를 포함한 gem을 찾고 싶다면, {% highlight sh %} @@ -59,12 +59,12 @@ html-sample (1.0, 1.1) {% endhighlight %} `--remote` / `-r` 플래그는 공식 RubyGems.org 저장소에서 검색하려 한다는 -의미입니다. (기본 동작) `--local` / `-l` 플래그로는 설치된 젬에 대해 +의미입니다. (기본 동작) `--local` / `-l` 플래그로는 설치된 gem에 대해 검색하게 됩니다. -#### 젬 설치하기 +#### gem 설치하기 -젬을 설치하려면 **install** 명령을 사용하면 됩니다. 예를 들어 레일즈를 +gem을 설치하려면 **install** 명령을 사용하면 됩니다. 예를 들어 Rails를 설치하려면 이렇게 하면 됩니다. {% highlight sh %} @@ -77,16 +77,16 @@ $ gem install rails $ gem install rails --version 5.0 {% endhighlight %} -#### 전체 젬 목록 +#### 전체 gem 목록 -현재 설치된 젬의 **목록**을 얻으려면 이렇게 하면 됩니다. +현재 설치된 gem의 **목록**을 얻으려면 이렇게 하면 됩니다. {% highlight sh %} $ gem list {% endhighlight %} -매우 길긴 하지만 RubyGems.org에 등록된 전체 젬 **목록**을 볼 수도 있습니다. +매우 길긴 하지만 RubyGems.org에 등록된 전체 gem **목록**을 볼 수도 있습니다. {% highlight sh %} $ gem list -r @@ -102,7 +102,7 @@ $ gem help 예를 들어 `gem help commands`는 모든 `gem`들의 명령어를 볼 수 있어 매우 유용합니다. -#### 젬을 직접 만드려면 +#### gem을 직접 만드려면 RubyGems.org에는 이 주제에 대한 [몇 가지 가이드][3]가 있습니다. 덤으로 [Bundler][9]에 대해서 조사해보는 것도 좋습니다. Bundler는 RubyGems과 같이 일반적으로 diff --git a/ko/security/index.md b/ko/security/index.md index 11b6cae6d9..6d7294e95a 100644 --- a/ko/security/index.md +++ b/ko/security/index.md @@ -1,10 +1,10 @@ --- layout: page -title: "보안이슈" +title: "보안" lang: ko --- -루비와 관련한 보안이슈에 대해 정보를 공유하는 곳입니다. +Ruby와 관련한 보안 이슈에 대해 정보를 공유하는 곳입니다. {: .summary} ## 보안 취약점 알리기 @@ -13,7 +13,7 @@ lang: ko security@ruby-lang.org ([the PGP public key](/security.asc))로 메일을 보내주십시오. 이는 비공개 메일링 리스트로 운영되고 있으며 보고된 문제에 대한 확인과 해결책이 이루어진 다음 일반에게 정보를 공개하고 있습니다. -이 메일링 리스트의 맴버는 루비를 제공하는 사람들(루비 커미터, 루비 구현 부의 +이 메일링 리스트의 맴버는 Ruby를 제공하는 사람들(Ruby 커미터, Ruby 구현부의 저자, 배포 담당자, PaaS 플랫폼 관리자)입니다. 맴버는 반드시 개인이어야 하며, 메일링 리스트는 허용되지 않습니다. From a0d777104fc7555648cf537af062e601a9649640 Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Sat, 1 May 2021 21:46:20 +0700 Subject: [PATCH 0371/1487] Translate Ruby 3.0.0 released news (id) --- .../_posts/2020-12-25-ruby-3-0-0-released.md | 458 ++++++++++++++++++ 1 file changed, 458 insertions(+) create mode 100644 id/news/_posts/2020-12-25-ruby-3-0-0-released.md diff --git a/id/news/_posts/2020-12-25-ruby-3-0-0-released.md b/id/news/_posts/2020-12-25-ruby-3-0-0-released.md new file mode 100644 index 0000000000..1a642f389b --- /dev/null +++ b/id/news/_posts/2020-12-25-ruby-3-0-0-released.md @@ -0,0 +1,458 @@ +--- +layout: news_post +title: "Ruby 3.0.0 Dirilis" +author: "naruse" +translator: "meisyal" +date: 2020-12-25 00:00:00 +0000 +lang: id +--- + +Kami dengan senang hati mengumumkan rilis dari Ruby 3.0.0. Dari tahun 2015, kami +bekerja keras untuk Ruby 3 yang mana tujuannya adalah kinerja, *concurrency*, +dan *Typing*. Khususnya kinerja, Matz mengatakan "Ruby3 akan 3 kali lebih +cepat dibanding Ruby2" yang juga dikenal dengan +[Ruby 3x3](https://blog.heroku.com/ruby-3-by-3). + +{% assign release = site.data.releases | where: "version", "3.0.0" | first %} + +Optcarrot 3000 frames + +Dengan [Optcarrot benchmark](https://github.com/mame/optcarrot), yang mengukur +kinerja *single thread* berdasarkan beban kerja NES's *game emulation*, kinerja +Ruby 3.0 mencapai 3x lebih cepat dibanding Ruby 2.0!
Ini dihitung pada +*environment* yang dicatat dalam [benchmark-driver.github.io/hardware.html](https://benchmark-driver.github.io/hardware.html). [Commit 8c510e4095](https://github.com/ruby/ruby/commit/8c510e4095) +yang digunakan sebagai *benchmark* ini. Kinerja mungkin tidak 3x lebih cepat +karena bergantung pada *environment* atau *benchmark* Anda.
+ +Ruby 3.0.0 mencapai tujuan tersebut dengan: +* Kinerja + * MJIT +* *Concurrency* + * *Ractor* + * *Fiber Scheduler* +* *Typing* (Analisis Statis) + * RBS + * *TypeProf* + +Dengan perbaikan kinerja di atas, Ruby 3.0 mengenalkan sejumlah fitur baru yang +digambarkan sebagai berikut. + +## Kinerja + +> Ketika saya menyatakan "Ruby3x3" pertama kali pada sebuah konferensi, banyak +> peserta termasuk anggota dari *core team* merasa "Matz is a boaster". +> Kenyataannya, saya juga merasa begitu. Tetapi, kami berhasil. Saya merasa +> terhormat melihat *core team* benar-benar bisa menjadikan Ruby3.0 tiga kali +> lebih cepat dibanding Ruby2.0 (pada beberapa *benchmark*). -- Matz + +### MJIT + +Banyak perbaikan yang telah diimplementasikan pada MJIT. Lihat NEWS untuk +detail. + +Pada Ruby 3.0, JIT seharusnya memberikan perbaikan kinerja pada beban kerja +terbatas, seperti permainan +([Optcarrot](https://benchmark-driver.github.io/benchmarks/optcarrot/commits.html#chart-1)), +AI ([Rubykon](https://benchmark-driver.github.io/benchmarks/rubykon/commits.html)), +atau aplikasi apapun yang mayoritas menghabiskan waktu saat memanggil beberapa +*method* berkali-kali. + +Meskipun Ruby 3.0 [significantly decreased the size of JIT-ed code](https://twitter.com/k0kubun/status/1256142302608650244), +ini masih belum siap untuk mengomptimalkan beban kerja seperti *Rails*, yang +mana menghabiskan waktu pada banyak *method*. Sehingga, ini akan menderita dari +*i-cache misses* yang diperburuk oleh JIT. Nantikan perbaikan lebih lanjut +masalah ini pada Ruby 3.1. + +## Concurrency / Parallel + +> Ini zaman *multi-core* sekarang. *Concurrency* sangatlah penting. Dengan +> *Ractor*, bersama dengan *Async Fiber*, Ruby akan menjadi sebuah bahasa +> *concurrent* asli. --- Matz + +### Ractor (eksperimental) + +*Ractor* adalah sebuah *Actor-model* seperti *concurrent abstraction* yang +didesain untuk menyediakan sebuah fitur eksekusi paralel tanpa mengkhawatirkan +*thread-safety*. + +Anda dapat membuat beberapa *ractor* dan menjalankannya secara paralel. *Ractor* +memungkinkan untuk membuat program paralel yang *thread-safe* karena *ractor* +tidak dapat membagi objek normal. Komunikasi antar *ractor* didukung oleh +pertukaran pesan. + +Untuk membatasi pembagian objek, *Ractor* mengenalkan beberapa batasan pada +sintaks Ruby (tanpa banyak *Ractor*, maka tidak ada batasan). + +Spesifikasi dan implementasi dari *Ractor* masih belum sempurna dan memungkinkan +adanya perubahan ke depan, sehingga fitur ini ditandai dengan eksperimental +dan menampilkan peringatan "experimental feature" saat `Ractor.new` pertama kali. + +Berikut adalah program kecil untuk mengukur waktu eksekusi dari fungsi populer +*tak* ([Tak (function) - Wikipedia](https://en.wikipedia.org/wiki/Tak_(function))), +dengan mengeksekusinya 4 kali secara berurutan atau 4 kali secara paralel dengan +*Ractor*. + +``` ruby +def tarai(x, y, z) = + x <= y ? y : tarai(tarai(x-1, y, z), + tarai(y-1, z, x), + tarai(z-1, x, y)) +require 'benchmark' +Benchmark.bm do |x| + # versi berurutan + x.report('seq'){ 4.times{ tarai(14, 7, 0) } } + + # versi paralel + x.report('par'){ + 4.times.map do + Ractor.new { tarai(14, 7, 0) } + end.each(&:take) + } +end +``` + +``` +Hasil benchmark: + user system total real +seq 64.560736 0.001101 64.561837 ( 64.562194) +par 66.422010 0.015999 66.438009 ( 16.685797) +``` + +Hasil diukur pada Ubuntu 20.04, Intel(R) Core(TM) i7-6700 (4 *cores*, 8 +*hardware threads*). Ini menunjukkan versi paralel 3.87 kali lebih cepat +dibanding versi berurutan. + +Lihat [doc/ractor.md](https://docs.ruby-lang.org/en/3.0.0/doc/ractor_md.html) +untuk lebih detail. + +### Fiber Scheduler + +`Fiber#scheduler` diperkenalkan untuk menghalangi operasi *blocking*. Ini +memperbolehkan *light-weight concurrency* tanpa pengubahan kode yang sudah ada. +Tonton ["Don't Wait For Me, Scalable Concurrency for Ruby 3"](https://www.youtube.com/watch?v=Y29SSOS4UOc) +sebagai gambaran bagaimana fitur ini bekerja. + +Saat ini, *class*/*method* yang didukung: + +- `Mutex#lock`, `Mutex#unlock`, `Mutex#sleep` +- `ConditionVariable#wait` +- `Queue#pop`, `SizedQueue#push` +- `Thread#join` +- `Kernel#sleep` +- `Process.wait` +- `IO#wait`, `IO#read`, `IO#write`, dan *method* yang berkaitan (seperti `#wait_readable`, `#gets`, `#puts` dan lainnya). +- `IO#select` *tidak didukung*. + +Ini adalah contoh program yang akan melakukan beberapa HTTP *request* secara +bersamaan: + +``` ruby +require 'async' +require 'net/http' +require 'uri' + +Async do + ["ruby", "rails", "async"].each do |topic| + Async do + Net::HTTP.get(URI "https://www.google.com/search?q=#{topic}") + end + end +end +``` + +Ini menggunakan [async](https://github.com/socketry/async) yang mana menyediakan +*event loop*. *Event loop* ini menggunakan `Fiber#scheduler` *hook* untuk +membuat `Net::HTTP` *non-blocking*. *Gem* lainnya dapat menggunakan *interface* +ini untuk menyediakan eksekusi *non-blocking* pada Ruby dan *gem* tersebut +cocok dengan implementasi Ruby lainnya (misalnya, JRuby, TruffleRuby) yang dapat +mendukung *non-blocking hook* yang sama. + +## Analisis Statis + +> 2010-an adalah zaman dari *statically typed programming language*. Ruby melihat +> masa depan dengan *static type checking*, tanpa *type declaration*, +> menggunakan interpretasi abstrak. RBS & *TypeProf* adalah langkah pertama +> menuju masa depan. Lebih banyak langkah yang akan datang. --- Matz + +### RBS + +RBS adalah sebuah bahasa untuk mendeskripsikan tipe dari program Ruby. + +*Type checker* termasuk *TypeProf* dan *tool* lainnya yang mendukung RBS +akan memahami program Ruby jauh lebih baik dengan definisi RBS. + +Anda dapat menuliskan definisi *class* dan *module*: *method* didefinisikan di +dalam *class*, *instance variables* dan tipenya, serta hubungan +*inheritance/mix-in*. + +RBS memiliki tujuan untuk mendukung pola yang biasanya +kita lihat dalam program Ruby dan memperbolehkan penulisan *advanced types* +yang berisi *union type*, *method overloading*, dan *generic*. RBS juga +mendukung *duck typing* dengan _interface types_. + +Ruby 3.0 dirilis dengan gem `rbs`, yang memperbolehkan untuk mem-*parse* dan +memproses definisi tipe yang ditulis di dalam RBS. Berikut ini adalah sebuah +contoh kecil dari RBS dengan *class*, *module*, dan *constant definition*. + +``` rbs +module ChatApp + VERSION: String + class Channel + attr_reader name: String + attr_reader messages: Array[Message] + attr_reader users: Array[User | Bot] # `|` means union types, `User` or `Bot`. + def initialize: (String) -> void + def post: (String, from: User | Bot) -> Message # Method overloading is supported. + | (File, from: User | Bot) -> Message + end +end +``` + +Lihat [README dari gem rbs](https://github.com/ruby/rbs) untuk lebih detail. + +### TypeProf + +*TypeProf* adalah sebuah *type analysis tool* yang di-*bundle* di dalam Ruby. + +Saat ini, *TypeProf* berperan semacam sebuah *type inference*. + +*TypeProf* membaca kode Ruby (*non-type-annotated*), menganalisis apa *method* +yang didefinisikan dan bagaimana itu digunakan, dan menghasilkan sebuah +prototipe dari *type signature* dalam format RBS. + +Berikut adalah sebuah demonstrasi sederhana dari *TypeProf*. + +Contoh masukan: + +``` ruby +# test.rb +class User + def initialize(name:, age:) + @name, @age = name, age + end + attr_reader :name, :age +end +User.new(name: "John", age: 20) +``` + +Contoh keluaran: + +``` +$ typeprof test.rb +# Classes +class User + attr_reader name : String + attr_reader age : Integer + def initialize : (name: String, age: Integer) -> [String, Integer] +end +``` + +Anda dapat menjalankan *TypeProf* dengan menyimpan masukan sebagai "test.rb" +dan memanggilnya dengan perintah "typeprof test.rb". + +Anda juga dapat [mencoba TypeProf daring](https://mame.github.io/typeprof-playground/#rb=%23+test.rb%0Aclass+User%0A++def+initialize%28name%3A%2C+age%3A%29%0A++++%40name%2C+%40age+%3D+name%2C+age%0A++end%0A++%0A++attr_reader+%3Aname%2C+%3Aage%0Aend%0A%0AUser.new%28name%3A+%22John%22%2C+age%3A+20%29&rbs=). (Ini menjalankan *TypeProf* di *server*, maaf jika hasilnya tidak keluar) + +Lihat [dokumentasi](https://github.com/ruby/typeprof/blob/master/doc/doc.md) +dan [demonstrasi](https://github.com/ruby/typeprof/blob/master/doc/demo.md) +untuk detail. + +*TypeProf* masih eksperimental dan belum sempurna; hanya sebagian dari bahasa +Ruby didukung dan pendeteksian *type error* terbatas. Tetapi, ini masih bisa +berkembang dengan memperbaiki cakupan dari fitur bahasa, performa analisis, +dan kegunaan. Masukan apapun sangat diterima. + +## Fitur Baru Lainnya + +* *One-line pattern matching* didesain ulang. (eksperimental) + + * `=>` ditambahkan. Ini bisa digunakan seperti *rightward assignment*. + + ```ruby + 0 => a + p a #=> 0 + + {b: 0, c: 1} => {b:} + p b #=> 0 + ``` + + * `in` diubah dengan mengembalikan `true` atau `false`. + + ```ruby + # version 3.0 + 0 in 1 #=> false + + # version 2.7 + 0 in 1 #=> raise NoMatchingPatternError + ``` + +* *Find pattern* ditambahkan. (eksperimental) + + ``` ruby + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + ``` + +* Definisi *endless method* ditambahkan. + + ``` ruby + def square(x) = x * x + ``` + +* `Hash#except` sekarang *built-in*. + + ``` ruby + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + ``` + +* *Memory view* ditambahkan sebagai sebuah fitur eksperimental + + * Ini adalah sebuah kumpulan C-API baru yang menukar sebuah area *raw memory*, seperti sebuah *numeric array* dan sebuah *bitmap image*, antara pustaka *extension*. Pustaka *extension* dapat juga membagikan *metadata* dari area *memory* yang terdiri dari bentuk, format elemen, dan sebagainya. Menggunakan semacam *metadata* seperti ini, pustaka *extension* bahkan dapat membagikan sebuah *multidimensional array* dengan tepat. Fitur ini didesain dengan merujuk pada *buffer protocol* dari Python. + +## Perbaikan performa + +* Menempelkan kode yang panjang pada IRB 53 kali lebih cepat dibandingkan yang di-*bundle* dengan Ruby 2.7.0. Sebagai contoh, waktu yang dibutuhkan untuk menempelkan [kode ini](https://gist.github.com/aycabta/30ab96334275bced5796f118c9220b0b) berubah dari 11.7 detik menjadi 0.22 detik. + + + + + +* Perintah `measure` telah ditambakan ke IRB. Ini memperbolehkan perhitungan waktu eksekusi secara sederhana. + + ``` + irb(main):001:0> 3 + => 3 + irb(main):002:0> measure + TIME is added. + => nil + irb(main):003:0> 3 + processing time: 0.000058s + => 3 + irb(main):004:0> measure :off + => nil + irb(main):005:0> 3 + => 3 + ``` + +## Perubahan penting lainnya sejak 2.7 + +* *Keyword argument* dipisahkan dari *argument* lainnya. + * Pada dasarnya, kode yang mencetak sebuah peringatan pada Ruby 2.7 tidak akan +bekerja. Lihat [dokumen](https://www.ruby-lang.org/id/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/) untuk detail. + * Omong-omong, *argument forwarding* sekarang mendukung *leading argument*. + + ``` ruby + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end + ``` + +* *Pattern matching* (`case`/`in`) tidak lagi eksperimental. + * Lihat [dokumentasi pattern matching](https://docs.ruby-lang.org/en/3.0.0/doc/syntax/pattern_matching_rdoc.html) untuk detail. +* Fitur `$SAFE` telah dihilangkan; sekarang adalah sebuah variabel global. +* Urutan dari *backtrace* telah dibalik pada Ruby 2.5, tetapi itu dibatalkan. Sekarang urutan berperilaku seperti Ruby 2.4; pesan *error* dan nomor baris di mana *exception* terjadi dicetak terlebih dahulu dan pemanggilnya baru dicetak kemudian. +* Beberapa pustaka standar yang diperbarui. +* Berikut adalah pustaka yang tidak lagi masuk sebagai *bundled gem*. + * RubyGems 3.2.3 + * Bundler 2.2.3 + * IRB 1.3.0 + * Reline 0.2.0 + * Psych 3.3.0 + * JSON 2.5.1 + * BigDecimal 3.0.0 + * CSV 3.1.9 + * Date 3.1.0 + * Digest 3.0.0 + * Fiddle 1.0.6 + * StringIO 3.0.0 + * StringScanner 3.0.0 + * lainnya. +* Pustakan berikut tidak lagi *bundle gem* atau pustaka standar. + Pasang *gem* berikut jika ingin menggunakan fiturnya. + * sdbm + * webrick + * net-telnet + * xmlrpc +* Berikut adalah *default gem* yang sekarang menjadi *bundled gem*. + * rexml + * rss +* Berikut adalah berkas *stdlib* yang sekarang menjadi *default gem* dan telah dipublikasikan ke rubygems.org + * English + * abbrev + * base64 + * drb + * debug + * erb + * find + * net-ftp + * net-http + * net-imap + * net-protocol + * open-uri + * optparse + * pp + * prettyprint + * resolv-replace + * resolv + * rinda + * set + * securerandom + * shellwords + * tempfile + * tmpdir + * time + * tsort + * un + * weakref + * digest + * io-nonblock + * io-wait + * nkf + * pathname + * syslog + * win32ole + +Lihat [NEWS](https://github.com/ruby/ruby/blob/{{ release.tag }}/NEWS.md) +atau [commit logs](https://github.com/ruby/ruby/compare/v2_7_0...{{ release.tag }}) +untuk lebih detail. + +Dengan perubahan tersebut, [{{ release.stats.files_changed }} berkas berubah, {{ release.stats.insertions }} sisipan(+), {{ release.stats.deletions }} terhapus(-)](https://github.com/ruby/ruby/compare/v2_7_0...{{ release.tag }}#file_bucket) +sejak Ruby 2.7.0! + +Selamat Natal, selamat berlibur, dan nikmati memprogram dengan Ruby 3.0! + +## Unduh + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Apa itu Ruby + +Ruby pertama kali dikembangkan oleh Matz (Yukihiro Matsumoto) pada 1993 +dan sekarang dikembangkan sebagai *Open Source*. Ruby berjalan di berbagai +jenis *platform* dan digunakan di seluruh dunia khususnya pengembangan *web*. From 866c0a8d9480be464b19d5a27ac315fe44e160c8 Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Wed, 5 May 2021 22:45:40 +0700 Subject: [PATCH 0372/1487] Translate Ruby 2.5.9 released news (id) --- .../_posts/2021-04-05-ruby-2-5-9-released.md | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 id/news/_posts/2021-04-05-ruby-2-5-9-released.md diff --git a/id/news/_posts/2021-04-05-ruby-2-5-9-released.md b/id/news/_posts/2021-04-05-ruby-2-5-9-released.md new file mode 100644 index 0000000000..6b2b4412da --- /dev/null +++ b/id/news/_posts/2021-04-05-ruby-2-5-9-released.md @@ -0,0 +1,61 @@ +--- +layout: news_post +title: "Ruby 2.5.9 Dirilis" +author: "usa" +translator: "meisyal" +date: 2021-04-05 12:00:00 +0000 +lang: id +--- + +Ruby 2.5.9 telah dirilis. + +Rilis ini mencakup beberapa perbaikan keamanan. +Mohon cek topik-topik di bawah ini untuk lebih detail. + +* [CVE-2020-25613: Potensi Kerentanan HTTP Request Smuggling pada WEBrick]({%link id/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md %}) +* [CVE-2021-28965: XML round-trip vulnerability in REXML]({% link en/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md %}) + +Lihat [commit logs](https://github.com/ruby/ruby/compare/v2_5_8...v2_5_9) untuk +detail. + +Setelah rilis ini, Ruby 2.5 akan EOL. Dengan kata lain, ini adalah rilis +terakhir dari rangkaian Ruby 2.5. Kami tidak akan merilis Ruby 2.5.10 walaupun +celah keamanan ditemukan. Kami merekomendasikan semua pengguna Ruby 2.5 untuk +segera memperbarui ke Ruby 3.0, 2.7, atau 2.6. + +## Unduh + +{% assign release = site.data.releases | where: "version", "2.5.9" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Komentar Rilis + +Terima kasih kepada semua yang telah membantu rilis ini, khususnya, kepada +pelapor kerentanan. From d8cf86d595d540021bcffe03aef53b8889cf3484 Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Sun, 6 Jun 2021 17:58:10 +0300 Subject: [PATCH 0373/1487] Translate OpenBSD section on Installation page (ru) (#2651) refs: #2529, #2534 --- ru/documentation/installation/index.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ru/documentation/installation/index.md b/ru/documentation/installation/index.md index f0fb99399b..1164d840f1 100644 --- a/ru/documentation/installation/index.md +++ b/ru/documentation/installation/index.md @@ -33,6 +33,7 @@ lang: ru * [Gentoo](#portage) * [Arch Linux](#pacman) * [macOS](#homebrew) + * [OpenBSD](#openbsd) * [Solaris, OpenIndiana](#solaris) * [Другие дистрибутивы](#other-systems) * [Установщики](#installers) @@ -138,6 +139,26 @@ $ brew install ruby Это установит последнюю версию Ruby. +### OpenBSD +{: #openbsd} + +OpenBSD, а также его дистрибутив adJ, имеет пакеты для трех +основных версий Ruby. Следующая команда позволяет вам увидеть +доступные версии и установить одну из них: + +{% highlight sh %} +$ doas pkg_add ruby +{% endhighlight %} + +Вы можете установить несколько основных версий одновременно, потому что их +бинарники имеют разные имена (например, `ruby27`, `ruby26`). + +Ветка `HEAD` коллекции портов OpenBSD может иметь +самую последнюю версию Ruby для этой платформы через несколько дней после ее +релиза, смотрите +[директорию lang/ruby в самой последней коллекции портов][openbsd-current-ruby-ports]. + + ### Ruby на Solaris и OpenIndiana {: #solaris} @@ -299,3 +320,4 @@ $ sudo make install [homebrew]: http://brew.sh/ [asdf-vm]: https://asdf-vm.com/ [asdf-ruby]: https://github.com/asdf-vm/asdf-ruby +[openbsd-current-ruby-ports]: https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/lang/ruby/?only_with_tag=HEAD From 0b7f3fbb4da8ce36f44cc038de7b5c31900cbbc2 Mon Sep 17 00:00:00 2001 From: Panashe Ngwerume Date: Thu, 10 Jun 2021 18:34:05 +1200 Subject: [PATCH 0374/1487] Remove reference to book list as link is broken (#2659) * Remove reference to book list as link is broken The link to the book list in the quickstart guide (http://books.ruby-doc.com/bookstore/) no longer works. * Remove reference to broken bookstore link The link to http://www.ruby-doc.org/bookstore does not work. --- en/documentation/index.md | 3 +-- en/documentation/quickstart/4/index.md | 8 -------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/en/documentation/index.md b/en/documentation/index.md index 8f73ebffa7..32305dd6d1 100644 --- a/en/documentation/index.md +++ b/en/documentation/index.md @@ -123,7 +123,7 @@ Here is a list of popular tools used by Rubyists: ### Further Reading [Ruby-doc.org][34] maintains a comprehensive list of English -documentation sources. There are also plenty of [books about Ruby][35]. +documentation sources. If you have questions about Ruby the [mailing list](/en/community/mailing-lists/) is a great place to start. @@ -162,7 +162,6 @@ If you have questions about Ruby the [32]: http://macromates.com/ [33]: https://www.barebones.com/products/bbedit/ [34]: http://ruby-doc.org -[35]: http://www.ruby-doc.org/bookstore [36]: https://netbeans.org/ [37]: http://www.sublimetext.com/ [38]: https://learncodethehardway.org/ruby/ diff --git a/en/documentation/quickstart/4/index.md b/en/documentation/quickstart/4/index.md index 7ad3f66402..f0209746a3 100644 --- a/en/documentation/quickstart/4/index.md +++ b/en/documentation/quickstart/4/index.md @@ -146,11 +146,3 @@ you wanting to learn more. If so, please head on over to our [Documentation](/en/documentation/) area, which rounds up links to manuals and tutorials, all freely available online. - -Or, if you’d really like to dig into a book, check the [book list][1] -(off-site link) for titles available for sale online or at your local -bookseller. - - - -[1]: http://www.ruby-doc.org/bookstore From 9944e5a1148452541ea26611db226d5222c58df6 Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Thu, 10 Jun 2021 09:37:17 +0300 Subject: [PATCH 0375/1487] Remove reference to broken bookstore link (translations) (#2660) ref #2659 --- bg/documentation/index.md | 3 +-- bg/documentation/quickstart/4/index.md | 7 ------- de/documentation/quickstart/4/index.md | 9 --------- es/documentation/index.md | 3 +-- es/documentation/quickstart/4/index.md | 8 -------- fr/documentation/index.md | 4 +--- fr/documentation/quickstart/4/index.md | 8 +------- id/documentation/index.md | 3 +-- id/documentation/quickstart/4/index.md | 7 ------- it/documentation/index.md | 3 +-- it/documentation/quickstart/4/index.md | 8 -------- ko/documentation/index.md | 3 +-- ko/documentation/quickstart/4/index.md | 12 ++++-------- pl/documentation/index.md | 1 - pl/documentation/quickstart/4/index.md | 7 ------- pt/documentation/index.md | 3 +-- pt/documentation/quickstart/4/index.md | 7 ------- ru/documentation/index.md | 3 +-- ru/documentation/quickstart/4/index.md | 8 -------- tr/documentation/index.md | 4 +--- tr/documentation/quickstart/4/index.md | 7 ------- vi/documentation/index.md | 2 -- vi/documentation/quickstart/4/index.md | 6 ------ zh_cn/documentation/index.md | 3 +-- zh_cn/documentation/quickstart/4/index.md | 6 ------ zh_tw/documentation/index.md | 3 +-- zh_tw/documentation/quickstart/4/index.md | 6 ------ 27 files changed, 16 insertions(+), 128 deletions(-) diff --git a/bg/documentation/index.md b/bg/documentation/index.md index e8b8c03100..00f936c4b0 100644 --- a/bg/documentation/index.md +++ b/bg/documentation/index.md @@ -125,7 +125,7 @@ ruby -v ### Други източници [Ruby-Doc.org][34] поддържа списък с източници на информация на -английски език. Също така съдържа списък с [книги за Ruby][35]. +английски език. Ако имате въпроси относно Ruby, [пощенският списък](/bg/community/mailing-lists/) е чудесно място да ги зададете. @@ -160,7 +160,6 @@ ruby -v [32]: http://macromates.com/ [33]: https://www.barebones.com/products/bbedit/ [34]: http://ruby-doc.org -[35]: http://www.ruby-doc.org/bookstore [36]: https://netbeans.org/ [37]: http://www.sublimetext.com/ [38]: https://learncodethehardway.org/ruby/ diff --git a/bg/documentation/quickstart/4/index.md b/bg/documentation/quickstart/4/index.md index 9dbf31b4cd..54cec3d6a4 100644 --- a/bg/documentation/quickstart/4/index.md +++ b/bg/documentation/quickstart/4/index.md @@ -129,10 +129,3 @@ if __FILE__ == $0 запалило да научите и използвате този прекрасен език. Ако това е така, можете да прегледате раздела [Документация](/bg/documentation/) , където ще намерите връзки към напълно безплатни самоучители и ръководства. - -Заинтригувани сте от купуването на книга ? Прегледайте [списъка с -книги][1] със заглавия, достъпни в on-line или хартиен вариант. - - - -[1]: http://www.ruby-doc.org/bookstore diff --git a/de/documentation/quickstart/4/index.md b/de/documentation/quickstart/4/index.md index 1b8283460d..a64bad9e78 100644 --- a/de/documentation/quickstart/4/index.md +++ b/de/documentation/quickstart/4/index.md @@ -156,12 +156,3 @@ Falls ja, schau doch einfach in unsere [Dokumentations-Abteilung](/de/documentation/). Dort gibt es Links zu Handbüchern und Anleitungen, die alle kostenlos und online verfügbar sind. - -Oder wenn Du lieber in Büchern schmökerst, ist die -[Bücherliste][1] einen Blick wert. Sie listet -Buchtitel auf, die Du online oder bei Deinem örtlichen Buchhändler -kaufen kannst. - - - -[1]: http://www.ruby-doc.org/bookstore diff --git a/es/documentation/index.md b/es/documentation/index.md index 56188e644c..26aaedbb5f 100644 --- a/es/documentation/index.md +++ b/es/documentation/index.md @@ -135,7 +135,7 @@ Rubiceros: ### Otras lecturas [Ruby-Doc.org][34] mantiene una extensa lista de fuentes de -documentación en inglés. También existen varios [libros sobre Ruby][35]. +documentación en inglés. Si tiene preguntas sobre Ruby, la [lista de correo](/es/community/mailing-lists/) es un buen lugar para comenzar. @@ -176,7 +176,6 @@ comenzar. [32]: http://macromates.com/ [33]: https://www.barebones.com/products/bbedit/ [34]: http://ruby-doc.org -[35]: http://www.ruby-doc.org/bookstore [36]: https://netbeans.org/ [37]: http://www.sublimetext.com/ [38]: https://learncodethehardway.org/ruby/ diff --git a/es/documentation/quickstart/4/index.md b/es/documentation/quickstart/4/index.md index 64c61f61be..f4e2c267bd 100644 --- a/es/documentation/quickstart/4/index.md +++ b/es/documentation/quickstart/4/index.md @@ -151,11 +151,3 @@ muestra de Ruby te despierte el interés por saber más. Si es así, por favor dirígete a nuestra area de [Documentación](/es/documentation/), donde encontrarás vínculos a cursos y manuales, todos disponibles gratuitamente en internet. - -O si realmente te gustaría sumergirte en un libro, busca en el [listado -de libros][1] los títulos disponibles para venta en linea o en tu tienda -favorita. - - - -[1]: http://www.ruby-doc.org/bookstore diff --git a/fr/documentation/index.md b/fr/documentation/index.md index 00b5f29f31..0ea9acbc7c 100644 --- a/fr/documentation/index.md +++ b/fr/documentation/index.md @@ -120,8 +120,7 @@ pour les nombreuses façons d'obtenir Ruby. [Ruby-Doc.org][22] maintient à jour une liste presque exhaustive de la documentation disponible en anglais. Il existe également de nombreux -ouvrages à propos de Ruby : [une liste de livres en anglais][23] -(relativement exhaustive) et [une liste de livres en français][24] +ouvrages à propos de Ruby : [une liste de livres en français][24] (incomplète). Par ailleurs, si vous avez des questions à poser sur Ruby, la [liste de diffusion](/en/community/mailing-lists/) est un bon endroit à explorer. @@ -147,5 +146,4 @@ la [liste de diffusion](/en/community/mailing-lists/) est un bon endroit [20]: http://rubydoc.info/ [21]: http://rubydocs.org/ [22]: http://ruby-doc.org -[23]: http://www.ruby-doc.org/bookstore [24]: http://rubyfrance.org/liens/livres/ diff --git a/fr/documentation/quickstart/4/index.md b/fr/documentation/quickstart/4/index.md index 5a1b280d7a..3c0dc25cc6 100644 --- a/fr/documentation/quickstart/4/index.md +++ b/fr/documentation/quickstart/4/index.md @@ -174,12 +174,6 @@ avant-goût vous aura donné envie de poursuivre plus avant. Si tel est le cas, rendez-vous sur notre [documentation](/fr/documentation), qui rassemble des liens vers des -manuels et tutoriels disponibles gratuitement en ligne. Si vous êtes -tentés par l’achat d’un livre au contenu plus conséquent, voyez une -[liste][1] (en anglais, relativement exhaustive) +manuels et tutoriels disponibles gratuitement en ligne. Bonne continuation ! - - - -[1]: http://www.ruby-doc.org/bookstore diff --git a/id/documentation/index.md b/id/documentation/index.md index 84262768f7..1551d0a20a 100644 --- a/id/documentation/index.md +++ b/id/documentation/index.md @@ -122,7 +122,7 @@ Berikut adalah daftar kakas populer yang digunakan oleh para pengguna Ruby: ### Bacaan selanjutnya [Ruby-Doc.org][34] merawat daftar lengkap dokumentasi Bahasa Inggris. -Ada juga banyak [buku tentang Ruby][35]. Jika Anda memiliki pertanyaan +Jika Anda memiliki pertanyaan tentang Ruby, [mailing list](/id/community/mailing-lists/) adalah tempat yang baik untuk memulai. @@ -160,7 +160,6 @@ adalah tempat yang baik untuk memulai. [32]: http://macromates.com/ [33]: https://www.barebones.com/products/bbedit/ [34]: http://ruby-doc.org -[35]: http://www.ruby-doc.org/bookstore [36]: https://netbeans.org/ [37]: http://www.sublimetext.com/ [38]: https://learncodethehardway.org/ruby/ diff --git a/id/documentation/quickstart/4/index.md b/id/documentation/quickstart/4/index.md index 47d0c7d86f..e371659c56 100644 --- a/id/documentation/quickstart/4/index.md +++ b/id/documentation/quickstart/4/index.md @@ -154,10 +154,3 @@ lanjut. Jika Anda ingin menjelajahi Ruby lebih lanjut, silakan ke [Dokumentasi](/en/documentation/) yang punya banyak link ke manual dan tutorial, semua tersedia gratis secara online. - -Atau, jika Anda benar-benar ingin buku, silakan ke [daftar buku][1] -(link eksternal) (dalam bahasa Inggris) - - - -[1]: http://www.ruby-doc.org/bookstore diff --git a/it/documentation/index.md b/it/documentation/index.md index b82b7e7a6f..73eee92341 100644 --- a/it/documentation/index.md +++ b/it/documentation/index.md @@ -122,7 +122,7 @@ Questa è una lista dei tool più comunemente usati dagli sviluppatori Ruby: ### Ulteriori Informazioni [Ruby-Doc.org][34] mantiene un’esauriente lista di documenti in inglese. -Ci sono anche molti [libri su Ruby][35]. Se hai domande su Ruby la lista +Se hai domande su Ruby la lista delle [mailing list](/it/community/mailing-lists/) è perfetta per iniziare. @@ -159,7 +159,6 @@ iniziare. [32]: http://macromates.com/ [33]: https://www.barebones.com/products/bbedit/ [34]: http://ruby-doc.org -[35]: http://www.ruby-doc.org/bookstore [36]: https://netbeans.org/ [37]: http://www.sublimetext.com/ [38]: https://learncodethehardway.org/ruby/ diff --git a/it/documentation/quickstart/4/index.md b/it/documentation/quickstart/4/index.md index bc0828b487..6e9b4e619f 100644 --- a/it/documentation/quickstart/4/index.md +++ b/it/documentation/quickstart/4/index.md @@ -143,11 +143,3 @@ ti abbia invogliato a saperne di più. Se così fosse, allora dai un occhiata alla nostra sezione [Documentazione](/it/documentation) che contiene link a manuali e tutorial tutti disponibili gratuitamente online. - -Oppure, se sei veramente interessato in un libro controlla la [lista dei -libri][1] (link esterno) dove trovi libri che puoi comprare online o -nella tua libreria preferita. - - - -[1]: http://www.ruby-doc.org/bookstore diff --git a/ko/documentation/index.md b/ko/documentation/index.md index c8256d458c..49f3d6fb26 100644 --- a/ko/documentation/index.md +++ b/ko/documentation/index.md @@ -127,7 +127,7 @@ Ruby를 코딩할 때 운영체제의 기본 편집기를 사용할 수 있습 ### 더 읽을거리 [Ruby-Doc.org][34]는 Ruby 영문 문서를 포괄적으로 관리하는 사이트입니다. Ruby -[책들][ko-5]도 출판되어 있습니다. 원서들은 [여기][35]에서 확인하세요. Ruby에 +[책들][ko-5]도 출판되어 있습니다. Ruby에 관한 질문이 있다면, [유저 그룹][ko-3]이나 [페이스북 그룹][ko-4]에서 하실 수 있고 영어가 되신다면 [메일링 리스트](/ko/community/mailing-lists/)를 사용하실 수도 있습니다. @@ -164,7 +164,6 @@ Ruby를 코딩할 때 운영체제의 기본 편집기를 사용할 수 있습 [32]: http://macromates.com/ [33]: https://www.barebones.com/products/bbedit/ [34]: http://ruby-doc.org -[35]: http://www.ruby-doc.org/bookstore [36]: https://netbeans.org/ [37]: http://www.sublimetext.com/ [38]: https://learncodethehardway.org/ruby/ diff --git a/ko/documentation/quickstart/4/index.md b/ko/documentation/quickstart/4/index.md index 75897d7879..f951d5bdaf 100644 --- a/ko/documentation/quickstart/4/index.md +++ b/ko/documentation/quickstart/4/index.md @@ -131,15 +131,11 @@ Ruby를 잠깐 둘러 보았습니다. 물론 훨씬 더 많은 것들이 기다 만약 그랬다면, 매뉴얼과 튜토리얼 등이 소개되어 있는 [문서 섹션](/ko/documentation)으로 가 보세요. 모두 온라인에 무료로 제공되고 있으니까요. -다른 책들을 책을 파고 싶으시다면, [원서들][1](외부 링크)을 확인해보세요. -서점에서 판매중인 책들을 온라인에서 구매 하실 수 있습니다. - -* 원문: [Ruby in Twenty Minutes][2] -* 번역: [황대산][3] +* 원문: [Ruby in Twenty Minutes][1] +* 번역: [황대산][2] * 이 문서는 업데이트되고 있습니다. 대산 님의 초기 번역본과는 다를 수 있습니다. -[1]: http://www.ruby-doc.org/bookstore -[2]: /en/documentation/quickstart -[3]: http://beyond.daesan.com +[1]: /en/documentation/quickstart +[2]: http://beyond.daesan.com diff --git a/pl/documentation/index.md b/pl/documentation/index.md index a60fd725de..d6b9f1aa15 100644 --- a/pl/documentation/index.md +++ b/pl/documentation/index.md @@ -163,7 +163,6 @@ Jeśli szukasz pomocy w języku polskim, zajrzyj na [forum][pl-2]. [32]: http://macromates.com/ [33]: https://www.barebones.com/products/bbedit/ [34]: http://ruby-doc.org -[35]: http://www.ruby-doc.org/bookstore [36]: https://netbeans.org/ [37]: http://www.sublimetext.com/ [38]: https://learncodethehardway.org/ruby/ diff --git a/pl/documentation/quickstart/4/index.md b/pl/documentation/quickstart/4/index.md index 67430c5054..ba8cd56c7b 100644 --- a/pl/documentation/quickstart/4/index.md +++ b/pl/documentation/quickstart/4/index.md @@ -149,10 +149,3 @@ ciekawość. Jeśli tak, to zapraszam do przejścia do [Dokumentacji](/pl/documentation/) , w której znajdziesz podsumowanie linków, manuali i tutoriali, wszystkie dostępne za darmo w sieci. - -Jeśli chciałbyś obejrzeć jakieś książki, sprawdź [listę książek o -Rubim][1] (po angielsku). - - - -[1]: http://www.ruby-doc.org/bookstore diff --git a/pt/documentation/index.md b/pt/documentation/index.md index 61c96cb296..83560c9bf4 100644 --- a/pt/documentation/index.md +++ b/pt/documentation/index.md @@ -134,7 +134,7 @@ programadores Ruby: ### Leitura Complementar [Ruby-Doc.org][34] mantém uma lista completa de fontes de documentação -em inglês. Também existem vários [livros sobre Ruby][35]. Se você tiver +em inglês. Se você tiver perguntas sobre Ruby, a [lista de e-mails](/pt/community/mailing-lists/) é um ótimo lugar para começar. @@ -171,7 +171,6 @@ perguntas sobre Ruby, a [lista de e-mails](/pt/community/mailing-lists/) [32]: http://macromates.com/ [33]: https://www.barebones.com/products/bbedit/ [34]: http://ruby-doc.org -[35]: http://www.ruby-doc.org/bookstore [36]: https://netbeans.org/ [37]: http://www.sublimetext.com/ [38]: https://learncodethehardway.org/ruby/ diff --git a/pt/documentation/quickstart/4/index.md b/pt/documentation/quickstart/4/index.md index 8da8ad4089..33e54785d0 100644 --- a/pt/documentation/quickstart/4/index.md +++ b/pt/documentation/quickstart/4/index.md @@ -151,10 +151,3 @@ aprender mais. Se este for o caso, por favor visite a nossa seção de [Documentação](/pt/documentation/) , que reune links para manuais e tutoriais, todos disponíveis livremente online. - -Ou, se desejar ler um livro mesmo, consulte a nossa [lista de livros][1] -para títulos disponíveis à venda online ou na sua livraria de preferência. - - - -[1]: http://www.ruby-doc.org/bookstore diff --git a/ru/documentation/index.md b/ru/documentation/index.md index 5a85b50f5f..cf9e49d556 100644 --- a/ru/documentation/index.md +++ b/ru/documentation/index.md @@ -133,7 +133,7 @@ ruby -v ### Дальнейшее чтение [Ruby-Doc.org][34] поддерживает актуальный список англоязычных источников. -Также там есть неплохой список [книг по Ruby][35]. Если у вас есть +Если у вас есть вопросы по Ruby, [почтовая рассылка](/ru/community/mailing-lists/) – отличное место их задать. @@ -170,7 +170,6 @@ ruby -v [32]: http://macromates.com/ [33]: https://www.barebones.com/products/bbedit/ [34]: http://ruby-doc.org -[35]: http://www.ruby-doc.org/bookstore [36]: https://netbeans.org/ [37]: http://www.sublimetext.com/ [38]: https://learncodethehardway.org/ruby/ diff --git a/ru/documentation/quickstart/4/index.md b/ru/documentation/quickstart/4/index.md index dc435d99dd..64cef847e8 100644 --- a/ru/documentation/quickstart/4/index.md +++ b/ru/documentation/quickstart/4/index.md @@ -153,11 +153,3 @@ if __FILE__ == $0 Если так, пожалуйста просмотрите нашу [Документацию](/ru/documentation/), которая содержит в себе ссылки на руководства и введения, все они бесплатно доступны онлайн. - -Или, если вы больше хотите узнать из книг, просмотрите [список книг][1] -(они доступны вне нашего сайта) на предмет доступных в продаже онлайн -или в ваших местных книжных магазинах. - - - -[1]: http://www.ruby-doc.org/bookstore diff --git a/tr/documentation/index.md b/tr/documentation/index.md index e2670fe4a8..30fe513bb2 100644 --- a/tr/documentation/index.md +++ b/tr/documentation/index.md @@ -135,8 +135,7 @@ bir tümleşik geliştirme ortamı seçmeniz daha iyi olur. ### Diğer Belgeler [Ruby-doc.org][34] Ruby hakkındaki İngilizce belgeleri bir araya -toplamayı amaçlayan bir site. [Ruby hakkında yazılmış kitaplar][35] da -bakılacak diğer kaynaklardan. Ruby hakkında aklınıza takılan herhangi bir soru +toplamayı amaçlayan bir site. Ruby hakkında aklınıza takılan herhangi bir soru için [e-posta listeleri](/tr/community/mailing-lists/) iyi bir başlangıç olacaktır. @@ -175,7 +174,6 @@ olacaktır. [32]: http://macromates.com/ [33]: https://www.barebones.com/products/bbedit/ [34]: http://ruby-doc.org -[35]: http://www.ruby-doc.org/bookstore [36]: https://netbeans.org/ [37]: http://www.sublimetext.com/ [38]: https://learncodethehardway.org/ruby/ diff --git a/tr/documentation/quickstart/4/index.md b/tr/documentation/quickstart/4/index.md index b38177d088..840a75749d 100644 --- a/tr/documentation/quickstart/4/index.md +++ b/tr/documentation/quickstart/4/index.md @@ -150,10 +150,3 @@ fazla şeyler öğrenmek için bir arzu yaratmıştır. Eğer öyleyse lütfen [Belgeler](/tr/documentation/) bölgesindeki ücretsiz el kitapları ve öğreticileri inceleyin. - -Ya da gerçekten kapsamlı bir kitap bakıyorsanız, [kitap listesinde][1] -(site-dışı link) yararlı kitaplar bulabilirsiniz. - - - -[1]: http://www.ruby-doc.org/bookstore diff --git a/vi/documentation/index.md b/vi/documentation/index.md index d353c01181..885da35c36 100644 --- a/vi/documentation/index.md +++ b/vi/documentation/index.md @@ -133,7 +133,6 @@ tính năng nâng cao (ví dụ: tự động hoàn thiện, tái cấu trúc, h ### Đọc thêm [Ruby-Doc.org][34] duy trì một danh sách đầy đủ của nguồn tài liệu tiếng anh. -Ngoài ra còn có rất nhiều [sách về Ruby][35]. Nếu bạn có câu hỏi gì về Ruby, [danh sách mail](/vi/community/mailing-lists/) là một nơi tuyệt vời. @@ -171,7 +170,6 @@ là một nơi tuyệt vời. [32]: http://macromates.com/ [33]: https://www.barebones.com/products/bbedit/ [34]: http://ruby-doc.org -[35]: http://www.ruby-doc.org/bookstore [36]: https://netbeans.org/ [37]: http://www.sublimetext.com/ [38]: https://learncodethehardway.org/ruby/ diff --git a/vi/documentation/quickstart/4/index.md b/vi/documentation/quickstart/4/index.md index fb22499a76..64d912fa13 100644 --- a/vi/documentation/quickstart/4/index.md +++ b/vi/documentation/quickstart/4/index.md @@ -142,9 +142,3 @@ hy vọng những thú vị ban đầu này của Ruby sẽ khiến bạn muốn Nếu vậy, hãy đi đến khu vực [Tài liệu](/vi/documentation/) của chúng tôi, nơi có vô vàn đường dẫn tới các bài chỉ dẫn và hướng dẫn sử dụng, tất cả đều miễn phi trực tuyến. - -Hoặc nếu bạn thực sự muốn tìm hiểu trong một cuốn sách, hãy kiểm tra -[danh mục sách][1] (đường dẫn tại trang) cho các đầu sách bán trực tuyến hoặc -tại các cửa hàng sách gần bạn. - -[1]: http://www.ruby-doc.org/bookstore diff --git a/zh_cn/documentation/index.md b/zh_cn/documentation/index.md index 75e072e0a3..892aa750ac 100644 --- a/zh_cn/documentation/index.md +++ b/zh_cn/documentation/index.md @@ -106,7 +106,7 @@ ruby -v ### 扩展阅读 -[Ruby-Doc.org][34] 网站中有完整的 Ruby 英文文档。此外,还有很多 [Ruby 的书籍][35]。如果有 Ruby 相关的问题,可以参加[邮件列表](/zh_cn/community/mailing-lists/)中的讨论。 +[Ruby-Doc.org][34] 网站中有完整的 Ruby 英文文档。如果有 Ruby 相关的问题,可以参加[邮件列表](/zh_cn/community/mailing-lists/)中的讨论。 @@ -142,7 +142,6 @@ ruby -v [32]: http://macromates.com/ [33]: https://www.barebones.com/products/bbedit/ [34]: http://ruby-doc.org -[35]: http://www.ruby-doc.org/bookstore [36]: https://netbeans.org/ [37]: http://www.sublimetext.com/ [38]: https://learncodethehardway.org/ruby/ diff --git a/zh_cn/documentation/quickstart/4/index.md b/zh_cn/documentation/quickstart/4/index.md index 6ef790d2f5..d0dd9a257b 100644 --- a/zh_cn/documentation/quickstart/4/index.md +++ b/zh_cn/documentation/quickstart/4/index.md @@ -115,9 +115,3 @@ Ruby 语言后,希望您愿意进一步接触它。 如果您希望进一步了解 Ruby,可以到我们的 [文档](/zh_cn/documentation/) 部分。 那里汇集了更多的手册和介绍,全部免费的哦。 - -如果您还觉得不过瘾,可以看看 [图书][1] (网站外部链接)。 找一找更多的资料。 - - - -[1]: http://www.ruby-doc.org/bookstore diff --git a/zh_tw/documentation/index.md b/zh_tw/documentation/index.md index 59e0711fc8..7e62df0269 100644 --- a/zh_tw/documentation/index.md +++ b/zh_tw/documentation/index.md @@ -101,7 +101,7 @@ lang: zh_tw ### 進階閱讀 -[Ruby-Doc.org][34] 維護了一份簡單易懂的英文文件列表。[Ruby 有關的書籍][35]也相當充足。如有任何 Ruby 相關的問題,[郵件論壇](/en/community/mailing-lists/)是個問問題的好地方。 +[Ruby-Doc.org][34] 維護了一份簡單易懂的英文文件列表。如有任何 Ruby 相關的問題,[郵件論壇](/en/community/mailing-lists/)是個問問題的好地方。 @@ -138,7 +138,6 @@ lang: zh_tw [32]: http://macromates.com/ [33]: https://www.barebones.com/products/bbedit/ [34]: http://ruby-doc.org -[35]: http://www.ruby-doc.org/bookstore [36]: https://netbeans.org/ [37]: http://www.sublimetext.com/ [38]: https://learncodethehardway.org/ruby/ diff --git a/zh_tw/documentation/quickstart/4/index.md b/zh_tw/documentation/quickstart/4/index.md index 12db61bf99..1c6f965cbf 100644 --- a/zh_tw/documentation/quickstart/4/index.md +++ b/zh_tw/documentation/quickstart/4/index.md @@ -113,9 +113,3 @@ if __FILE__ == $0 `yield`、模組(modules)的第二個用途 mixin 等等。希望這份體驗教學讓你有興趣繼續學習。 如果你希望進一步了解,歡迎前往我們的 [文件](/zh_tw/documentation/),那裡提供了一些免費的線上文件和導覽。 - -或是你希望找本書,請參考看看 [書籍清單][1] (外部連結),或是你本地的書店。 - - - -[1]: http://www.ruby-doc.org/bookstore From e6799d00da6e482f6fd20ca9fd53f813560451c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonne=20Ha=C3=9F?= Date: Fri, 18 Jun 2021 15:27:04 +0200 Subject: [PATCH 0376/1487] Update references to freenode with references to Libera Chat Freenode as the network we used to know is no longer. There's a new network now masquerading as the old. See https://isfreenodedeadyet.com/. Libera Chat is in many ways the spiritual successor run by the original maintainers of Freenode. The vast majority of the active community moved there. We from the [ruby-community.com](https://ruby-community.com/pages/irc_staff) project did so too. We've registered as a community project with Libera Chat and are happy to continue our services there. We're happy to providechannels and services to the Ruby community in #ruby and the #ruby- namespace on Libera Chat. Feel invited to talk to us in #ruby-community. This pull request is making sure that users are not misdirected to a new and unmaintained environment but instead can find and join the community where it actually is. * Update all references to #ruby on Freenode to #ruby on Libera Chat * Lower entry barrier by linking to the webchat instead of using the irc:// protocol * Dropped reference to #ruby-core, the channel seems inactive on both Libera Chat and "New Freenode" * Dropped reference to #ruby-ja, the channel seems inactive on both Libera Chat and "New Freenode" * Dropped reference to #ruby-tw, the channel seems inactive on both Libera Chat and "New Freenode" * Dropped reference to #ruby-de, the channel seems inactive on both Libera Chat and "New Freenode" * Dropped reference to #ruby.pl, the channel seems inactie on both Libera Chat and "New Freenode" * Dropped reference to #ruby-id, the channel seems inactie on both Libera Chat and "New Freenode" --- bg/community/index.md | 2 +- de/community/index.md | 6 +----- en/community/index.md | 2 +- es/community/index.md | 2 +- fr/community/index.md | 2 +- id/community/index.md | 6 ++---- it/community/index.md | 2 +- ja/community/index.md | 5 +---- ko/community/index.md | 2 +- pl/community/index.md | 4 +--- pt/community/index.md | 2 +- ru/community/index.md | 2 +- tr/community/index.md | 2 +- vi/community/index.md | 2 +- zh_cn/community/index.md | 2 +- zh_tw/community/index.md | 5 ++--- 16 files changed, 18 insertions(+), 30 deletions(-) diff --git a/bg/community/index.md b/bg/community/index.md index 7d7c246284..a909ab820a 100644 --- a/bg/community/index.md +++ b/bg/community/index.md @@ -23,7 +23,7 @@ Oбщността, която се образува около един език интересни и разнообразни теми. Ако имате въпрос относно Ruby, те са чудесно място за бърз и точен отговор. -[Ruby в IRC мрежата (#ruby)](irc://irc.freenode.net/ruby) +[Ruby в IRC мрежата (#ruby)](https://web.libera.chat/#ruby) : IRC каналът на Ruby е прекрасно място за комуникация с други рубисти. [Ruby ядро](ruby-core/) diff --git a/de/community/index.md b/de/community/index.md index 44007cff02..6247699bf8 100644 --- a/de/community/index.md +++ b/de/community/index.md @@ -20,10 +20,6 @@ Für den, der sich gerne einbringen möchte, ist die folgende Liste ein guter Ei Ländern. Hilfestellungen für Neulinge werden ebenso gern gegeben wie ausschweifende Diskussionen über Ruby-Interna geführt. -[Ruby im IRC (#ruby-de)](irc://irc.freenode.net/ruby-de) -: Der deutschsprachige IRC-Channel zu Ruby ist zwar lange nicht so - aktiv wie der englische (siehe unten), aber deswegen noch nicht uninteressant. - [Ruby User Groups](user-groups/) : Ihre lokale Ruby User Group ist der beste Ort, um sich mit anderen Ruby-Programmierern auszutauschen. Ruby-Benutzergruppen organisieren sich @@ -54,7 +50,7 @@ Für den, der sich gerne einbringen möchte, ist die folgende Liste ein guter Ei sollte diese in einer Mailingliste stellen, um eine Antwort zu bekommen. -[Ruby im IRC (#ruby)](irc://irc.freenode.net/ruby) +[Ruby im IRC (#ruby)](https://web.libera.chat/#ruby) : Der Ruby Language IRC-Channel ist eine hervorragende Möglichkeit mit anderen Rubyisten zu chatten. diff --git a/en/community/index.md b/en/community/index.md index 809c3eaf3c..eab2142b53 100644 --- a/en/community/index.md +++ b/en/community/index.md @@ -28,7 +28,7 @@ to start: chat with other Rubyists, get help with Ruby questions, or help others. Discord is a good entry point for new developers and it is easy to join. -[Ruby on IRC (#ruby)](irc://irc.freenode.net/ruby) +[Ruby on IRC (#ruby)](https://web.libera.chat/#ruby) : The Ruby Language IRC Channel is a wonderful way to chat with fellow Rubyists. diff --git a/es/community/index.md b/es/community/index.md index 49c8d47a48..6519d5a42a 100644 --- a/es/community/index.md +++ b/es/community/index.md @@ -25,7 +25,7 @@ donde empezar: idiomas. Si tienes preguntas acerca de Ruby, una buena forma de obtener respuestas es preguntarlas en una lista de correo. -[Ruby en IRC (#ruby)](irc://irc.freenode.net/ruby) +[Ruby en IRC (#ruby)](https://web.libera.chat/#ruby) : El canal IRC The Ruby Language es un buen lugar para chatear con otros compañeros Rubyistas. diff --git a/fr/community/index.md b/fr/community/index.md index d83c50a125..97898265cd 100644 --- a/fr/community/index.md +++ b/fr/community/index.md @@ -25,7 +25,7 @@ Quelques liens à visiter: disponibles. Si vous avez des questions sur Ruby, les poser sur une de ces listes est un moyen efficace pour obtenir rapidement des réponses. -[IRC (#ruby)](irc://irc.freenode.net/ruby) +[IRC (#ruby)](https://web.libera.chat/#ruby) : Le canal IRC anglophone #ruby est un endroit fantastique pour discuter en temps réel avec d’autres rubyistes. diff --git a/id/community/index.md b/id/community/index.md index aea257d943..bf39ca0f90 100644 --- a/id/community/index.md +++ b/id/community/index.md @@ -32,10 +32,8 @@ untuk memulai petualangan Anda: **Ruby di IRC** : Anda bisa berbincang-bincang (*chatting*) dengan pengguna Ruby lainnya - di *channel* IRC untuk Ruby. Ada dua channel yang menarik bagi Rubyist - Indonesia, yaitu [#ruby](irc://irc.freenode.net/ruby) untuk - diskusi internasional menggunakan bahasa Inggris dan - [#ruby-id](irc://irc.freenode.net/ruby-id) untuk diskusi lokal. + di *channel* IRC untuk Ruby. Bergabunglah dengan [#ruby](https://web.libera.chat/#ruby) untuk + diskusi internasional menggunakan bahasa Inggris. [Ruby Core](ruby-core/) : Sekarang adalah waktu yang tepat untuk mengikuti perkembangan Ruby. diff --git a/it/community/index.md b/it/community/index.md index c98795ec7e..501dff8b31 100644 --- a/it/community/index.md +++ b/it/community/index.md @@ -25,7 +25,7 @@ cominciare: lingue. Se hai domande su Ruby, un modo efficace di ottenere risposte è di inoltrarle in una mailing list. -[Ruby in IRC (#ruby)](irc://irc.freenode.net/ruby) +[Ruby in IRC (#ruby)](https://web.libera.chat/#ruby) : Il canale IRC (in inglese) Ruby Language è un ottimo modo per chiaccherare con altri appassionati di Ruby. diff --git a/ja/community/index.md b/ja/community/index.md index 22527fc8a6..c26e7feab4 100644 --- a/ja/community/index.md +++ b/ja/community/index.md @@ -37,12 +37,9 @@ Rubyコミュニティに興味があるのなら、ぜひ以下のコミュニ * Rubyの開発用兼、簡単な質疑応答用のチャンネルです。 * 最近は上述の#ruby-jaがよく利用されています。 -* freenodeの[#ruby](irc://freenode/%23ruby?charset=utf-8) +* Libera Chatの[#ruby](https://web.libera.chat/#ruby) * Rubyの利用者の交流、質問のためのチャンネルです。(英語) -* freenodeの[#ruby-core](irc://freenode/%23ruby-core?charset=utf-8) - * Rubyの開発用のチャンネルです。(英語) - ## メーリングリスト * [メーリングリスト](/ja/community/mailing-lists/) のページを参照してください。 diff --git a/ko/community/index.md b/ko/community/index.md index bc3c858070..2bcecc4ee9 100644 --- a/ko/community/index.md +++ b/ko/community/index.md @@ -27,7 +27,7 @@ Ruby의 장점, 특징에 대한 설명에서 빠지지 않고 등장하는 것 : Ruby는 여러 언어에 걸쳐 다른 주제를 다루는 다양한 메일링 리스트를 가지고 있습니다. Ruby에 관해 질문이 있다면, 메일링 리스트에 질문하시면 됩니다. -[IRC에서의 Ruby(#ruby)](irc://irc.freenode.net/ruby) +[IRC에서의 Ruby(#ruby)](https://web.libera.chat/#ruby) : Ruby 언어 IRC 채널에서 동료 루비스트와 채팅할 수 있습니다. [Ruby 코어](ruby-core/) diff --git a/pl/community/index.md b/pl/community/index.md index 42e004b631..93b39f6d66 100644 --- a/pl/community/index.md +++ b/pl/community/index.md @@ -26,11 +26,9 @@ poniżej znajdziesz kilka propozycji: jakieś pytania, to najprędzej otrzymasz na nie odpowiedź na liście wysyłkowej -[Ruby na IRC (#ruby)](irc://irc.freenode.net/ruby) +[Ruby na IRC (#ruby)](https://web.libera.chat/#ruby) : Jeśli masz ochotę porozmawiać z innymi użytkownikami (nie tylko z Polski), bez wychodzenia z domu, wypróbuj IRC. - Istnieje też polski kanał IRC na serwerze irc.freenode.net - ([#ruby.pl](irc://irc.eu.freenode.net/ruby.pl)). [Ruby Core](/en/community/ruby-core/) : Jeśli masz ochotę zaangażować się w tworzenie i rozwijanie samego diff --git a/pt/community/index.md b/pt/community/index.md index 86a181ddad..090844bd3e 100644 --- a/pt/community/index.md +++ b/pt/community/index.md @@ -23,7 +23,7 @@ Se está interessado em colaborar, seguem alguns lugares para começar: Se tiver dúvidas sobre o Ruby, perguntá-las em listas de e-mail é um grande jeito de conseguir respostas. -[Ruby no IRC (#ruby)](irc://irc.freenode.net/ruby) +[Ruby no IRC (#ruby)](https://web.libera.chat/#ruby) : O canal de IRC do Ruby é um ótimo meio de se comunicar com outros programadores de Ruby. diff --git a/ru/community/index.md b/ru/community/index.md index 2e1925806a..f441ca8098 100644 --- a/ru/community/index.md +++ b/ru/community/index.md @@ -23,7 +23,7 @@ lang: ru разных языках мира. Если у вас есть вопросы о Ruby, то задавание их в почтовой рассылке является отличным способом получить ответы. -[Ruby в IRC (#ruby)](irc://irc.freenode.net/ruby) +[Ruby в IRC (#ruby)](https://web.libera.chat/#ruby) : Канал IRC о языке Ruby – это замечательный способ поговорить с приятелями рубистами. diff --git a/tr/community/index.md b/tr/community/index.md index f13dc575b0..da7a06fb3b 100644 --- a/tr/community/index.md +++ b/tr/community/index.md @@ -35,7 +35,7 @@ başlangıç önerisi var: : Kendi dilinizde sohbet etmek için IRC kanalına alternatif olarak oldukça popüler olan bu Slack kanalını da kullanabilirsiniz. -[IRC’de Ruby (#ruby)](irc://irc.freenode.net/ruby) (İngilizce) +[IRC’de Ruby (#ruby)](https://web.libera.chat/#ruby) (İngilizce) : Ruby IRC Kanalı, diğer Ruby’cilerle sohbet etmek için harika bir yoldur. diff --git a/vi/community/index.md b/vi/community/index.md index ac01907610..086acf445d 100644 --- a/vi/community/index.md +++ b/vi/community/index.md @@ -23,7 +23,7 @@ Nếu bạn muốn tham gia thì dưới đây là một vài nơi để bắt có vấn đề gì về Ruby, gửi mail vào hộp thư chung là cách tốt nhất để tìm được câu trả lời. -[Ruby trên IRC (#ruby)](irc://irc.freenode.net/ruby) +[Ruby trên IRC (#ruby)](https://web.libera.chat/#ruby) : Kênh ngôn ngữ Ruby IRC là một lựa chọn tuyệt vời để trò chuyện cùng những người dùng Ruby khác. diff --git a/zh_cn/community/index.md b/zh_cn/community/index.md index 6855123428..c5a3850a3e 100644 --- a/zh_cn/community/index.md +++ b/zh_cn/community/index.md @@ -19,7 +19,7 @@ lang: zh_cn [Ruby 邮件列表和新闻组](mailing-lists/) : Ruby 有各种各样的邮件列表,使用不同的语言讨论各种话题。如果你有 Ruby 相关的问题,在邮件列表中提问往往能得到解答。 -[IRC 中的 Ruby 频道(#ruby)](irc://irc.freenode.net/ruby) +[IRC 中的 Ruby 频道(#ruby)](https://web.libera.chat/#ruby) : 在 IRC 中的 Ruby 频道中,你可以与其他 Ruby 同道者畅谈。 [Ruby 核心](ruby-core/) diff --git a/zh_tw/community/index.md b/zh_tw/community/index.md index 384527eea3..579cc8b191 100644 --- a/zh_tw/community/index.md +++ b/zh_tw/community/index.md @@ -21,9 +21,8 @@ lang: zh_tw : Ruby 擁有各種不同主題及語言的郵件論壇。如果你有 Ruby 的問題,透過論壇發問是個不錯的方式。台灣的 Ruby 論壇則有 [RailsFun][railsfun] 以及 [PTT](telnet://ptt.cc) Ruby 版。 -[Ruby 的 IRC (#ruby)](irc://irc.freenode.net/ruby) -: 您可以在 Ruby 的 IRC 頻道上與其他 Ruby 愛好者聊天。Ruby Taiwan 的 IRC 頻道則為 - [irc://irc.freenode.net/ruby-tw](irc://irc.freenode.net/ruby-tw)。 +[Ruby 的 IRC (#ruby)](https://web.libera.chat/#ruby) +: 您可以在 Ruby 的 IRC 頻道上與其他 Ruby 愛好者聊天。 [Ruby 核心](/zh_tw/community/ruby-core) : 現在正是加入開發 Ruby 行列的好時機。如果您有興趣幫忙,可以從這裡開始。 From bfab20724e86f5b7fbb6238066946b1afde41226 Mon Sep 17 00:00:00 2001 From: Victor Maslov Date: Thu, 1 Jul 2021 23:43:16 +0300 Subject: [PATCH 0377/1487] Translated the latest 13 news items (ru) (#2664) * Translate news 2020-09-25 (ru) * Translate news 2020-09-29 (ru) * Translate news 2020-10-02 (ru) * Translate news 2020-12-08 (ru) * Translate news 2020-12-20 (ru) * Translate news 2020-12-25 (ru) * Translate news 2021-04-05 (ru) * Translate news 2021-05-02 (ru) --- ...2020-09-25-ruby-3-0-0-preview1-released.md | 247 +++++++++++ ...9-http-request-smuggling-cve-2020-25613.md | 32 ++ .../_posts/2020-10-02-ruby-2-7-2-released.md | 59 +++ ...2020-12-08-ruby-3-0-0-preview2-released.md | 276 +++++++++++++ .../2020-12-20-ruby-3-0-0-rc1-released.md | 316 ++++++++++++++ .../_posts/2020-12-25-ruby-3-0-0-released.md | 389 ++++++++++++++++++ .../_posts/2021-04-05-ruby-2-5-9-released.md | 58 +++ .../_posts/2021-04-05-ruby-2-6-7-released.md | 64 +++ .../_posts/2021-04-05-ruby-2-7-3-released.md | 55 +++ .../_posts/2021-04-05-ruby-3-0-1-released.md | 48 +++ ...ath-traversal-on-windows-cve-2021-28966.md | 32 ++ ...p-vulnerability-in-rexml-cve-2021-28965.md | 44 ++ ...2021-05-02-os-command-injection-in-rdoc.md | 44 ++ 13 files changed, 1664 insertions(+) create mode 100644 ru/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md create mode 100644 ru/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md create mode 100644 ru/news/_posts/2020-10-02-ruby-2-7-2-released.md create mode 100644 ru/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md create mode 100644 ru/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md create mode 100644 ru/news/_posts/2020-12-25-ruby-3-0-0-released.md create mode 100644 ru/news/_posts/2021-04-05-ruby-2-5-9-released.md create mode 100644 ru/news/_posts/2021-04-05-ruby-2-6-7-released.md create mode 100644 ru/news/_posts/2021-04-05-ruby-2-7-3-released.md create mode 100644 ru/news/_posts/2021-04-05-ruby-3-0-1-released.md create mode 100644 ru/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md create mode 100644 ru/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md create mode 100644 ru/news/_posts/2021-05-02-os-command-injection-in-rdoc.md diff --git a/ru/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md b/ru/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md new file mode 100644 index 0000000000..2859a3dddb --- /dev/null +++ b/ru/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md @@ -0,0 +1,247 @@ +--- +layout: news_post +title: "Вышел Ruby 3.0.0 preview 1" +author: "naruse" +translator: "nakilon" +date: 2020-09-25 00:00:00 +0000 +lang: ru +--- + +Мы рады объявить о выходе Ruby 3.0.0-preview1. + +Новая версия несет множество новых фич и улучшений производительности. + +## RBS + +RBS -- это язык описания типов в программах на Ruby. +Тайп-чекеры, включая тайп-профайлеры и другие инструменты, поддерживающие RBS, смогут понимать програииы на Ruby гораздо лучше при наличии определений RBS. + +Вы можете составить определения классов и модулей: методы, определенные в классе, переменные экземпляра и их типы, а также отношения наследования и примесей. +RBS нацелен на поддержку часто встречающихся паттернов в программах на Ruby, а также позволяет описывать такие сложные типы, как объединения, перегрузка методов и дженерики. Он также поддерживает утиную типизацию с _интерфейсами_. + +Ruby 3.0 поставлется вместе с гемом `rbs`, который позволяет парсить и обрабатывать определения типов на языке RBS. + +Вот небольшой пример RBS. + +``` rbs +module ChatApp + VERSION: String + + class Channel + attr_reader name: String + attr_reader messages: Array[Message] + attr_reader users: Array[User | Bot] # `|` means union types, `User` or `Bot`. + + def initialize: (String) -> void + + def post: (String, from: User | Bot) -> Message # Method overloading is supported. + | (File, from: User | Bot) -> Message + end +end +``` + +См. [README гема](https://github.com/ruby/rbs). + +## Рактор (экспериментально) + +Рактор -- это абстракция параллельных вычислений, реализующая модель акторов, призванная дать возможность параллельных вычислений без заботы о потоковой безопасности. + +Вы можете создать несколько ракторов и запустить их параллельно. Рактор обеспечивает потоковую безопасность параллельных вычислений тем, что не может иметь общих объектов с другики ракторами в обычном понимании. Коммуникация между ракторами обеспечивается передачей сообщений. + +Рактор синтаксически ограничивает возможность совместного использования объектов (в случае одного Рактора разницы не будет). + +Спецификация и реализация еще не устаканились и могут быть изменены в будущем, поэтому фича обозначена как экспериментальная и выдает предупреждение, когда создается Рактор. + +Следующая небольшая программа вычисляет `prime?` двумя ракторами параллельно и делает это примерно в 2 раза быстрее на многоядерных машин. + +``` ruby +require 'prime' + +# n.prime? with sent integers in r1, r2 run in parallel +r1, r2 = *(1..2).map do + Ractor.new do + n = Ractor.recv + n.prime? + end +end + +# send parameters +r1.send 2**61 - 1 +r2.send 2**61 + 15 + +# wait for the results of expr1, expr2 +p r1.take #=> true +p r2.take #=> true +``` + +см. [doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md). + +## Планировщик (экспериментально) + +`Thread#scheduler` перехватывает блокирующие операции. Это обеспечивает легковесный параллелизм без изменения существующего кода. + +Поддерживаемые на данный момент классы/методы: + +- `Mutex#lock`, `Mutex#unlock`, `Mutex#sleep` +- `ConditionVariable#wait` +- `Queue#pop`, `SizedQueue#push` +- `Thread#join` +- `Kernel#sleep` +- `IO#wait`, `IO#read`, `IO#write` и смежные (`#wait_readable`, `#gets`, `#puts` и пр.). +- `IO#select` *не поддерживается*. + +На данный момент точкой входа является `Fiber.schedule{...}`, но это может измениться к моменту выхода Ruby 3. + +В [`Async::Scheduler`](https://github.com/socketry/async/pull/56) можете видеть тестовый планировщик. См. [`doc/scheduler.md`](https://github.com/ruby/ruby/blob/master/doc/scheduler.md). [Feature #16786] + +**ОСТОРОЖНО**: Эта фича строго экспериментальна. Как сама она, так и ее имя будут меняться в пререлизах. + +## Другие значимые фичи + +* Правостороннее присваивание. + + ``` ruby + fib(10) => x + p x #=> 55 + ``` + +* Объявление метода без `end`. + + ``` ruby + def square(x) = x * x + ``` + +* Поиск по образцу. + + ``` ruby + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + ``` + +* `Hash#except` теперь в stdlib. + + ``` ruby + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + ``` + +* Просмотр памяти (экспериментально) + + * Это новое C-API для прямого обмена участками памяти, такими как числовой массив или битмап, между библиотеками нативных расширений. Библиотеки расширений также могут делиться метаданными об участках памяти, таких как форма, формат и пр. С помощью этих метаданных библиотеки расширений могут делиться даже многомерными массивами. Дизайн этой фичи был вдохновлен буферным протоколом Python. + +## Улучшения производительности + +* Много улучшений содержатся в MJIT. См. NEWS. + +## Другие важные изменения после 2.7 + +* Именованные параметры отделены от остальных. + * Код, который выдавал предупреждение на Ruby 2.7, больше работать не будет. См. [новость](https://www.ruby-lang.org/ru/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/). + * Кстати, появилась возможность брать только ведущие аргументы. + + ``` ruby + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end + ``` + +* Фича `$SAFE` полностью убрана из языка; теперь это просто глобальная переменная. + +* Порядок отображения бектрейса был обращен в Ruby 2.5, но вернули как было. Теперь он как в Ruby 2.4; сначала пишется сообщение об ошибке и номер строки, где она произошла, а уже далее стек вызовов. + +* Обновлены некоторые стандартные библиотеки. + * RubyGems 3.2.0.rc.1 + * Bundler 2.2.0.rc.1 + * IRB 1.2.6 + * Reline 0.1.5 + +* Следующие гемы более не поставляются с языком. + Устанавливайте их явным образом. + * net-telnet + * xmlrpc + +* Следующие гемы более не встроены в язык, а поставляются вместе с ним. + * rexml + * rss + +* Стандартные библиотеки переведены в вид встроенных гемов. Следующие гемы опубликованы на rubygems.org + * abbrev + * base64 + * English + * erb + * find + * io-nonblock + * io-wait + * net-ftp + * net-http + * net-imap + * net-protocol + * nkf + * open-uri + * optparse + * resolv + * resolv-replace + * rinda + * securerandom + * set + * shellwords + * tempfile + * time + * tmpdir + * tsort + * weakref + +См. [NEWS](https://github.com/ruby/ruby/blob/v3_0_0_preview1/NEWS.md) +или [коммиты](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_preview1). + +{% assign release = site.data.releases | where: "version", "3.0.0-preview1" | first %} + +В ходе этого [{{ release.stats.files_changed }} файлов было изменено, {{ release.stats.insertions }} вставок(+), {{ release.stats.deletions }} удалений(-)](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_preview1) +после Ruby 2.7.0! + +Пожалуйста, попробуйте Ruby 3.0.0-preview1 и дайте обратную связь! + +## Скачать + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Немного рекламы 3.0.0-preview2 + +Мы планируем включить ["тайп-профайлер"](https://github.com/mame/ruby-type-profiler), который представляет собой фичу статического анализа типов. Ожидайте! + +## Что такое Ruby + +Matz (Yukihiro Matsumoto) разработал первую версию Ruby в 1993, +и на сегодня язык разрабатывается как Open Source. Он работает +на множестве платформ и используется по всему миру, особенно в веб разработке. diff --git a/ru/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md b/ru/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md new file mode 100644 index 0000000000..301aefcae5 --- /dev/null +++ b/ru/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md @@ -0,0 +1,32 @@ +--- +layout: news_post +title: "CVE-2020-25613: Потенциальная уязвимость скрытого HTTP запроса в WEBrick" +author: "mame" +translator: "nakilon" +date: 2020-09-29 06:30:00 +0000 +tags: security +lang: ru +--- + +Объявлено о потенциальной уязвимости скрытого HTTP запроса в WEBrick. Этой уязвимости присвоен идентификатор CVE [CVE-2020-25613](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-25613). Мы строго рекомендуем обновить гем webrick. + +## Подробности + +WEBrick был слишком простителен по отношению к невалидному заголовку Transfer-Encoding. Это могло привести к несовпадению интерпретаций между WEBrick и некоторыми HTTP прокси серверами, что могло позволить злоумышленнику выполнить "скрытый" запрос. См. [CWE-444](https://cwe.mitre.org/data/definitions/444.html). + +Пожалуйста, обновите гем webrick до версии 1.6.1 или выше. Вы можете это сделать командой `gem update webrick`. Если вы используете bundler, добавьте `gem "webrick", ">= 1.6.1"` в ваш `Gemfile`. + +## Уязвимые версии + +* гем webrick 1.6.0 и ниже +* поставляемые версии webrick-а с Ruby 2.7.1 и ниже +* поставляемые версии webrick-а с Ruby 2.6.6 и ниже +* поставляемые версии webrick-а с Ruby 2.5.8 и ниже + +## Авторство + +Благодарим [piao](https://hackerone.com/piao) за обнаружение проблемы. + +## История + +* Изначально опубликовано в 2020-09-29 06:30:00 (UTC) diff --git a/ru/news/_posts/2020-10-02-ruby-2-7-2-released.md b/ru/news/_posts/2020-10-02-ruby-2-7-2-released.md new file mode 100644 index 0000000000..f339c5076d --- /dev/null +++ b/ru/news/_posts/2020-10-02-ruby-2-7-2-released.md @@ -0,0 +1,59 @@ +--- +layout: news_post +title: "Вышел Ruby 2.7.2" +author: "nagachika" +translator: "nakilon" +date: 2020-10-02 11:00:00 +0000 +lang: ru +--- + +Вышел Ruby 2.7.2. + +Этот релиз сознательно содержит несовместимости. Предупреждения об устаревании по умолчанию выключены начиная с версии 2.7.2. +Вы можете включить предупреждения об устаревании флагом командой строки -w или -W:deprecated. +Ознакомьтесь с подробностями ниже. + +* [Feature #17000 2.7.2 turns off deprecation warnings by default](https://bugs.ruby-lang.org/issues/17000) +* [Feature #16345 Don't emit deprecation warnings by default.](https://bugs.ruby-lang.org/issues/16345) + +Этот релиз содержит новую версию webrick с исправлением уязвимости, описанной в статье. + +* [CVE-2020-25613: Потенциальная уязвимость скрытого HTTP запроса в WEBrick](/ru/news/2020/09/29/http-request-smuggling-cve-2020-25613/) + +См. остальные изменения в [коммитах](https://github.com/ruby/ruby/compare/v2_7_1...v2_7_2). + +## Скачать + +{% assign release = site.data.releases | where: "version", "2.7.2" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Комментарий к релизу + +Благодарим множественных коммитеров, разработчиков и пользователей за сообщения об ошибках и вклад, который позволил осуществить данный релиз. diff --git a/ru/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md b/ru/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md new file mode 100644 index 0000000000..fa686e9c17 --- /dev/null +++ b/ru/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md @@ -0,0 +1,276 @@ +--- +layout: news_post +title: "Вышел Ruby 3.0.0 Preview 2" +author: "naruse" +translator: "nakilon" +date: 2020-12-08 00:00:00 +0000 +lang: ru +--- + +Мы рады объявить о релизе Ruby 3.0.0-preview2. + +Мы внесли множество новых фич и улучшений производительности. + +## Статический анализ + +### RBS + +RBS -- это язык описания типов в программах на Ruby. + +Тайп-чекеры, включая TypeProf и другие инструменты, поддерживающие RBS, будут понимать программы на Ruby намного лучше с определениями RBS. + +Вы можете написать определения классам и модулям: методам, определенным в классе, переменным экземпляра и их типам, а также отношениям наследования/примесей. + +RBS преследует цель поддержать наиболее часто встречающиеся паттерны программирования на Ruby и позволяет описывать сложные типы, такие как объединения, перегрузка методов и дженерики. Также поддерживается утиная типизация с _интерфейсами_. + +Ruby 3.0 поставляется с гемом `rbs`, который позволяет парсить и обрабатывать определения типов, написанные на языке RBS. +Ниже небольшой пример RBS с определениями класса, модуля и константы. + +``` rbs +module ChatApp + VERSION: String + class Channel + attr_reader name: String + attr_reader messages: Array[Message] + attr_reader users: Array[User | Bot] # `|` means union types, `User` or `Bot`. + def initialize: (String) -> void + def post: (String, from: User | Bot) -> Message # Method overloading is supported. + | (File, from: User | Bot) -> Message + end +end +``` + +См. [README гема](https://github.com/ruby/rbs). + +### TypeProf + +TypeProf -- это инструмент статического анализа, поставляемый вместе с пакетом Ruby. + +На данный момент TypeProf как бы выполняет вывод типов. + +Он читает обычный (без аннотаций типов) код на Ruby, анализирует, как методы объявлены и используются, и генерирует прототип аннотаций типов в формате RBS. + +Вот небольшая демонстрация TypeProf. + +Пример ввода: + +``` ruby +# test.rb +class User + def initialize(name:, age:) + @name, @age = name, age + end + attr_reader :name, :age +end +User.new(name: "John", age: 20) +``` + +Пример вывода: + +``` +$ typeprof test.rb +# Classes +class User + attr_reader name : String + attr_reader age : Integer + def initialize : (name: String, age: Integer) -> [String, Integer] +end +``` + +Вы можете воспользоваться TypeProf сохранив ввод в файл `test.rb`, а затем выполнив команду `typeprof test.rb`. + +Также вы можете [попробовать TypeProf онлайн](https://mame.github.io/typeprof-playground/#rb=%23+test.rb%0Aclass+User%0A++def+initialize%28name%3A%2C+age%3A%29%0A++++%40name%2C+%40age+%3D+name%2C+age%0A++end%0A++%0A++attr_reader+%3Aname%2C+%3Aage%0Aend%0A%0AUser.new%28name%3A+%22John%22%2C+age%3A+20%29&rbs=). (Там TypeProf запускается на сервере -- приносим свои извинения, если он лежит!) + +См. [документацию](https://github.com/ruby/typeprof/blob/master/doc/doc.md) и [демо](https://github.com/ruby/typeprof/blob/master/doc/demo.md). + +TypeProf -- еще пока только экспериментальная разработка; поддерживается лишь подмножество языка Ruby, и определение типов ограничено. Однако она быстро растет и улучшает покрытие фич языка, скорость анализа и удобство использования. Любая обратная связь крайне приветствуется. + +## Рактор (экспериментально) + +Рактор -- это абстракция параллельных вычислений, подобная модели акторов, предназначенная обеспечить параллельное выполнение без лишних хлопот о потоковой безопасности. + +Вы можете создать несколько ракторов и запустить их параллельно. Рактор обеспечивает потоковую безопасность параллельных вычислений тем, что не может иметь общих объектов с другики ракторами в обычном понимании. Коммуникация между ракторами обеспечивается передачей сообщений. + +Рактор синтаксически ограничивает возможность совместного использования объектов (в случае одного Рактора разницы не будет). + +Спецификация и реализация еще не окончательны и могут быть изменены в будущем, поэтому эта фича отмечена как экспериментальная и выдает предупреждение "experimental feature" при первом вызове `Ractor.new`. + +Ниже небольшая программа, вычисляющая `n.prime?` (`n` -- относительно большое целое число) параллельно двумя ракторами. На компьютере, поддерживающем параллельные вычисления, вы убедитесь, что программа выполняется примерно в 2 раза быстрее, чем последовательная. + +``` ruby +require 'prime' +# n.prime? with sent integers in r1, r2 run in parallel +r1, r2 = *(1..2).map do + Ractor.new do + n = Ractor.recv + n.prime? + end +end +# send parameters +r1.send 2**61 - 1 +r2.send 2**61 + 15 +# wait for the results of expr1, expr2 +p r1.take #=> true +p r2.take #=> true +``` + +См. [doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md). + +## Планировщик нитей + +`Fiber#scheduler` предназначен для перехвата блокирующих операций. Это обеспечивает легковесный параллелизм без необходимости менять существующий код. Обзор того, как это работает, смотрите в видео ["Don't Wait For Me, Scalable Concurrency for Ruby 3"](https://www.youtube.com/watch?v=Y29SSOS4UOc). + +Классы/методы, поддерживаемые на данный момент: + +- `Mutex#lock`, `Mutex#unlock`, `Mutex#sleep` +- `ConditionVariable#wait` +- `Queue#pop`, `SizedQueue#push` +- `Thread#join` +- `Kernel#sleep` +- `Process.wait` +- `IO#wait`, `IO#read`, `IO#write` и смежные (`#wait_readable`, `#gets`, `#puts` и пр.). +- `IO#select` *не поддерживается*. + +Следующий пример выполнит несколько запросов HTTP параллельно: + +(async -- это гем, который использует данную фичу) + +``` ruby +require 'async' +require 'net/http' +require 'uri' +Async do + ["ruby", "python", "c"].each do |topic| + Async do + Net::HTTP.get(URI "https://www.google.com/search?q=#{topic}") + end + end +end +``` + +## Другие значимые фичи + +* Однострочный поиск по образцу теперь использует `=>` вместо `in`. + ``` ruby + # version 3.0 + {a: 0, b: 1} => {a:} + p a # => 0 + # version 2.7 + {a: 0, b: 1} in {a:} + p a # => 0 + ``` +* Поиск по образцу. + ``` ruby + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + ``` +* Объявление метода без end. + ``` ruby + def square(x) = x * x + ``` +* `Hash#except` теперь в stdlib. + ``` ruby + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + ``` +* Просмотр памяти добавлен как экспериментальная фича + * Это новое C-API для прямого обмена участками памяти, такими как числовой массив или битмап, между библиотеками нативных расширений. Библиотеки расширений также могут делиться метаданными об участках памяти, таких как форма, формат и пр. С помощью этих метаданных библиотеки расширений могут делиться даже многомерными массивами. Дизайн этой фичи был вдохновлен буферным протоколом Python. + +## Улучшения производительности + +* Много улучшений реализовано в MJIT. См. NEWS. +* Вставка длинного кода в IRB ускорена в 53 раза по сравнению с Ruby 2.7.0. Например, [вот этот пример кода](https://gist.github.com/aycabta/30ab96334275bced5796f118c9220b0b) вставляется теперь не за 11.7 секунды, а за 0.22. + +## Другие значимые отличия от 2.7 + +* Именованные параметры отделены от остальных. + * Код, который выдавал предупреждения в Ruby 2.7, работать больше не будет. См. [новость](https://www.ruby-lang.org/ru/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/). + * Кстати, теперь можно брать только ведущие аргументы. + ``` ruby + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end + ``` +* Фича `$SAFE` полностью выпилена; теперь это обычная глобальная переменная. +* В Ruby 2.5 бектрейс был развернут, но это изменение откатили. Теперь он ведет себя как в Ruby 2.4; сначала идет сообщение об ошибке и номер строки, где возникло исключение, а затем следует стек вызовов. +* Обновлены некоторые стандартные библиотеки. + * RubyGems 3.2.0.rc.1 + * Bundler 2.2.0.rc.1 + * IRB 1.2.6 + * Reline 0.1.5 +* Следующие библиотеки более не поставляются с языком. + Устанавливайте их соответствующими гемами. + * net-telnet + * xmlrpc +* Следующие, поставляемые с языком, гемы больше не встроены в него. + * rexml + * rss +* Следующие файлы стандартной библиотеки переведены в разряд встроенных гемов и опубликованы на rubygems.org. + * abbrev + * base64 + * English + * erb + * find + * io-nonblock + * io-wait + * net-ftp + * net-http + * net-imap + * net-protocol + * nkf + * open-uri + * optparse + * resolv + * resolv-replace + * rinda + * securerandom + * set + * shellwords + * tempfile + * time + * tmpdir + * tsort + * weakref + +См. [NEWS](https://github.com/ruby/ruby/blob/v3_0_0_preview2/NEWS.md) +или [коммиты](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_preview2). + +{% assign release = site.data.releases | where: "version", "3.0.0-preview2" | first %} + +В ходе этого со времен версии 2.7.0 было изменено [{{ release.stats.files_changed }} файлов, было сделано {{ release.stats.insertions }} вставок(+), {{ release.stats.deletions }} удалений(-)](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0)! + +Пожалуйста, попробуйте Ruby 3.0.0-preview2 и дайте обратную связь! + +## Скачать + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Что такое Ruby + +Matz (Yukihiro Matsumoto) разработал первую версию Ruby в 1993, +и на сегодня язык разрабатывается как Open Source. Он работает +на множестве платформ и используется по всему миру, особенно в веб разработке. diff --git a/ru/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md b/ru/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md new file mode 100644 index 0000000000..7ac8a68dfe --- /dev/null +++ b/ru/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md @@ -0,0 +1,316 @@ +--- +layout: news_post +title: "Вышел Ruby 3.0.0 RC1" +author: "naruse" +translator: "nakilon" +date: 2020-12-20 00:00:00 +0000 +lang: ru +--- + +Мы рады объявить о выходе Ruby 3.0.0-rc1. + +В нем представлено много новых фич и улучшений производительности. + +## Статический анализ + +### RBS + +RBS -- это язык описания типов в программах на Ruby. + +Тайп-чекеры, включая TypeProf и другие инструменты, поддерживающие RBS, будут понимать программы на Ruby намного лучше с определениями RBS. + +Вы можете написать определения классам и модулям: методам, определенным в классе, переменным экземпляра и их типам, а также отношениям наследования/примесей. + +RBS преследует цель поддержать наиболее часто встречающиеся паттерны программирования на Ruby и позволяет описывать сложные типы, такие как объединения, перегрузка методов и дженерики. Также поддерживается утиная типизация с _интерфейсами_. + +Ruby 3.0 поставляется с гемом `rbs`, который позволяет парсить и обрабатывать определения типов, написанные на языке RBS. +Ниже небольшой пример RBS с определениями класса, модуля и константы. + +``` rbs +module ChatApp + VERSION: String + class Channel + attr_reader name: String + attr_reader messages: Array[Message] + attr_reader users: Array[User | Bot] # `|` means union types, `User` or `Bot`. + def initialize: (String) -> void + def post: (String, from: User | Bot) -> Message # Method overloading is supported. + | (File, from: User | Bot) -> Message + end +end +``` + +См. [README гема](https://github.com/ruby/rbs). + +### TypeProf + +TypeProf -- это инструмент статического анализа, поставляемый вместе с пакетом Ruby. + +На данный момент TypeProf как бы выполняет вывод типов. + +Он читает обычный (без аннотаций типов) код на Ruby, анализирует, как методы объявлены и используются, и генерирует прототип аннотаций типов в формате RBS. + +Вот небольшая демонстрация TypeProf. + +Пример ввода: + +``` ruby +# test.rb +class User + def initialize(name:, age:) + @name, @age = name, age + end + attr_reader :name, :age +end +User.new(name: "John", age: 20) +``` + +Пример вывода: + +``` +$ typeprof test.rb +# Classes +class User + attr_reader name : String + attr_reader age : Integer + def initialize : (name: String, age: Integer) -> [String, Integer] +end +``` + +Вы можете воспользоваться TypeProf сохранив ввод в файл `test.rb`, а затем выполнив команду `typeprof test.rb`. + +Также вы можете [попробовать TypeProf онлайн](https://mame.github.io/typeprof-playground/#rb=%23+test.rb%0Aclass+User%0A++def+initialize%28name%3A%2C+age%3A%29%0A++++%40name%2C+%40age+%3D+name%2C+age%0A++end%0A++%0A++attr_reader+%3Aname%2C+%3Aage%0Aend%0A%0AUser.new%28name%3A+%22John%22%2C+age%3A+20%29&rbs=). (Там TypeProf запускается на сервере -- приносим свои извинения, если он лежит!) + +См. [документацию](https://github.com/ruby/typeprof/blob/master/doc/doc.md) и [демо](https://github.com/ruby/typeprof/blob/master/doc/demo.md). + +TypeProf -- это еще пока только экспериментальная разработка; поддерживается лишь подмножество языка Ruby, и определение типов ограничено. Однако она быстро растет и улучшает покрытие фич языка, скорость анализа и удобство использования. Любая обратная связь крайне приветствуется. + +## Рактор (экспериментально) + +Рактор -- это абстракция параллельных вычислений, подобная модели акторов, предназначенная обеспечить параллельное выполнение без лишних хлопот о потоковой безопасности. + +Вы можете создать несколько ракторов и запустить их параллельно. Рактор обеспечивает потоковую безопасность параллельных вычислений тем, что не может иметь общих объектов с другики ракторами в обычном понимании. Коммуникация между ракторами обеспечивается передачей сообщений. + +Рактор синтаксически ограничивает возможность совместного использования объектов (в случае одного Рактора разницы не будет). + +Спецификация и реализация еще не окончательны и могут быть изменены в будущем, поэтому эта фича отмечена как экспериментальная и выдает предупреждение "experimental feature" при первом вызове `Ractor.new`. + +Ниже небольшая программа, вычисляющая `n.prime?` (`n` -- относительно большое целое число) параллельно двумя ракторами. На компьютере, поддерживающем параллельные вычисления, вы убедитесь, что программа выполняется примерно в 2 раза быстрее, чем последовательная. + +``` ruby +require 'prime' +# n.prime? with sent integers in r1, r2 run in parallel +r1, r2 = *(1..2).map do + Ractor.new do + n = Ractor.receive + n.prime? + end +end +# send parameters +r1.send 2**61 - 1 +r2.send 2**61 + 15 +# wait for the results of expr1, expr2 +p r1.take #=> true +p r2.take #=> true +``` + +См. [doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md). + +### Планировщик нитей + +`Fiber#scheduler` предназначен для перехвата блокирующих операций. Это обеспечивает легковесный параллелизм без необходимости менять существующий код. Обзор того, как это работает, смотрите в видео ["Don't Wait For Me, Scalable Concurrency for Ruby 3"](https://www.youtube.com/watch?v=Y29SSOS4UOc). + +Классы/методы, поддерживаемые на данный момент: + +- `Mutex#lock`, `Mutex#unlock`, `Mutex#sleep` +- `ConditionVariable#wait` +- `Queue#pop`, `SizedQueue#push` +- `Thread#join` +- `Kernel#sleep` +- `Process.wait` +- `IO#wait`, `IO#read`, `IO#write` и смежные (`#wait_readable`, `#gets`, `#puts` и пр.). +- `IO#select` *не поддерживается*. + +Следующий пример выполнит несколько запросов HTTP параллельно: + +(async -- это гем, который использует данную фичу) + +``` ruby +require 'async' +require 'net/http' +require 'uri' +Async do + ["ruby", "python", "c"].each do |topic| + Async do + Net::HTTP.get(URI "https://www.google.com/search?q=#{topic}") + end + end +end +``` + +## Другие значимые новые фичи + +* Однострочный поиск по образцу изменил свой вид. (экспериментально) + + * добавлен `=>` для правостороннего присваивания. + + ```ruby + 0 => a + p a #=> 0 + + {b: 0, c: 1} => {b:} + p b #=> 0 + ``` + + * `in` теперь возвращает `true` или `false`. + + ```ruby + # version 3.0 + 0 in 1 #=> false + + # version 2.7 + 0 in 1 #=> raise NoMatchingPatternError + ``` + +* Поиск по образцу. (экспериментально) + + ``` ruby + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + ``` + +* Добавлена возможность объявления метода без end. + + ``` ruby + def square(x) = x * x + ``` + +* `Hash#except` теперь в stdlib. + + ``` ruby + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + ``` + +* Просмотр памяти добавлен как экспериментальная фича + + * Это новое C-API для прямого обмена участками памяти, такими как числовой массив или битмап, между библиотеками нативных расширений. Библиотеки расширений также могут делиться метаданными об участках памяти, таких как форма, формат и пр. С помощью этих метаданных библиотеки расширений могут делиться даже многомерными массивами. Дизайн этой фичи был вдохновлен буферным протоколом Python. + +## Улучшения производительности + +* Много улучшений реализовано в MJIT. См. NEWS. +* Вставка длинного кода в IRB ускорена в 53 раза по сравнению с Ruby 2.7.0. Например, [вот этот пример кода](https://gist.github.com/aycabta/30ab96334275bced5796f118c9220b0b) вставляется теперь не за 11.7 секунды, а за 0.22. + +## Другие значимые отличия от 2.7 + +* Именованные параметры отделены от остальных. + * Код, который выдавал предупреждения в Ruby 2.7, работать больше не будет. См. [новость](https://www.ruby-lang.org/ru/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/). + * Кстати, теперь можно брать только ведущие аргументы. + + ``` ruby + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end + ``` + +* Поиск по образцу (`case`/`in`) -- больше не экспериментальная фича. +* Фича `$SAFE` полностью выпилена; теперь это обычная глобальная переменная. +* В Ruby 2.5 бектрейс был развернут, но это изменение откатили. Теперь он ведет себя как в Ruby 2.4; сначала идет сообщение об ошибке и номер строки, где возникло исключение, а затем следует стек вызовов. +* Обновлены некоторые стандартные библиотеки. + * RubyGems 3.2.2 + * Bundler 2.2.2 + * IRB 1.2.6 + * Reline 0.1.5 + * Psych 3.2.1 + * JSON 2.4.1 + * BigDecimal 3.0.0 + * CSV 3.1.9 + * Digest 3.0.0 + * Fiddle 1.0.4 + * StringIO 3.0.0 + * StringScanner 3.0.0 +* Следующие библиотеки более не поставляются с языком. + Устанавливайте их соответствующими гемами. + * net-telnet + * xmlrpc +* Следующие, поставляемые с языком, гемы больше не встроены в него. + * rexml + * rss +* Следующие файлы стандартной библиотеки переведены в разряд встроенных гемов и опубликованы на rubygems.org. + * English + * abbrev + * base64 + * drb + * debug + * erb + * find + * net-ftp + * net-http + * net-imap + * net-protocol + * open-uri + * optparse + * pp + * prettyprint + * resolv-replace + * resolv + * rinda + * set + * securerandom + * shellwords + * tempfile + * tmpdir + * time + * tsort + * un + * weakref + * digest + * io-nonblock + * io-wait + * nkf + * pathname + * syslog + * win32ole + +См. [NEWS](https://github.com/ruby/ruby/blob/v3_0_0_rc1/NEWS.md) +или [коммиты](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_rc1). + +{% assign release = site.data.releases | where: "version", "3.0.0-rc1" | first %} + +В ходе этого со времен версии 2.7.0 было изменено [{{ release.stats.files_changed }} файлов, было сделано {{ release.stats.insertions }} вставок(+), {{ release.stats.deletions }} удалений(-)](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0)! + +Пожалуйста, попробуйте Ruby 3.0.0-rc1 и дайте обратную связь! + +## Скачать + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Что такое Ruby + +Matz (Yukihiro Matsumoto) разработал первую версию Ruby в 1993, +и на сегодня язык разрабатывается как Open Source. Он работает +на множестве платформ и используется по всему миру, особенно в веб разработке. diff --git a/ru/news/_posts/2020-12-25-ruby-3-0-0-released.md b/ru/news/_posts/2020-12-25-ruby-3-0-0-released.md new file mode 100644 index 0000000000..f3bced266f --- /dev/null +++ b/ru/news/_posts/2020-12-25-ruby-3-0-0-released.md @@ -0,0 +1,389 @@ +--- +layout: news_post +title: "Вышел Ruby 3.0.0" +author: "naruse" +translator: "nakilon" +date: 2020-12-25 00:00:00 +0000 +lang: ru +--- + +Мы рады объявить о выходе Ruby 3.0.0. С 2015 мы упорно работали над Ruby 3, чья цель есть производительность, параллелизм и типизация. Matz собенно подчеркнул производительность: "Ruby3 будет в 3 раза быстре Ruby2" a.k.a. [Ruby 3x3](https://blog.heroku.com/ruby-3-by-3). + +{% assign release = site.data.releases | where: "version", "3.0.0" | first %} + +Optcarrot 3000 frames + +С помощью [бенчмарка Optcarrot](https://github.com/mame/optcarrot), который замеряет скорость одного потока на примере эмуляции NES игры, мы достигли трехкратного ускорения производительнности по сравнению с Ruby 2.0!
Замеры производились в окружении, описанном в [benchmark-driver.github.io/hardware.html](https://benchmark-driver.github.io/hardware.html). [Commit 8c510e4095](https://github.com/ruby/ruby/commit/8c510e4095) стал отметкой Ruby 3.0. В вашем окружении или бенчмарке результат может быть не трехкратным.
+ +Ruby 3.0.0 включает в себя следующие цели +* Производительность + * MJIT +* Параллелизм + * Рактор + * Планировщик нитей +* Типизация (Статический анализ) + * RBS + * TypeProf + +С вышеуказанными улучшениями производительности Ruby 3.0 также привносит несколько новых фич, которые будут описаны ниже. + +## Производительность + +> Когда я впервые объявил о "Ruby3x3" в слайдах на конференции, многие члены команды подумали: "что за бахвальство?". На самом деле мне тогда тоже так показалось. Но мы сделали это. Для меня честь видеть, что команда действительно смогла сделать Ruby3.0 в три раза быстрее Ruby2.0 (в некоторых бенчмарках). -- Matz + +### MJIT + +Многие улучшения были реализованы в MJIT. См. NEWS. + +В Ruby версии 3.0 подразумевается, что JIT улучшит производительность в некоторых задачах, таких как игры ([Optcarrot](https://benchmark-driver.github.io/benchmarks/optcarrot/commits.html#chart-1)), ИИ ([Rubykon](https://benchmark-driver.github.io/benchmarks/rubykon/commits.html)) или любое другое приложение, которое тратит большую часть времени вызывая одни и те же методы много раз. + +Не смотря на то, что Ruby 3.0 [значительно уменьшил размер JIT кода](https://twitter.com/k0kubun/status/1256142302608650244), он все еще не готов к оптимизации таких задач, как Rails, где так много методов, что происходит промах в i-cache, особенно при JIT. Следите за новостями о дальнейших улучшениях в Ruby 3.1 на этот счет. + +## Параллелизм + +> Сегодня мы живем в мире многоядерности. Параллелизм очень важен. Ractor и Async Fiber сделают Ruby по-настощему языком параллельного программирования. --- Matz + +## Рактор (экспериментально) + +Рактор -- это абстракция параллельных вычислений, подобная модели акторов, предназначенная обеспечить параллельное выполнение без лишних хлопот о потоковой безопасности. + +Вы можете создать несколько ракторов и запустить их параллельно. Рактор обеспечивает потоковую безопасность параллельных вычислений тем, что не может иметь общих объектов с другики ракторами в обычном понимании. Коммуникация между ракторами обеспечивается передачей сообщений. + +Рактор синтаксически ограничивает возможность совместного использования объектов (в случае одного Рактора разницы не будет). + +Спецификация и реализация еще не окончательны и могут быть изменены в будущем, поэтому эта фича отмечена как экспериментальная и выдает предупреждение "experimental feature" при первом вызове `Ractor.new`. + +Ниже небольшая программа, вычисляющая `n.prime?` (`n` -- относительно большое целое число) параллельно двумя ракторами. На компьютере, поддерживающем параллельные вычисления, вы убедитесь, что программа выполняется примерно в 2 раза быстрее, чем последовательная. + +``` ruby +def tarai(x, y, z) = + x <= y ? y : tarai(tarai(x-1, y, z), + tarai(y-1, z, x), + tarai(z-1, x, y)) +require 'benchmark' +Benchmark.bm do |x| + # sequential version + x.report('seq'){ 4.times{ tarai(14, 7, 0) } } + + # parallel version + x.report('par'){ + 4.times.map do + Ractor.new { tarai(14, 7, 0) } + end.each(&:take) + } +end +``` + +``` +Benchmark result: + user system total real +seq 64.560736 0.001101 64.561837 ( 64.562194) +par 66.422010 0.015999 66.438009 ( 16.685797) +``` + +Результаты были получены на Ubuntu 20.04, Intel(R) Core(TM) i7-6700 (4 физических ядра, 8 логических ядер). Это показывает, что параллелизированная версия в 3.87 раза быстрее, чем последовательнная. + +См. [doc/ractor.md](https://docs.ruby-lang.org/en/3.0.0/doc/ractor_md.html). + +### Планировщик нитей + +`Fiber#scheduler` предназначен для перехвата блокирующих операций. Это обеспечивает легковесный параллелизм без необходимости менять существующий код. Обзор того, как это работает, смотрите в видео ["Don't Wait For Me, Scalable Concurrency for Ruby 3"](https://www.youtube.com/watch?v=Y29SSOS4UOc). + +Классы/методы, поддерживаемые на данный момент: + +- `Mutex#lock`, `Mutex#unlock`, `Mutex#sleep` +- `ConditionVariable#wait` +- `Queue#pop`, `SizedQueue#push` +- `Thread#join` +- `Kernel#sleep` +- `Process.wait` +- `IO#wait`, `IO#read`, `IO#write` и смежные (`#wait_readable`, `#gets`, `#puts` и пр.). +- `IO#select` *не поддерживается*. + +Этот пример выполнит несколько запросов HTTP параллельно: + +``` ruby +require 'async' +require 'net/http' +require 'uri' + +Async do + ["ruby", "rails", "async"].each do |topic| + Async do + Net::HTTP.get(URI "https://www.google.com/search?q=#{topic}") + end + end +end +``` + +Он использует гем [async](https://github.com/socketry/async) который обеспечивает цикл событий. Этот цикл событий использует хуки `Fiber#scheduler` для того, чтобы сделать `Net::HTTP` неблокирующим. Другие гемы также могут использовать этот интерфейс для обеспечения неблокирующего выполнения кода на Ruby, и эти гемы могут быть совместимыми другими реализациями Ruby (например, JRuby, TruffleRuby), которые могут поддерживать такие же неблокирующие хуки. + +## Статический анализ + +> 2010-е были эпохой статически типизированных языков программирования. Ruby смотрит в будущее статической типизации не через объявление типов, а через абстрактную интерпретацию. RBS и TypeProf -- это первые шаги в будущее. Впереди еще много шагов. --- Matz + +### RBS + +RBS -- это язык описания типов в программах на Ruby. + +Тайп-чекеры, включая TypeProf и другие инструменты, поддерживающие RBS, будут понимать программы на Ruby намного лучше с определениями RBS. + +Вы можете написать определения классам и модулям: методам, определенным в классе, переменным экземпляра и их типам, а также отношениям наследования/примесей. + +RBS преследует цель поддержать наиболее часто встречающиеся паттерны программирования на Ruby и позволяет описывать сложные типы, такие как объединения, перегрузка методов и дженерики. Также поддерживается утиная типизация с _интерфейсами_. + +Ruby 3.0 поставляется с гемом `rbs`, который позволяет парсить и обрабатывать определения типов, написанные на языке RBS. +Ниже небольшой пример RBS с определениями класса, модуля и константы. + +``` rbs +module ChatApp + VERSION: String + class Channel + attr_reader name: String + attr_reader messages: Array[Message] + attr_reader users: Array[User | Bot] # `|` means union types, `User` or `Bot`. + def initialize: (String) -> void + def post: (String, from: User | Bot) -> Message # Method overloading is supported. + | (File, from: User | Bot) -> Message + end +end +``` + +См. [README гема rbs](https://github.com/ruby/rbs). + +### TypeProf + +TypeProf -- это инструмент статического анализа, поставляемый вместе с пакетом Ruby. + +На данный момент TypeProf как бы выполняет вывод типов. + +Он читает обычный (без аннотаций типов) код на Ruby, анализирует, как методы объявлены и используются, и генерирует прототип аннотаций типов в формате RBS. + +Вот небольшая демонстрация TypeProf. + +Пример ввода: + +``` ruby +# test.rb +class User + def initialize(name:, age:) + @name, @age = name, age + end + attr_reader :name, :age +end +User.new(name: "John", age: 20) +``` + +Пример вывода: + +``` +$ typeprof test.rb +# Classes +class User + attr_reader name : String + attr_reader age : Integer + def initialize : (name: String, age: Integer) -> [String, Integer] +end +``` + +Вы можете воспользоваться TypeProf сохранив ввод в файл `test.rb`, а затем выполнив команду `typeprof test.rb`. + +Также вы можете [попробовать TypeProf онлайн](https://mame.github.io/typeprof-playground/#rb=%23+test.rb%0Aclass+User%0A++def+initialize%28name%3A%2C+age%3A%29%0A++++%40name%2C+%40age+%3D+name%2C+age%0A++end%0A++%0A++attr_reader+%3Aname%2C+%3Aage%0Aend%0A%0AUser.new%28name%3A+%22John%22%2C+age%3A+20%29&rbs=). (Там TypeProf запускается на сервере -- приносим свои извинения, если он лежит!) + +См. [документацию по TypeProf](https://github.com/ruby/typeprof/blob/master/doc/doc.md) и [демо](https://github.com/ruby/typeprof/blob/master/doc/demo.md). + +TypeProf -- это еще пока только экспериментальная разработка; поддерживается лишь подмножество языка Ruby, и определение типов ограничено. Однако она быстро растет и улучшает покрытие фич языка, скорость анализа и удобство использования. Любая обратная связь крайне приветствуется. + +## Другие значимые новые фичи + +* Однострочный поиск по образцу изменил свой вид. (экспериментально) + + * добавлен `=>` для правостороннего присваивания. + + ```ruby + 0 => a + p a #=> 0 + + {b: 0, c: 1} => {b:} + p b #=> 0 + ``` + + * `in` теперь возвращает `true` или `false`. + + ```ruby + # version 3.0 + 0 in 1 #=> false + + # version 2.7 + 0 in 1 #=> raise NoMatchingPatternError + ``` + +* Поиск по образцу. (экспериментально) + + ``` ruby + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + ``` + +* Добавлена возможность объявления метода без end. + + ``` ruby + def square(x) = x * x + ``` + +* `Hash#except` теперь в stdlib. + + ``` ruby + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + ``` + +* Просмотр памяти добавлен как экспериментальная фича + + * Это новое C-API для прямого обмена участками памяти, такими как числовой массив или битмап, между библиотеками нативных расширений. Библиотеки расширений также могут делиться метаданными об участках памяти, таких как форма, формат и пр. С помощью этих метаданных библиотеки расширений могут делиться даже многомерными массивами. Дизайн этой фичи был вдохновлен буферным протоколом Python. + +## Улучшения производительности + +* Вставка длинного кода в IRB в 53 раза быстрее, чем в IRB от Ruby 2.7.0. Например, время, необходимое для вставки [этого кода](https://gist.github.com/aycabta/30ab96334275bced5796f118c9220b0b) уменьшилось с 11.7 секунды до 0.22 секунды. + + + + + +* В IRB добавлена команда `measure`. Она позволяет легко замерять время выполнения. + + ``` + irb(main):001:0> 3 + => 3 + irb(main):002:0> measure + TIME is added. + => nil + irb(main):003:0> 3 + processing time: 0.000058s + => 3 + irb(main):004:0> measure :off + => nil + irb(main):005:0> 3 + => 3 + ``` + +## Другие значимые отличия от 2.7 + +* Именованные параметры отделены от остальных. + * Код, который выдавал предупреждения в Ruby 2.7, работать больше не будет. См. [новость](https://www.ruby-lang.org/ru/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/). + * Кстати, теперь можно брать только ведущие аргументы. + + ``` ruby + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end + ``` + +* Поиск по образцу (`case`/`in`) -- больше не экспериментальная фича. + * См. [документацию по поиску по образцу](https://docs.ruby-lang.org/en/3.0.0/doc/syntax/pattern_matching_rdoc.html). +* Фича `$SAFE` полностью выпилена; теперь это обычная глобальная переменная. +* В Ruby 2.5 бектрейс был развернут, но это изменение откатили. Теперь он ведет себя как в Ruby 2.4; сначала идет сообщение об ошибке и номер строки, где возникло исключение, а затем следует стек вызовов. +* Обновлены некоторые стандартные библиотеки. + * RubyGems 3.2.3 + * Bundler 2.2.3 + * IRB 1.3.0 + * Reline 0.2.0 + * Psych 3.3.0 + * JSON 2.5.1 + * BigDecimal 3.0.0 + * CSV 3.1.9 + * Date 3.1.0 + * Digest 3.0.0 + * Fiddle 1.0.6 + * StringIO 3.0.0 + * StringScanner 3.0.0 + * etc. +* Следующие библиотеки более не поставляются с языком. + Устанавливайте их соответствующими гемами. + * sdbm + * webrick + * net-telnet + * xmlrpc +* Следующие, поставляемые с языком, гемы больше не встроены в него. + * rexml + * rss +* Следующие файлы стандартной библиотеки переведены в разряд встроенных гемов и опубликованы на rubygems.org. + * English + * abbrev + * base64 + * drb + * debug + * erb + * find + * net-ftp + * net-http + * net-imap + * net-protocol + * open-uri + * optparse + * pp + * prettyprint + * resolv-replace + * resolv + * rinda + * set + * securerandom + * shellwords + * tempfile + * tmpdir + * time + * tsort + * un + * weakref + * digest + * io-nonblock + * io-wait + * nkf + * pathname + * syslog + * win32ole + +См. [NEWS](https://github.com/ruby/ruby/blob/{{ release.tag }}/NEWS.md) +или [коммиты](https://github.com/ruby/ruby/compare/v2_7_0...{{ release.tag }}). + +В ходе этого со времен версии 2.7.0 было изменено [{{ release.stats.files_changed }} файлов, было сделано {{ release.stats.insertions }} вставок(+), {{ release.stats.deletions }} удалений(-)](https://github.com/ruby/ruby/compare/v2_7_0...{{ release.tag }}#file_bucket)! + +> Ruby3.0 -- это веха. Язык эволюционировал, сохранив совместимость. Но это еще не все. Ruby будет развиваться и станет еще лучше. Следите за новостями! --- Matz + +С Рождеством, с праздниками, и получайте удовольствие от программирования на Ruby 3.0! + +## Скачать + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Что такое Ruby + +Matz (Yukihiro Matsumoto) разработал первую версию Ruby в 1993, +и на сегодня язык разрабатывается как Open Source. Он работает +на множестве платформ и используется по всему миру, особенно в веб разработке. diff --git a/ru/news/_posts/2021-04-05-ruby-2-5-9-released.md b/ru/news/_posts/2021-04-05-ruby-2-5-9-released.md new file mode 100644 index 0000000000..7948ba51d0 --- /dev/null +++ b/ru/news/_posts/2021-04-05-ruby-2-5-9-released.md @@ -0,0 +1,58 @@ +--- +layout: news_post +title: "Вышел Ruby 2.5.9" +author: "usa" +translator: "nakilon" +date: 2021-04-05 12:00:00 +0000 +lang: ru +--- + +Вышел Ruby 2.5.9. + +Этот релиз включает в себя исправления уязвимостей. +Ознакомьтесь с подробностями ниже. + +* [CVE-2020-25613: Потенциальная уязвимость скрытого HTTP запроса в WEBrick]({%link en/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md %}) +* [CVE-2021-28965: Уязвимость round-trip кодирования в REXML]({% link en/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md %}) + +См. [коммиты](https://github.com/ruby/ruby/compare/v2_5_8...v2_5_9). + +Этим релизом Ruby 2.5 достигает EOL, т.е. это последний релиз из серии 2.5. +Мы не будем выпускать Ruby 2.5.10 даже если будут найдены уязвимости. +Мы рекомендуем всем пользователям Ruby 2.5 немедленно обновиться до 3.0, 2.7 или 2.6. + +## Скачать + +{% assign release = site.data.releases | where: "version", "2.5.9" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Комментарий к релизу + +Благодарим всех, кто помог с этим релизом, особенно за сообщения об уязвимости. diff --git a/ru/news/_posts/2021-04-05-ruby-2-6-7-released.md b/ru/news/_posts/2021-04-05-ruby-2-6-7-released.md new file mode 100644 index 0000000000..ad92acc13b --- /dev/null +++ b/ru/news/_posts/2021-04-05-ruby-2-6-7-released.md @@ -0,0 +1,64 @@ +--- +layout: news_post +title: "Вышел Ruby 2.6.7" +author: "usa" +translator: "nakilon" +date: 2021-04-05 12:00:00 +0000 +lang: ru +--- + +Вышел Ruby 2.6.7. + +Этот релиз включает в себя исправления уязвимостей. +Ознакомьтесь с подробностями ниже. + +* [CVE-2020-25613: Потенциальная уязвимость скрытого HTTP запроса в WEBrick]({%link en/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md %}) +* [CVE-2021-28965: Уязвимость round-trip кодирования в REXML]({% link en/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md %}) + +См. [коммиты](https://github.com/ruby/ruby/compare/v2_6_6...v2_6_7). + +На этом релизе мы прекращаем фазу нормальной поддержки Ruby 2.6, +и Ruby 2.6 входит в фазу поддержки безопасности. +Это означает, что мы больше не будем бэкпортировать какие-либо исправления в Ruby 2.6 за исключением исправлений, связанных с безопасностью. +Срок фазы поддержки безопасности запланировал на год. +Ruby 2.6 достигает EOL и его официальная поддержка заканчивается вместе с фзоай поддержки безопасности. +Поэтому мы рекомендуем начать планировать обновление до Ruby 2.7 или 3.0. + +## Скачать + +{% assign release = site.data.releases | where: "version", "2.6.7" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Комментарий к релизу + +Многие коммитеры, разработчики и пользователи, кто присылал баг-репорты, помогли нам сделать этот релиз. +Благодарим за этот вклад. + +Поддержка Ruby 2.6, включая этот релиз, основана на "Соглашении о стабильной версии Ruby" Ассоциации Ruby. diff --git a/ru/news/_posts/2021-04-05-ruby-2-7-3-released.md b/ru/news/_posts/2021-04-05-ruby-2-7-3-released.md new file mode 100644 index 0000000000..da6ce598f2 --- /dev/null +++ b/ru/news/_posts/2021-04-05-ruby-2-7-3-released.md @@ -0,0 +1,55 @@ +--- +layout: news_post +title: "Вышел Ruby 2.7.3" +author: "nagachika" +translator: "nakilon" +date: 2021-04-05 12:00:00 +0000 +lang: ru +--- + +Вышел Ruby 2.7.3. + +Этот релиз включает в себя исправления уязвимостей. +Ознакомьтесь с подробностями ниже. + +* [CVE-2021-28965: Уязвимость round-trip кодирования в REXML]({% link en/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md %}) +* [CVE-2021-28966: Уязвимость обхода каталога в Tempfile на Windows]({% link en/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md %}) + +См. [коммиты](https://github.com/ruby/ruby/compare/v2_7_2...v2_7_3). + +## Скачать + +{% assign release = site.data.releases | where: "version", "2.7.3" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Комментарий к релизу + +Многие коммитеры, разработчики и пользователи, кто присылал баг-репорты, помогли нам сделать этот релиз. +Благодарим за этот вклад. diff --git a/ru/news/_posts/2021-04-05-ruby-3-0-1-released.md b/ru/news/_posts/2021-04-05-ruby-3-0-1-released.md new file mode 100644 index 0000000000..d84788c08f --- /dev/null +++ b/ru/news/_posts/2021-04-05-ruby-3-0-1-released.md @@ -0,0 +1,48 @@ +--- +layout: news_post +title: "Вышел Ruby 3.0.1" +author: "naruse" +translator: "nakilon" +date: 2021-04-05 12:00:00 +0000 +lang: ru +--- + +Вышел Ruby 3.0.1. + +Этот релиз включает в себя исправления уязвимостей. +Ознакомьтесь с подробностями ниже. + +* [CVE-2021-28965: Уязвимость round-trip кодирования в REXML]({% link en/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md %}) +* [CVE-2021-28966: Уязвимость обхода каталога в Tempfile на Windows]({% link en/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md %}) + +См. [коммиты](https://github.com/ruby/ruby/compare/v3_0_0...v3_0_1). + +## Скачать + +{% assign release = site.data.releases | where: "version", "3.0.1" | first %} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Комментарий к релизу + +Многие коммитеры, разработчики и пользователи, кто присылал баг-репорты, помогли нам сделать этот релиз. +Благодарим за этот вклад. diff --git a/ru/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md b/ru/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md new file mode 100644 index 0000000000..acc2569300 --- /dev/null +++ b/ru/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md @@ -0,0 +1,32 @@ +--- +layout: news_post +title: "CVE-2021-28966: Уязвимость обхода каталога в Tempfile на Windows" +author: "mame" +translator: "nakilon" +date: 2021-04-05 12:00:00 +0000 +tags: security +lang: ru +--- + +В библиотеке tmpdir, поставляемой с Ruby, на Windows обнаружена непредусмотренная уязвимость создания директории. Помимо этого есть и непредусмотренная уязвимость создания файла в библиотеке tempfile, поставляемой с Ruby на Windows, потому что под капотом она использует tmpdir. Этой уязвимости присвоен идентификатор CVE [CVE-2021-28966](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-28966). + +## Подробности + +Метод `Dir.mktmpdir`, предоставляемый библиотекой tmpdir, принимает префикс и суффикс директории, которая создается из первого параметра. Префикс может содержать спецификаторы относительной директории `"..\\"`, поэтому этот метод может использоваться для указания на любую директорию. Таким образом, если скрипт принимает префикс извне, и указанная директория имеет несоответствующие права, или процесс ruby имеет несоответствующие привилегии, злоумышленник может создать директорию или файл в любой директории. + +Эта уязвимость аналогична [CVE-2018-6914](https://www.ruby-lang.org/en/news/2018/03/28/unintentional-file-and-directory-creation-with-directory-traversal-cve-2018-6914/), но предыдущее исправление было не полноценно на Windows. + +Все пользователи, использующие уяизвимый релиз, должны немедленно обновиться. + +## Уязвимые версии + +* Ruby 2.7.2 и ниже +* Ruby 3.0.0 + +## Авторство + +Благодарим [Bugdiscloseguys](https://hackerone.com/bugdiscloseguys) за обнаружение проблемы. + +## История + +* Изначально опубликовано в 2021-04-05 12:00:00 (UTC) diff --git a/ru/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md b/ru/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md new file mode 100644 index 0000000000..4ab58589cc --- /dev/null +++ b/ru/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md @@ -0,0 +1,44 @@ +--- +layout: news_post +title: "CVE-2021-28965: Уязвимость round-trip кодирования в REXML" +author: "mame" +translator: "nakilon" +date: 2021-04-05 12:00:00 +0000 +tags: security +lang: ru +--- + +В геме REXML, поставляемом с Ruby, обнаружена уязвимость round-trip кодирования XML. Этой уязвимости присвоен идентификатор CVE [CVE-2021-28965](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-28965). Мы строго рекомендуем обновление гема REXML. + +## Подробности + +При парсинге и сериализации специальным лбразом подготовленного документа XML гем REXML (включая тот, что поставляется с Ruby) может создать неправильный документ XML, со структурой, отличающейся от оригинального. Последствия во многом зависят от контекста, но это может привести к уязвимости в каких-нибудь программах, которые используют REXML. + +Пожалуйста, обновите гем REXML до версии 3.2.5 или выше. + +Если вы используете Ruby 2.6 или выше: + +* Пусть это будет Ruby 2.6.7, 2.7.3 или 3.0.1. +* Либо вы можете выполнить `gem update rexml`, чтобы обновить его. Если вы используете bundler, добавьте `gem "rexml", ">= 3.2.5"` в ваш `Gemfile`. + +Если вы используете Ruby 2.5.8 или ниже: + +* Пожалуйста, перейдите на Ruby 2.5.9. +* Команда `gem update rexml` на Ruby 2.5.8 и ниже вам не поможет. +* Обратите внимание, что Ruby 2.5 находится в фазе EOL, поэтому рассмотрите возможность обновить Ruby до 2.6.7 или выше как можно скорей. + +## Уязвимые версии + +* Ruby 2.5.8 и ниже (Команда `gem upgrade rexml` вам НЕ поможет на этой версии.) +* Ruby 2.6.6 и ниже +* Ruby 2.7.2 и ниже +* Ruby 3.0.0 +* гем REXML 3.2.4 и ниже + +## Авторство + +Благодарим [Juho Nurminen](https://hackerone.com/jupenur) за обнаружение проблемы. + +## История + +* Изначально опубликовано в 2021-04-05 12:00:00 (UTC) diff --git a/ru/news/_posts/2021-05-02-os-command-injection-in-rdoc.md b/ru/news/_posts/2021-05-02-os-command-injection-in-rdoc.md new file mode 100644 index 0000000000..fdc5fd3674 --- /dev/null +++ b/ru/news/_posts/2021-05-02-os-command-injection-in-rdoc.md @@ -0,0 +1,44 @@ +--- +layout: news_post +title: "CVE-2021-31799: Уязвимость внедрения команды в RDoc" +author: "aycabta" +translator: "nakilon" +date: 2021-05-02 09:00:00 +0000 +tags: security +lang: ru +--- + +В RDoc, поставляемом с Ruby, обнаружена уязвимость внедрения команды. +Всем пользователям Ruby рекомендуется обновить RDoc до последней версии, которая исправляет проблему. + +## Подробности + +Сообщество об уязвимости: + +* [CVE-2021-31799](https://nvd.nist.gov/vuln/detail/CVE-2021-31799) + +RDoc использовал `Kernel#open` для открытия локальных файлов. Если имя файла в проекте на Ruby начинается с `|`, а заканчивается на `tags`, то будет выполнена команда, идущая после символа `|`. Вредоносный код на Ruby мог использовать это для выполнения произвольной команды, когда пользователь вводит команду `rdoc`. + +Пользователи Ruby, у которых версия RDoc имеет данную уязвимость, должны обновиться до последней версии RDoc. + +## Уязвимые версии + +* Все версии RDoc от 3.11 до 6.3.0 + +## Как обновиться + +Выполните следующую команду, чтобы обновить RDoc до последней версии (6.3.1 или выше), чтобы исправить уязвимость. + +``` +gem install rdoc +``` + +Если вы используете bundler, добавьте `gem "rdoc", ">= 6.3.1"` в ваш `Gemfile`. + +## Авторство + +Благодарим [Alexandr Savca](https://hackerone.com/chinarulezzz) за сообщение о проблеме. + +## История + +* Изначально опубликовано в 2021-05-02 09:00:00 UTC From 9d73320fd131948dc0be63d55f3103bd54c1f79b Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Fri, 2 Jul 2021 17:46:49 +0900 Subject: [PATCH 0378/1487] 2021-002-IZUMI --- .../_posts/2021-07-07-ruby-2-6-8-released.md | 57 +++++++++++++++++++ .../_posts/2021-07-07-ruby-2-7-4-released.md | 55 ++++++++++++++++++ .../_posts/2021-07-07-ruby-3-0-2-released.md | 48 ++++++++++++++++ ...21-07-07-starttls-stripping-in-net-imap.md | 37 ++++++++++++ ...7-07-trusting-pasv-responses-in-net-ftp.md | 37 ++++++++++++ 5 files changed, 234 insertions(+) create mode 100644 en/news/_posts/2021-07-07-ruby-2-6-8-released.md create mode 100644 en/news/_posts/2021-07-07-ruby-2-7-4-released.md create mode 100644 en/news/_posts/2021-07-07-ruby-3-0-2-released.md create mode 100644 en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md create mode 100644 en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md diff --git a/en/news/_posts/2021-07-07-ruby-2-6-8-released.md b/en/news/_posts/2021-07-07-ruby-2-6-8-released.md new file mode 100644 index 0000000000..29b03c433c --- /dev/null +++ b/en/news/_posts/2021-07-07-ruby-2-6-8-released.md @@ -0,0 +1,57 @@ +--- +layout: news_post +title: "Ruby 2.6.8 Released" +author: "usa" +translator: +date: 2021-04-05 12:00:00 +0000 +lang: en +--- + +Ruby 2.6.8 has been released. + +This release includes security fixes. +Please check the topics below for details. + +* [CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP]({%link en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) +* [CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP]({%link en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) + +See the [commit logs](https://github.com/ruby/ruby/compare/v2_6_7...v2_6_8) for details. + +## Download + +{% assign release = site.data.releases | where: "version", "2.6.8" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Release Comment + +Many committers, developers, and users who provided bug reports helped us make this release. +Thanks for their contributions. + +The maintenance of Ruby 2.6, including this release, is based on the "Agreement for the Ruby stable version" of the Ruby Association. diff --git a/en/news/_posts/2021-07-07-ruby-2-7-4-released.md b/en/news/_posts/2021-07-07-ruby-2-7-4-released.md new file mode 100644 index 0000000000..99d713ee83 --- /dev/null +++ b/en/news/_posts/2021-07-07-ruby-2-7-4-released.md @@ -0,0 +1,55 @@ +--- +layout: news_post +title: "Ruby 2.7.4 Released" +author: "usa" +translator: +date: 2021-04-05 12:00:00 +0000 +lang: en +--- + +Ruby 2.7.4 has been released. + +This release includes security fixes. +Please check the topics below for details. + +* [CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP]({%link en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) +* [CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP]({%link en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) + +See the [commit logs](https://github.com/ruby/ruby/compare/v2_7_3...v2_7_4) for details. + +## Download + +{% assign release = site.data.releases | where: "version", "2.7.4" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Release Comment + +Many committers, developers, and users who provided bug reports helped us make this release. +Thanks for their contributions. diff --git a/en/news/_posts/2021-07-07-ruby-3-0-2-released.md b/en/news/_posts/2021-07-07-ruby-3-0-2-released.md new file mode 100644 index 0000000000..9cee42aa6f --- /dev/null +++ b/en/news/_posts/2021-07-07-ruby-3-0-2-released.md @@ -0,0 +1,48 @@ +--- +layout: news_post +title: "Ruby 3.0.2 Released" +author: "nagachika" +translator: +date: 2021-04-05 12:00:00 +0000 +lang: en +--- + +Ruby 3.0.2 has been released. + +This release includes security fixes. +Please check the topics below for details. + +* [CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP]({%link en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) +* [CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP]({%link en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) + +See the [commit logs](https://github.com/ruby/ruby/compare/v3_0_1...v3_0_2) for details. + +## Download + +{% assign release = site.data.releases | where: "version", "3.0.2" | first %} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Release Comment + +Many committers, developers, and users who provided bug reports helped us make this release. +Thanks for their contributions. diff --git a/en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md b/en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md new file mode 100644 index 0000000000..1fbc0ff0af --- /dev/null +++ b/en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md @@ -0,0 +1,37 @@ +--- +layout: news_post +title: "CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP" +author: "shugo" +translator: +date: 2021-07-07 09:00:00 +0000 +tags: security +lang: en +--- + +A StartTLS stripping vulnerability was discovered in Net::FTP. +This vulnerability has been assigned the CVE identifier [CVE-2021-32066](https://nvd.nist.gov/vuln/detail/CVE-2021-32066). +We strongly recommend upgrading Ruby. + +net-imap is a default gem in Ruby 3.0.1 but it has a packaging issue, so please upgrade Ruby itself. + +## Details + +Net::IMAP does not raise an exception when StartTLS +fails with an unknown response, which might allow man-in-the-middle +attackers to bypass the TLS protections by leveraging a network +position between the client and the registry to block the StartTLS +command, aka a "StartTLS stripping attack." + +## Affected Versions + +* Ruby 2.6 series: 2.6.7 and earlier +* Ruby 2.7 series: 2.7.3 and earlier +* Ruby 3.0 series: 3.0.1 and earlier + +## Credits + +Thanks to [Alexandr Savca](https://hackerone.com/chinarulezzz) for reporting the issue. + +## History + +* Originally published at 2021-07-07 09:00:00 UTC diff --git a/en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md b/en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md new file mode 100644 index 0000000000..871644b8c8 --- /dev/null +++ b/en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md @@ -0,0 +1,37 @@ +--- +layout: news_post +title: "CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP" +author: "shugo" +translator: +date: 2021-07-07 09:00:00 +0000 +tags: security +lang: en +--- + +A trusting FTP PASV responses vulnerability was discovered in Net::FTP. +This vulnerability has been assigned the CVE identifier [CVE-2021-31810](https://nvd.nist.gov/vuln/detail/CVE-2021-31810). +We strongly recommend upgrading Ruby. + +net-ftp is a default gem in Ruby 3.0.1 but it has a packaging issue, so please upgrade Ruby itself. + +## Details + +A malicious FTP server can use the PASV response to trick Net::FTP +into connecting back to a given IP address and port. This +potentially makes Net::FTP extract information about services that are +otherwise private and not disclosed (e.g., the attacker can conduct port scans +and service banner extractions). + +## Affected Versions + +* Ruby 2.6 series: 2.6.7 and earlier +* Ruby 2.7 series: 2.7.3 and earlier +* Ruby 3.0 series: 3.0.1 and earlier + +## Credits + +Thanks to [Alexandr Savca](https://hackerone.com/chinarulezzz) for reporting the issue. + +## History + +* Originally published at 2021-07-07 09:00:00 UTC From 0951ab854e805f7196c71ca10b87d299e38ff357 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Fri, 2 Jul 2021 17:49:39 +0900 Subject: [PATCH 0379/1487] Update the release date --- en/news/_posts/2021-07-07-ruby-2-6-8-released.md | 2 +- en/news/_posts/2021-07-07-ruby-2-7-4-released.md | 2 +- en/news/_posts/2021-07-07-ruby-3-0-2-released.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/en/news/_posts/2021-07-07-ruby-2-6-8-released.md b/en/news/_posts/2021-07-07-ruby-2-6-8-released.md index 29b03c433c..f3c9453290 100644 --- a/en/news/_posts/2021-07-07-ruby-2-6-8-released.md +++ b/en/news/_posts/2021-07-07-ruby-2-6-8-released.md @@ -3,7 +3,7 @@ layout: news_post title: "Ruby 2.6.8 Released" author: "usa" translator: -date: 2021-04-05 12:00:00 +0000 +date: 2021-07-07 09:00:00 +0000 lang: en --- diff --git a/en/news/_posts/2021-07-07-ruby-2-7-4-released.md b/en/news/_posts/2021-07-07-ruby-2-7-4-released.md index 99d713ee83..48adea46e8 100644 --- a/en/news/_posts/2021-07-07-ruby-2-7-4-released.md +++ b/en/news/_posts/2021-07-07-ruby-2-7-4-released.md @@ -3,7 +3,7 @@ layout: news_post title: "Ruby 2.7.4 Released" author: "usa" translator: -date: 2021-04-05 12:00:00 +0000 +date: 2021-07-07 09:00:00 +0000 lang: en --- diff --git a/en/news/_posts/2021-07-07-ruby-3-0-2-released.md b/en/news/_posts/2021-07-07-ruby-3-0-2-released.md index 9cee42aa6f..6a0845b033 100644 --- a/en/news/_posts/2021-07-07-ruby-3-0-2-released.md +++ b/en/news/_posts/2021-07-07-ruby-3-0-2-released.md @@ -3,7 +3,7 @@ layout: news_post title: "Ruby 3.0.2 Released" author: "nagachika" translator: -date: 2021-04-05 12:00:00 +0000 +date: 2021-07-07 09:00:00 +0000 lang: en --- From 5bbc1ba5f262acad71bab09adc057f07c55c2d91 Mon Sep 17 00:00:00 2001 From: Victor Maslov Date: Fri, 2 Jul 2021 18:52:56 +0300 Subject: [PATCH 0380/1487] Fixed multiple typos (ru) (#2665) --- .../_posts/2020-09-25-ruby-3-0-0-preview1-released.md | 6 +++--- .../_posts/2020-12-08-ruby-3-0-0-preview2-released.md | 2 +- ru/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md | 2 +- ru/news/_posts/2020-12-25-ruby-3-0-0-released.md | 10 +++++----- ru/news/_posts/2021-04-05-ruby-2-6-7-released.md | 2 +- ...empfile-path-traversal-on-windows-cve-2021-28966.md | 2 +- ...round-trip-vulnerability-in-rexml-cve-2021-28965.md | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ru/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md b/ru/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md index 2859a3dddb..1df09a4b94 100644 --- a/ru/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md +++ b/ru/news/_posts/2020-09-25-ruby-3-0-0-preview1-released.md @@ -14,12 +14,12 @@ lang: ru ## RBS RBS -- это язык описания типов в программах на Ruby. -Тайп-чекеры, включая тайп-профайлеры и другие инструменты, поддерживающие RBS, смогут понимать програииы на Ruby гораздо лучше при наличии определений RBS. +Тайп-чекеры, включая тайп-профайлеры и другие инструменты, поддерживающие RBS, смогут понимать программы на Ruby гораздо лучше при наличии определений RBS. Вы можете составить определения классов и модулей: методы, определенные в классе, переменные экземпляра и их типы, а также отношения наследования и примесей. RBS нацелен на поддержку часто встречающихся паттернов в программах на Ruby, а также позволяет описывать такие сложные типы, как объединения, перегрузка методов и дженерики. Он также поддерживает утиную типизацию с _интерфейсами_. -Ruby 3.0 поставлется вместе с гемом `rbs`, который позволяет парсить и обрабатывать определения типов на языке RBS. +Ruby 3.0 поставляется вместе с гемом `rbs`, который позволяет парсить и обрабатывать определения типов на языке RBS. Вот небольшой пример RBS. @@ -46,7 +46,7 @@ end Рактор -- это абстракция параллельных вычислений, реализующая модель акторов, призванная дать возможность параллельных вычислений без заботы о потоковой безопасности. -Вы можете создать несколько ракторов и запустить их параллельно. Рактор обеспечивает потоковую безопасность параллельных вычислений тем, что не может иметь общих объектов с другики ракторами в обычном понимании. Коммуникация между ракторами обеспечивается передачей сообщений. +Вы можете создать несколько ракторов и запустить их параллельно. Рактор обеспечивает потоковую безопасность параллельных вычислений тем, что не может иметь общих объектов с другими ракторами в обычном понимании. Коммуникация между ракторами обеспечивается передачей сообщений. Рактор синтаксически ограничивает возможность совместного использования объектов (в случае одного Рактора разницы не будет). diff --git a/ru/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md b/ru/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md index fa686e9c17..23e5c54a26 100644 --- a/ru/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md +++ b/ru/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md @@ -89,7 +89,7 @@ TypeProf -- еще пока только экспериментальная ра Рактор -- это абстракция параллельных вычислений, подобная модели акторов, предназначенная обеспечить параллельное выполнение без лишних хлопот о потоковой безопасности. -Вы можете создать несколько ракторов и запустить их параллельно. Рактор обеспечивает потоковую безопасность параллельных вычислений тем, что не может иметь общих объектов с другики ракторами в обычном понимании. Коммуникация между ракторами обеспечивается передачей сообщений. +Вы можете создать несколько ракторов и запустить их параллельно. Рактор обеспечивает потоковую безопасность параллельных вычислений тем, что не может иметь общих объектов с другими ракторами в обычном понимании. Коммуникация между ракторами обеспечивается передачей сообщений. Рактор синтаксически ограничивает возможность совместного использования объектов (в случае одного Рактора разницы не будет). diff --git a/ru/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md b/ru/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md index 7ac8a68dfe..75a9701119 100644 --- a/ru/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md +++ b/ru/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md @@ -89,7 +89,7 @@ TypeProf -- это еще пока только экспериментальна Рактор -- это абстракция параллельных вычислений, подобная модели акторов, предназначенная обеспечить параллельное выполнение без лишних хлопот о потоковой безопасности. -Вы можете создать несколько ракторов и запустить их параллельно. Рактор обеспечивает потоковую безопасность параллельных вычислений тем, что не может иметь общих объектов с другики ракторами в обычном понимании. Коммуникация между ракторами обеспечивается передачей сообщений. +Вы можете создать несколько ракторов и запустить их параллельно. Рактор обеспечивает потоковую безопасность параллельных вычислений тем, что не может иметь общих объектов с другими ракторами в обычном понимании. Коммуникация между ракторами обеспечивается передачей сообщений. Рактор синтаксически ограничивает возможность совместного использования объектов (в случае одного Рактора разницы не будет). diff --git a/ru/news/_posts/2020-12-25-ruby-3-0-0-released.md b/ru/news/_posts/2020-12-25-ruby-3-0-0-released.md index f3bced266f..844b309ef6 100644 --- a/ru/news/_posts/2020-12-25-ruby-3-0-0-released.md +++ b/ru/news/_posts/2020-12-25-ruby-3-0-0-released.md @@ -7,13 +7,13 @@ date: 2020-12-25 00:00:00 +0000 lang: ru --- -Мы рады объявить о выходе Ruby 3.0.0. С 2015 мы упорно работали над Ruby 3, чья цель есть производительность, параллелизм и типизация. Matz собенно подчеркнул производительность: "Ruby3 будет в 3 раза быстре Ruby2" a.k.a. [Ruby 3x3](https://blog.heroku.com/ruby-3-by-3). +Мы рады объявить о выходе Ruby 3.0.0. С 2015 мы упорно работали над Ruby 3, чья цель есть производительность, параллелизм и типизация. Matz особенно подчеркнул производительность: "Ruby3 будет в 3 раза быстрее Ruby2" a.k.a. [Ruby 3x3](https://blog.heroku.com/ruby-3-by-3). {% assign release = site.data.releases | where: "version", "3.0.0" | first %} Optcarrot 3000 frames -С помощью [бенчмарка Optcarrot](https://github.com/mame/optcarrot), который замеряет скорость одного потока на примере эмуляции NES игры, мы достигли трехкратного ускорения производительнности по сравнению с Ruby 2.0!
Замеры производились в окружении, описанном в [benchmark-driver.github.io/hardware.html](https://benchmark-driver.github.io/hardware.html). [Commit 8c510e4095](https://github.com/ruby/ruby/commit/8c510e4095) стал отметкой Ruby 3.0. В вашем окружении или бенчмарке результат может быть не трехкратным.
+С помощью [бенчмарка Optcarrot](https://github.com/mame/optcarrot), который замеряет скорость одного потока на примере эмуляции NES игры, мы достигли трехкратного ускорения производительности по сравнению с Ruby 2.0!
Замеры производились в окружении, описанном в [benchmark-driver.github.io/hardware.html](https://benchmark-driver.github.io/hardware.html). [Commit 8c510e4095](https://github.com/ruby/ruby/commit/8c510e4095) стал отметкой Ruby 3.0. В вашем окружении или бенчмарке результат может быть не трехкратным.
Ruby 3.0.0 включает в себя следующие цели * Производительность @@ -41,13 +41,13 @@ Ruby 3.0.0 включает в себя следующие цели ## Параллелизм -> Сегодня мы живем в мире многоядерности. Параллелизм очень важен. Ractor и Async Fiber сделают Ruby по-настощему языком параллельного программирования. --- Matz +> Сегодня мы живем в мире многоядерности. Параллелизм очень важен. Ractor и Async Fiber сделают Ruby по-настоящему языком параллельного программирования. --- Matz ## Рактор (экспериментально) Рактор -- это абстракция параллельных вычислений, подобная модели акторов, предназначенная обеспечить параллельное выполнение без лишних хлопот о потоковой безопасности. -Вы можете создать несколько ракторов и запустить их параллельно. Рактор обеспечивает потоковую безопасность параллельных вычислений тем, что не может иметь общих объектов с другики ракторами в обычном понимании. Коммуникация между ракторами обеспечивается передачей сообщений. +Вы можете создать несколько ракторов и запустить их параллельно. Рактор обеспечивает потоковую безопасность параллельных вычислений тем, что не может иметь общих объектов с другими ракторами в обычном понимании. Коммуникация между ракторами обеспечивается передачей сообщений. Рактор синтаксически ограничивает возможность совместного использования объектов (в случае одного Рактора разницы не будет). @@ -81,7 +81,7 @@ seq 64.560736 0.001101 64.561837 ( 64.562194) par 66.422010 0.015999 66.438009 ( 16.685797) ``` -Результаты были получены на Ubuntu 20.04, Intel(R) Core(TM) i7-6700 (4 физических ядра, 8 логических ядер). Это показывает, что параллелизированная версия в 3.87 раза быстрее, чем последовательнная. +Результаты были получены на Ubuntu 20.04, Intel(R) Core(TM) i7-6700 (4 физических ядра, 8 логических ядер). Это показывает, что параллелизированная версия в 3.87 раза быстрее, чем последовательная. См. [doc/ractor.md](https://docs.ruby-lang.org/en/3.0.0/doc/ractor_md.html). diff --git a/ru/news/_posts/2021-04-05-ruby-2-6-7-released.md b/ru/news/_posts/2021-04-05-ruby-2-6-7-released.md index ad92acc13b..a3198a30e9 100644 --- a/ru/news/_posts/2021-04-05-ruby-2-6-7-released.md +++ b/ru/news/_posts/2021-04-05-ruby-2-6-7-released.md @@ -21,7 +21,7 @@ lang: ru и Ruby 2.6 входит в фазу поддержки безопасности. Это означает, что мы больше не будем бэкпортировать какие-либо исправления в Ruby 2.6 за исключением исправлений, связанных с безопасностью. Срок фазы поддержки безопасности запланировал на год. -Ruby 2.6 достигает EOL и его официальная поддержка заканчивается вместе с фзоай поддержки безопасности. +Ruby 2.6 достигает EOL и его официальная поддержка заканчивается вместе с фазой поддержки безопасности. Поэтому мы рекомендуем начать планировать обновление до Ruby 2.7 или 3.0. ## Скачать diff --git a/ru/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md b/ru/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md index acc2569300..5a39df3f79 100644 --- a/ru/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md +++ b/ru/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md @@ -16,7 +16,7 @@ lang: ru Эта уязвимость аналогична [CVE-2018-6914](https://www.ruby-lang.org/en/news/2018/03/28/unintentional-file-and-directory-creation-with-directory-traversal-cve-2018-6914/), но предыдущее исправление было не полноценно на Windows. -Все пользователи, использующие уяизвимый релиз, должны немедленно обновиться. +Все пользователи, использующие уязвимый релиз, должны немедленно обновиться. ## Уязвимые версии diff --git a/ru/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md b/ru/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md index 4ab58589cc..1eda567cf6 100644 --- a/ru/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md +++ b/ru/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md @@ -12,7 +12,7 @@ lang: ru ## Подробности -При парсинге и сериализации специальным лбразом подготовленного документа XML гем REXML (включая тот, что поставляется с Ruby) может создать неправильный документ XML, со структурой, отличающейся от оригинального. Последствия во многом зависят от контекста, но это может привести к уязвимости в каких-нибудь программах, которые используют REXML. +При парсинге и сериализации специальным образом подготовленного документа XML гем REXML (включая тот, что поставляется с Ruby) может создать неправильный документ XML, со структурой, отличающейся от оригинального. Последствия во многом зависят от контекста, но это может привести к уязвимости в каких-нибудь программах, которые используют REXML. Пожалуйста, обновите гем REXML до версии 3.2.5 или выше. From 4303a6ba626d419e717f50a5187ee31b6a286b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20T=C3=A1mara=20Pati=C3=B1o?= Date: Mon, 5 Jul 2021 05:14:11 -0500 Subject: [PATCH 0381/1487] Translate OS Command Injection Post (es) (#2658) * Translate OS Command Injection Post (es) * Fixes --- ...2021-05-02-os-command-injection-in-rdoc.md | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 es/news/_posts/2021-05-02-os-command-injection-in-rdoc.md diff --git a/es/news/_posts/2021-05-02-os-command-injection-in-rdoc.md b/es/news/_posts/2021-05-02-os-command-injection-in-rdoc.md new file mode 100644 index 0000000000..f9e4c4b8c4 --- /dev/null +++ b/es/news/_posts/2021-05-02-os-command-injection-in-rdoc.md @@ -0,0 +1,55 @@ +--- +layout: news_post +title: "CVE-2021-31799: Vulnerabilidad de inyección de ordenes en RDoc" +author: "aycabta" +translator: "vtamara" +date: 2021-05-02 09:00:00 +0000 +tags: security +lang: es +--- + +Hay una vulnerabilidad de Inyección de Ordenes en el RDoc que se +distribuye con Ruby. +Se recomienda a todos los usuarios de Ruby que actualicen RDoc a +la versión más reciente que resuelve el problema. + +## Detalles + +Se ha reportado la siguiente vulnerabilidad. + +* [CVE-2021-31799](https://nvd.nist.gov/vuln/detail/CVE-2021-31799) + +RDoc solía llamar `Kernel#open` para abrir un archivo local. +Si un proyecto Ruby tiene un archivo cuyo nombre comience con `|` +y termine con `tags`, la orden que siga al carácter de tubería +será ejecutada. +Un proyecto Ruby malicioso podría explotar esto para ejecutar +ordenes arbitrarías como el usuario que intente ejecutar la orden +`rdoc`. + +Los usuarios de Ruby cuya versión de RDoc sea afectada por esta +situación deben actualizar a la versión más reciente de RDoc. + +## Versiones afectadas + +* Todas las versiones de RDoc desde la 3.11 hasta la 6.3.0 + +## Cómo actualizar + +Para corregir la vulnerabilidad ejecute la siguiente orden que +actualizará RDoc a la última versión (6.3.1 o más reciente) + +``` +gem install rdoc +``` + +Si usa bundler, por favor añada `gem "rdoc", ">= 6.3.1"` a su Gemfile. + +## Creditos + +Agradecemos a [Alexandr Savca](https://hackerone.com/chinarulezzz) +por reportar el problema. + +## Historia + +* Publicado originalmente el 2021-05-02 09:00:00 UTC From 95f29027422992984c315f8d6e10350dedb54478 Mon Sep 17 00:00:00 2001 From: scivola <294125+scivola@users.noreply.github.com> Date: Tue, 6 Jul 2021 20:08:13 +0900 Subject: [PATCH 0382/1487] fix typo --- ja/about/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ja/about/index.md b/ja/about/index.md index a59126f493..8664989eec 100644 --- a/ja/about/index.md +++ b/ja/about/index.md @@ -34,7 +34,7 @@ Matzはよく、「Rubyをシンプルなものではなく、自然なものに 最近ではそういった大きな場所での流量は低下しているものの、 たくさんの小さなグループに分かれて、さまざまな会話がされています。 -[TOIBE指標][tiobe]のような、人気や成長の度合いからプログラミング言語を測る指標のほとんどで、 +[TIOBE指標][tiobe]のような、人気や成長の度合いからプログラミング言語を測る指標のほとんどで、 Rubyはトップ10内にランクインしています。 こうした成長は、Rubyで書かれたソフトウェア、 とりわけWebアプリケーションフレームワーク[Ruby on Rails][ror]の人気に起因しています。 From 84e499e0da72e80ded51f0622e977269bf4a1d49 Mon Sep 17 00:00:00 2001 From: scivola <294125+scivola@users.noreply.github.com> Date: Wed, 7 Jul 2021 07:40:36 +0900 Subject: [PATCH 0383/1487] fix mistranslation --- ja/about/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ja/about/index.md b/ja/about/index.md index 8664989eec..cac2a9882c 100644 --- a/ja/about/index.md +++ b/ja/about/index.md @@ -104,7 +104,7 @@ search_engines = end {% endhighlight %} -上のコードで、ブロックは`do...end`定数の内側に書かれています。 +上のコードで、ブロックは`do...end`の内側に書かれています。 `map`メソッドは定義された単語のリストに与えられたブロックを適用します。 Rubyのメソッドの多くは、メソッドを使用するプログラマーが処理の詳細を埋めれるような独自のブロックをかけるように定義されています。 From 63abd244065a79b1bb254513ffba179c655c6de0 Mon Sep 17 00:00:00 2001 From: "U.Nakamura" Date: Wed, 7 Jul 2021 20:46:53 +0900 Subject: [PATCH 0384/1487] versions --- _data/downloads.yml | 6 ++-- _data/releases.yml | 82 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+), 3 deletions(-) diff --git a/_data/downloads.yml b/_data/downloads.yml index fca303bdb1..addc574b9a 100644 --- a/_data/downloads.yml +++ b/_data/downloads.yml @@ -7,13 +7,13 @@ preview: stable: - - 3.0.1 - - 2.7.3 + - 3.0.2 + - 2.7.2 # optional security_maintenance: - - 2.6.7 + - 2.6.8 # optional eol: diff --git a/_data/releases.yml b/_data/releases.yml index 91c9563e61..2a33bc205c 100644 --- a/_data/releases.yml +++ b/_data/releases.yml @@ -21,6 +21,30 @@ # 3.0 series +- version: 3.0.2 + date: '2021-07-07' + post: "/en/news/2021/07/07/ruby-3-0-2-released/" + url: + gz: https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.2.tar.gz + xz: https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.2.tar.xz + zip: https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.2.zip + size: + gz: 19941179 + xz: 14746080 + zip: 24293508 + sha1: + gz: e00784956ed2083a40e269d8b14e571b8fae9a0f + xz: cd04711ed3adecbe244c3b4391e67430d11fa9f8 + zip: 9cde469fec5c9f8edd1d055fc4a9cc90b9611700 + sha256: + gz: 5085dee0ad9f06996a8acec7ebea4a8735e6fac22f22e2d98c3f2bc3bef7e6f1 + xz: 570e7773100f625599575f363831166d91d49a1ab97d3ab6495af44774155c40 + zip: 79e34f7fab000cb64ede8c39724ae240e36ee5905c752d77ec61a067d5e4e1dd + sha512: + gz: e1fba6f5429b5fca9c3f52a32535615fcf95fafa415efc71c46db4cce159f249112c01574c305026be5c50140335696042e47a74194caea045acbfaa4da738cd + xz: 0f702e2d8ca1342a9d4284dbdd234a3588e057b92566353aa7c21835cf09a3932864b2acf459a976960a1704e9befa562155d36b98b7cda8bd99526e10a374c4 + zip: 2eb1ce4d66b06ccdee835a017c0edd4028fff99a29f4a631ffb5b39289afcb6a88f79eb24cf09e78d2baaa7c3e494448e2701a0a976bb092de6f2929f1934325 + - version: 3.0.1 date: 2021-04-05 post: /en/news/2021/04/05/ruby-3-0-1-released/ @@ -165,6 +189,35 @@ # 2.7 series +- version: 2.7.4 + date: '2021-07-07' + post: "/en/news/2021/07/07/ruby-2-7-4-released/" + url: + bz2: https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.4.tar.bz2 + gz: https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.4.tar.gz + xz: https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.4.tar.xz + zip: https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.4.zip + size: + bz2: 14804934 + gz: 16915699 + xz: 12067588 + zip: 20701195 + sha1: + bz2: f5bdecded2d68e4f2f0ab1d20137e8b4b0614e52 + gz: 86ec4a97bc43370050b5aef8d6ea3ed3938fb344 + xz: 6e044d835f9f432cfa9441241c1ef66e3d607cbf + zip: 32bdd5288dcc1e531832c14d26ff7cd218b55bc3 + sha256: + bz2: bffa8aec9da392eda98f1c561071bb6e71d217d541c617fc6e3282d79f4e7d48 + gz: 3043099089608859fc8cce7f9fdccaa1f53a462457e3838ec3b25a7d609fbc5b + xz: 2a80824e0ad6100826b69b9890bf55cfc4cf2b61a1e1330fccbcb30c46cef8d7 + zip: a4fe29bfc6a8338fe4b017705aa9d3358225ea305359520d4995096a4382034e + sha512: + bz2: f144c32c9cb0006dfcfa7d297f83f88b881f68c94f0130346c74dfd8758583a68d22accfd0fc9f31db304ab5ff0bc135bfb2868145c0dec1ee6cec5ac6c3725d + gz: a317752e9a32c8d1261e67ca89c396722ee779ec8ba4594987812d065b73751f51485a1ede8044aae14b3b16e8d049c6953cef530ae1b82abb135b446c653f8a + xz: 2cbb70ecfdd69120e789023ddb2b25cab0d03bc33fdc367a8f74ca8a3ee785c18c8ded9de3ecee627c7e275ffb85147e6abf921b6a61e31851b37c7fedf45bf9 + zip: 2877b809bafe72cba789add85993a1954008012afcfb5fc4645e482478479bb02166b0d5ee12263983a6c828e6970eb1385632409793dcbc5185d7bbc9c4f349 + - version: 2.7.3 date: 2021-04-05 post: /en/news/2021/04/05/ruby-2-7-3-released/ @@ -411,6 +464,35 @@ # 2.6 series +- version: 2.6.8 + date: '2021-07-07' + post: "/en/news/2021/07/07/ruby-2-6-8-released/" + url: + bz2: https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.8.tar.bz2 + gz: https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.8.tar.gz + xz: https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.8.tar.xz + zip: https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.8.zip + size: + bz2: 14131671 + gz: 16202660 + xz: 11599488 + zip: 19868666 + sha1: + bz2: 7d38cacb6a0779f04b9f19f94406da97e95bbec4 + gz: 949dce34bba3ae93fd302fe705017b03d13b69ab + xz: fa5ad518ef31bbf5c3386dbcec7b57196a1e618e + zip: ece4908dd84c7aaefbe6b188c0aca39eaedb2a77 + sha256: + bz2: dac96ca6df8bab5a6fc7778907f42498037f8ce05b63d20779dce3163e9fafe6 + gz: 1807b78577bc08596a390e8a41aede37b8512190e05c133b17d0501791a8ca6d + xz: 8262e4663169c85787fdc9bfbd04d9eb86eb2a4b56d7f98373a8fcaa18e593eb + zip: d5da2d7e1b9a6b570c66b3bb0cfa2de3ce21d002d2385a1fdf7195e2d0d1d5c7 + sha512: + bz2: 51806d48187dfcce269ff904943dd008df800216ad4797f95481bdeecc2fbac40016bc02eabfff32414839ebb2087511d25eebfd6acead1a1d3813be6c10edf7 + gz: 4f8b8736bdae8bb4b2b63d576232d376b4c87239d25bf7aa807d3eeea704cb8b06f465c37050be79b57a52b9bde65a5cc05679dd6df0f443c8e00a19513f882a + xz: d040ad2238523587d8f356fcb796b8b6ad7f8caff7dd6df09e3f7efcbfa0369e33600e78c7f2bc713ae77c040757cce5c4fec223cb9070209f2bf741899c556d + zip: 143ee01da2cba85a2dcb394b1a64b18a748aeb0eda4d6d2d83638706ce4bb05f60f3e80a0429878f823437e0dfba285f8080637523a552eb04aca87df63831dc + - version: 2.6.7 date: 2021-04-05 post: /en/news/2021/04/05/ruby-2-6-7-released/ From 97412eb97d0ffb23c2e0d4e88c8ac6829266dfac Mon Sep 17 00:00:00 2001 From: "U.Nakamura" Date: Wed, 7 Jul 2021 21:04:28 +0900 Subject: [PATCH 0385/1487] Add some messages --- en/news/_posts/2021-07-07-ruby-2-6-8-released.md | 7 +++++-- en/news/_posts/2021-07-07-ruby-2-7-4-released.md | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/en/news/_posts/2021-07-07-ruby-2-6-8-released.md b/en/news/_posts/2021-07-07-ruby-2-6-8-released.md index f3c9453290..b41b22697a 100644 --- a/en/news/_posts/2021-07-07-ruby-2-6-8-released.md +++ b/en/news/_posts/2021-07-07-ruby-2-6-8-released.md @@ -15,8 +15,13 @@ Please check the topics below for details. * [CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP]({%link en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) * [CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP]({%link en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) +We ordinally do not fix Ruby 2.6 except security fixes, but this release also includes some regressed bugs and build problem fixes. See the [commit logs](https://github.com/ruby/ruby/compare/v2_6_7...v2_6_8) for details. +Ruby 2.6 is now under the state of the security maintenance phase, until the end of March of 2022. +After that date, maintenance of Ruby 2.6 will be ended. +We recommend you start planning the migration to newer versions of Ruby, such as 3.0 or 2.7. + ## Download {% assign release = site.data.releases | where: "version", "2.6.8" | first %} @@ -53,5 +58,3 @@ See the [commit logs](https://github.com/ruby/ruby/compare/v2_6_7...v2_6_8) for Many committers, developers, and users who provided bug reports helped us make this release. Thanks for their contributions. - -The maintenance of Ruby 2.6, including this release, is based on the "Agreement for the Ruby stable version" of the Ruby Association. diff --git a/en/news/_posts/2021-07-07-ruby-2-7-4-released.md b/en/news/_posts/2021-07-07-ruby-2-7-4-released.md index 48adea46e8..2903e05a9f 100644 --- a/en/news/_posts/2021-07-07-ruby-2-7-4-released.md +++ b/en/news/_posts/2021-07-07-ruby-2-7-4-released.md @@ -53,3 +53,5 @@ See the [commit logs](https://github.com/ruby/ruby/compare/v2_7_3...v2_7_4) for Many committers, developers, and users who provided bug reports helped us make this release. Thanks for their contributions. + +The maintenance of Ruby 2.6, including this release, is based on the "Agreement for the Ruby stable version" of the Ruby Association. From 1518032bc78df702440ddb1bd15427e7bde3186e Mon Sep 17 00:00:00 2001 From: "U.Nakamura" Date: Wed, 7 Jul 2021 21:07:35 +0900 Subject: [PATCH 0386/1487] Fix typo --- en/news/_posts/2021-07-07-ruby-2-7-4-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/news/_posts/2021-07-07-ruby-2-7-4-released.md b/en/news/_posts/2021-07-07-ruby-2-7-4-released.md index 2903e05a9f..c9c72e4a91 100644 --- a/en/news/_posts/2021-07-07-ruby-2-7-4-released.md +++ b/en/news/_posts/2021-07-07-ruby-2-7-4-released.md @@ -54,4 +54,4 @@ See the [commit logs](https://github.com/ruby/ruby/compare/v2_7_3...v2_7_4) for Many committers, developers, and users who provided bug reports helped us make this release. Thanks for their contributions. -The maintenance of Ruby 2.6, including this release, is based on the "Agreement for the Ruby stable version" of the Ruby Association. +The maintenance of Ruby 2.7, including this release, is based on the "Agreement for the Ruby stable version" of the Ruby Association. From ec4cb5f21a45a5232dc39cb1a25d2c32eae9c704 Mon Sep 17 00:00:00 2001 From: "U.Nakamura" Date: Wed, 7 Jul 2021 22:25:36 +0900 Subject: [PATCH 0387/1487] Mention about fixing CVE-2021-31799 --- en/news/_posts/2021-07-07-ruby-2-6-8-released.md | 1 + en/news/_posts/2021-07-07-ruby-2-7-4-released.md | 1 + en/news/_posts/2021-07-07-ruby-3-0-2-released.md | 1 + 3 files changed, 3 insertions(+) diff --git a/en/news/_posts/2021-07-07-ruby-2-6-8-released.md b/en/news/_posts/2021-07-07-ruby-2-6-8-released.md index b41b22697a..d47b142fd3 100644 --- a/en/news/_posts/2021-07-07-ruby-2-6-8-released.md +++ b/en/news/_posts/2021-07-07-ruby-2-6-8-released.md @@ -14,6 +14,7 @@ Please check the topics below for details. * [CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP]({%link en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) * [CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP]({%link en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) +* [CVE-2021-31799: A command injection vulnerability in RDoc](%link en/news/2021/05/02/os-command-injection-in-rdoc/ %}) We ordinally do not fix Ruby 2.6 except security fixes, but this release also includes some regressed bugs and build problem fixes. See the [commit logs](https://github.com/ruby/ruby/compare/v2_6_7...v2_6_8) for details. diff --git a/en/news/_posts/2021-07-07-ruby-2-7-4-released.md b/en/news/_posts/2021-07-07-ruby-2-7-4-released.md index c9c72e4a91..82a9ff98c7 100644 --- a/en/news/_posts/2021-07-07-ruby-2-7-4-released.md +++ b/en/news/_posts/2021-07-07-ruby-2-7-4-released.md @@ -14,6 +14,7 @@ Please check the topics below for details. * [CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP]({%link en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) * [CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP]({%link en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) +* [CVE-2021-31799: A command injection vulnerability in RDoc](%link en/news/2021/05/02/os-command-injection-in-rdoc/ %}) See the [commit logs](https://github.com/ruby/ruby/compare/v2_7_3...v2_7_4) for details. diff --git a/en/news/_posts/2021-07-07-ruby-3-0-2-released.md b/en/news/_posts/2021-07-07-ruby-3-0-2-released.md index 6a0845b033..7819044e21 100644 --- a/en/news/_posts/2021-07-07-ruby-3-0-2-released.md +++ b/en/news/_posts/2021-07-07-ruby-3-0-2-released.md @@ -14,6 +14,7 @@ Please check the topics below for details. * [CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP]({%link en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) * [CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP]({%link en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) +* [CVE-2021-31799: A command injection vulnerability in RDoc](%link en/news/2021/05/02/os-command-injection-in-rdoc/ %}) See the [commit logs](https://github.com/ruby/ruby/compare/v3_0_1...v3_0_2) for details. From fae920f61aafd05fc4c7810a95924dd15249dc8e Mon Sep 17 00:00:00 2001 From: "U.Nakamura" Date: Wed, 7 Jul 2021 22:26:01 +0900 Subject: [PATCH 0388/1487] Japanese translations about recent releases --- .../_posts/2021-07-07-ruby-2-6-8-released.md | 61 +++++++++++++++++++ .../_posts/2021-07-07-ruby-2-7-4-released.md | 57 +++++++++++++++++ .../_posts/2021-07-07-ruby-3-0-2-released.md | 48 +++++++++++++++ 3 files changed, 166 insertions(+) create mode 100644 ja/news/_posts/2021-07-07-ruby-2-6-8-released.md create mode 100644 ja/news/_posts/2021-07-07-ruby-2-7-4-released.md create mode 100644 ja/news/_posts/2021-07-07-ruby-3-0-2-released.md diff --git a/ja/news/_posts/2021-07-07-ruby-2-6-8-released.md b/ja/news/_posts/2021-07-07-ruby-2-6-8-released.md new file mode 100644 index 0000000000..6a81f6fc67 --- /dev/null +++ b/ja/news/_posts/2021-07-07-ruby-2-6-8-released.md @@ -0,0 +1,61 @@ +--- +layout: news_post +title: "Ruby 2.6.8 リリース" +author: "usa" +translator: +date: 2021-07-07 09:00:00 +0000 +lang: ja +--- + +Ruby 2.6.8 がリリースされました。 + +このリリースでは以下の脆弱性修正が含まれています。 +詳しくは以下の記事などを参照してください。 + +* [CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP]({%link en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) +* [CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP]({%link en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) +* [CVE-2021-31799: RDoc におけるコマンドインジェクションの脆弱性について](%link ja/news/2021/05/02/os-command-injection-in-rdoc/ %}) + +通常、Ruby 2.6 には脆弱性修正以外の修正は行いませんが、今回のリリースでは、いくつかのリグレッションバグおよびビルド時の問題に対する修正が含まれています。 +詳しくは [commit log](https://github.com/ruby/ruby/compare/v2_6_7...v2_6_8) を参照してください。 + +Ruby 2.6 系列は、現在、セキュリティメンテナンスフェーズにあります。 +このフェーズ中は、重大なセキュリティ上の問題への対応のみが行われます。 +現在の予定では、2022 年 3 月末頃を目処に、2.6 系列のセキュリティメンテナンスならびに公式サポートは終了する見込みです。 +現在、2.6 系列を利用しているユーザーの皆さんは、なるべく早く、3.0 系列等のより新しいバージョン系列の Ruby への移行を検討されるよう、お勧めします。 + +## ダウンロード + +{% assign release = site.data.releases | where: "version", "2.6.8" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## リリースコメント + +このリリースに協力してくださった皆様、特に、脆弱性を報告してくださった方々に深く感謝します。 diff --git a/ja/news/_posts/2021-07-07-ruby-2-7-4-released.md b/ja/news/_posts/2021-07-07-ruby-2-7-4-released.md new file mode 100644 index 0000000000..b3e790359b --- /dev/null +++ b/ja/news/_posts/2021-07-07-ruby-2-7-4-released.md @@ -0,0 +1,57 @@ +--- +layout: news_post +title: "Ruby 2.7.4 リリース" +author: "usa" +translator: +date: 2021-07-07 09:00:00 +0000 +lang: ja +--- + +Ruby 2.7.4 がリリースされました。 + +このリリースでは以下の脆弱性修正が含まれています。 +詳しくは以下の記事などを参照してください。 + +* [CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP]({%link en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) +* [CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP]({%link en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) +* [CVE-2021-31799: RDoc におけるコマンドインジェクションの脆弱性について](%link ja/news/2021/05/02/os-command-injection-in-rdoc/ %}) + +その他の変更については [commit log](https://github.com/ruby/ruby/compare/v2_7_3...v2_7_4) を参照してください。 + +## ダウンロード + +{% assign release = site.data.releases | where: "version", "2.7.4" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## リリースコメント + +Ruby 開発者の皆様、バグや脆弱性を報告してくれたユーザーの皆様のご協力により本リリースは行われています。 皆様のご協力に感謝します。 + +本リリースを含む Ruby 2.7 のメンテナンスは Ruby アソシエーションの「Ruby 安定版保守事業」に基づき行われています。 diff --git a/ja/news/_posts/2021-07-07-ruby-3-0-2-released.md b/ja/news/_posts/2021-07-07-ruby-3-0-2-released.md new file mode 100644 index 0000000000..ec5b71f9c9 --- /dev/null +++ b/ja/news/_posts/2021-07-07-ruby-3-0-2-released.md @@ -0,0 +1,48 @@ +--- +layout: news_post +title: "Ruby 3.0.2 リリース" +author: "nagachika" +translator: "usa" +date: 2021-07-07 09:00:00 +0000 +lang: ja +--- + +Ruby 3.0.1 がリリースされました。 + +このリリースでは以下の脆弱性修正が含まれています。 +詳しくは以下の記事などを参照してください。 + +* [CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP]({%link en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) +* [CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP]({%link en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) +* [CVE-2021-31799: RDoc におけるコマンドインジェクションの脆弱性について](%link ja/news/2021/05/02/os-command-injection-in-rdoc/ %}) + +その他の変更については [commit log](https://github.com/ruby/ruby/compare/v3_0_1...v3_0_2) を参照してください。 + +## ダウンロード + +{% assign release = site.data.releases | where: "version", "3.0.2" | first %} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## リリースコメント + +このリリースにあたり、多くのコミッター、開発者、バグ報告をしてくれたユーザーの皆様に感謝を申し上げます。 From 82914f1533d96aaf52cfd32c185231bdaa16e699 Mon Sep 17 00:00:00 2001 From: "U.Nakamura" Date: Wed, 7 Jul 2021 23:42:42 +0900 Subject: [PATCH 0389/1487] Fix paths --- en/news/_posts/2021-07-07-ruby-2-6-8-released.md | 2 +- en/news/_posts/2021-07-07-ruby-2-7-4-released.md | 2 +- en/news/_posts/2021-07-07-ruby-3-0-2-released.md | 2 +- ja/news/_posts/2021-07-07-ruby-2-6-8-released.md | 2 +- ja/news/_posts/2021-07-07-ruby-2-7-4-released.md | 2 +- ja/news/_posts/2021-07-07-ruby-3-0-2-released.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/en/news/_posts/2021-07-07-ruby-2-6-8-released.md b/en/news/_posts/2021-07-07-ruby-2-6-8-released.md index d47b142fd3..7d065684aa 100644 --- a/en/news/_posts/2021-07-07-ruby-2-6-8-released.md +++ b/en/news/_posts/2021-07-07-ruby-2-6-8-released.md @@ -14,7 +14,7 @@ Please check the topics below for details. * [CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP]({%link en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) * [CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP]({%link en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) -* [CVE-2021-31799: A command injection vulnerability in RDoc](%link en/news/2021/05/02/os-command-injection-in-rdoc/ %}) +* [CVE-2021-31799: A command injection vulnerability in RDoc](%link en/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) We ordinally do not fix Ruby 2.6 except security fixes, but this release also includes some regressed bugs and build problem fixes. See the [commit logs](https://github.com/ruby/ruby/compare/v2_6_7...v2_6_8) for details. diff --git a/en/news/_posts/2021-07-07-ruby-2-7-4-released.md b/en/news/_posts/2021-07-07-ruby-2-7-4-released.md index 82a9ff98c7..1f50e84a4f 100644 --- a/en/news/_posts/2021-07-07-ruby-2-7-4-released.md +++ b/en/news/_posts/2021-07-07-ruby-2-7-4-released.md @@ -14,7 +14,7 @@ Please check the topics below for details. * [CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP]({%link en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) * [CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP]({%link en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) -* [CVE-2021-31799: A command injection vulnerability in RDoc](%link en/news/2021/05/02/os-command-injection-in-rdoc/ %}) +* [CVE-2021-31799: A command injection vulnerability in RDoc](%link en/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) See the [commit logs](https://github.com/ruby/ruby/compare/v2_7_3...v2_7_4) for details. diff --git a/en/news/_posts/2021-07-07-ruby-3-0-2-released.md b/en/news/_posts/2021-07-07-ruby-3-0-2-released.md index 7819044e21..362bb73747 100644 --- a/en/news/_posts/2021-07-07-ruby-3-0-2-released.md +++ b/en/news/_posts/2021-07-07-ruby-3-0-2-released.md @@ -14,7 +14,7 @@ Please check the topics below for details. * [CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP]({%link en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) * [CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP]({%link en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) -* [CVE-2021-31799: A command injection vulnerability in RDoc](%link en/news/2021/05/02/os-command-injection-in-rdoc/ %}) +* [CVE-2021-31799: A command injection vulnerability in RDoc](%link en/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) See the [commit logs](https://github.com/ruby/ruby/compare/v3_0_1...v3_0_2) for details. diff --git a/ja/news/_posts/2021-07-07-ruby-2-6-8-released.md b/ja/news/_posts/2021-07-07-ruby-2-6-8-released.md index 6a81f6fc67..bbc2e14746 100644 --- a/ja/news/_posts/2021-07-07-ruby-2-6-8-released.md +++ b/ja/news/_posts/2021-07-07-ruby-2-6-8-released.md @@ -14,7 +14,7 @@ Ruby 2.6.8 がリリースされました。 * [CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP]({%link en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) * [CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP]({%link en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) -* [CVE-2021-31799: RDoc におけるコマンドインジェクションの脆弱性について](%link ja/news/2021/05/02/os-command-injection-in-rdoc/ %}) +* [CVE-2021-31799: RDoc におけるコマンドインジェクションの脆弱性について](%link ja/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) 通常、Ruby 2.6 には脆弱性修正以外の修正は行いませんが、今回のリリースでは、いくつかのリグレッションバグおよびビルド時の問題に対する修正が含まれています。 詳しくは [commit log](https://github.com/ruby/ruby/compare/v2_6_7...v2_6_8) を参照してください。 diff --git a/ja/news/_posts/2021-07-07-ruby-2-7-4-released.md b/ja/news/_posts/2021-07-07-ruby-2-7-4-released.md index b3e790359b..760f2f0e7d 100644 --- a/ja/news/_posts/2021-07-07-ruby-2-7-4-released.md +++ b/ja/news/_posts/2021-07-07-ruby-2-7-4-released.md @@ -14,7 +14,7 @@ Ruby 2.7.4 がリリースされました。 * [CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP]({%link en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) * [CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP]({%link en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) -* [CVE-2021-31799: RDoc におけるコマンドインジェクションの脆弱性について](%link ja/news/2021/05/02/os-command-injection-in-rdoc/ %}) +* [CVE-2021-31799: RDoc におけるコマンドインジェクションの脆弱性について](%link ja/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) その他の変更については [commit log](https://github.com/ruby/ruby/compare/v2_7_3...v2_7_4) を参照してください。 diff --git a/ja/news/_posts/2021-07-07-ruby-3-0-2-released.md b/ja/news/_posts/2021-07-07-ruby-3-0-2-released.md index ec5b71f9c9..93a667f1d7 100644 --- a/ja/news/_posts/2021-07-07-ruby-3-0-2-released.md +++ b/ja/news/_posts/2021-07-07-ruby-3-0-2-released.md @@ -14,7 +14,7 @@ Ruby 3.0.1 がリリースされました。 * [CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP]({%link en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) * [CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP]({%link en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) -* [CVE-2021-31799: RDoc におけるコマンドインジェクションの脆弱性について](%link ja/news/2021/05/02/os-command-injection-in-rdoc/ %}) +* [CVE-2021-31799: RDoc におけるコマンドインジェクションの脆弱性について](%link ja/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) その他の変更については [commit log](https://github.com/ruby/ruby/compare/v3_0_1...v3_0_2) を参照してください。 From 566fdbd7286f5d6dcb02b5825323a84c0ce1e6e3 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Wed, 7 Jul 2021 23:53:51 +0900 Subject: [PATCH 0390/1487] Fix broken link tags of #2669 --- en/news/_posts/2021-07-07-ruby-2-6-8-released.md | 2 +- en/news/_posts/2021-07-07-ruby-2-7-4-released.md | 2 +- en/news/_posts/2021-07-07-ruby-3-0-2-released.md | 2 +- ja/news/_posts/2021-07-07-ruby-2-6-8-released.md | 2 +- ja/news/_posts/2021-07-07-ruby-2-7-4-released.md | 2 +- ja/news/_posts/2021-07-07-ruby-3-0-2-released.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/en/news/_posts/2021-07-07-ruby-2-6-8-released.md b/en/news/_posts/2021-07-07-ruby-2-6-8-released.md index 7d065684aa..70a0112bfe 100644 --- a/en/news/_posts/2021-07-07-ruby-2-6-8-released.md +++ b/en/news/_posts/2021-07-07-ruby-2-6-8-released.md @@ -14,7 +14,7 @@ Please check the topics below for details. * [CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP]({%link en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) * [CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP]({%link en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) -* [CVE-2021-31799: A command injection vulnerability in RDoc](%link en/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) +* [CVE-2021-31799: A command injection vulnerability in RDoc]({%link en/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) We ordinally do not fix Ruby 2.6 except security fixes, but this release also includes some regressed bugs and build problem fixes. See the [commit logs](https://github.com/ruby/ruby/compare/v2_6_7...v2_6_8) for details. diff --git a/en/news/_posts/2021-07-07-ruby-2-7-4-released.md b/en/news/_posts/2021-07-07-ruby-2-7-4-released.md index 1f50e84a4f..f366000a35 100644 --- a/en/news/_posts/2021-07-07-ruby-2-7-4-released.md +++ b/en/news/_posts/2021-07-07-ruby-2-7-4-released.md @@ -14,7 +14,7 @@ Please check the topics below for details. * [CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP]({%link en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) * [CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP]({%link en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) -* [CVE-2021-31799: A command injection vulnerability in RDoc](%link en/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) +* [CVE-2021-31799: A command injection vulnerability in RDoc]({%link en/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) See the [commit logs](https://github.com/ruby/ruby/compare/v2_7_3...v2_7_4) for details. diff --git a/en/news/_posts/2021-07-07-ruby-3-0-2-released.md b/en/news/_posts/2021-07-07-ruby-3-0-2-released.md index 362bb73747..9e9ae10fd4 100644 --- a/en/news/_posts/2021-07-07-ruby-3-0-2-released.md +++ b/en/news/_posts/2021-07-07-ruby-3-0-2-released.md @@ -14,7 +14,7 @@ Please check the topics below for details. * [CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP]({%link en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) * [CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP]({%link en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) -* [CVE-2021-31799: A command injection vulnerability in RDoc](%link en/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) +* [CVE-2021-31799: A command injection vulnerability in RDoc]({%link en/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) See the [commit logs](https://github.com/ruby/ruby/compare/v3_0_1...v3_0_2) for details. diff --git a/ja/news/_posts/2021-07-07-ruby-2-6-8-released.md b/ja/news/_posts/2021-07-07-ruby-2-6-8-released.md index bbc2e14746..1dd044a465 100644 --- a/ja/news/_posts/2021-07-07-ruby-2-6-8-released.md +++ b/ja/news/_posts/2021-07-07-ruby-2-6-8-released.md @@ -14,7 +14,7 @@ Ruby 2.6.8 がリリースされました。 * [CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP]({%link en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) * [CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP]({%link en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) -* [CVE-2021-31799: RDoc におけるコマンドインジェクションの脆弱性について](%link ja/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) +* [CVE-2021-31799: RDoc におけるコマンドインジェクションの脆弱性について]({%link ja/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) 通常、Ruby 2.6 には脆弱性修正以外の修正は行いませんが、今回のリリースでは、いくつかのリグレッションバグおよびビルド時の問題に対する修正が含まれています。 詳しくは [commit log](https://github.com/ruby/ruby/compare/v2_6_7...v2_6_8) を参照してください。 diff --git a/ja/news/_posts/2021-07-07-ruby-2-7-4-released.md b/ja/news/_posts/2021-07-07-ruby-2-7-4-released.md index 760f2f0e7d..71749f8408 100644 --- a/ja/news/_posts/2021-07-07-ruby-2-7-4-released.md +++ b/ja/news/_posts/2021-07-07-ruby-2-7-4-released.md @@ -14,7 +14,7 @@ Ruby 2.7.4 がリリースされました。 * [CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP]({%link en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) * [CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP]({%link en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) -* [CVE-2021-31799: RDoc におけるコマンドインジェクションの脆弱性について](%link ja/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) +* [CVE-2021-31799: RDoc におけるコマンドインジェクションの脆弱性について]({%link ja/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) その他の変更については [commit log](https://github.com/ruby/ruby/compare/v2_7_3...v2_7_4) を参照してください。 diff --git a/ja/news/_posts/2021-07-07-ruby-3-0-2-released.md b/ja/news/_posts/2021-07-07-ruby-3-0-2-released.md index 93a667f1d7..80503b84f4 100644 --- a/ja/news/_posts/2021-07-07-ruby-3-0-2-released.md +++ b/ja/news/_posts/2021-07-07-ruby-3-0-2-released.md @@ -14,7 +14,7 @@ Ruby 3.0.1 がリリースされました。 * [CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP]({%link en/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) * [CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP]({%link en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) -* [CVE-2021-31799: RDoc におけるコマンドインジェクションの脆弱性について](%link ja/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) +* [CVE-2021-31799: RDoc におけるコマンドインジェクションの脆弱性について]({%link ja/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) その他の変更については [commit log](https://github.com/ruby/ruby/compare/v3_0_1...v3_0_2) を参照してください。 From b9b7897835bc26f17b86114a9a2471cb31b7772a Mon Sep 17 00:00:00 2001 From: usa Date: Thu, 8 Jul 2021 00:37:36 +0900 Subject: [PATCH 0391/1487] Fix typo sorry... --- ja/news/_posts/2021-07-07-ruby-3-0-2-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ja/news/_posts/2021-07-07-ruby-3-0-2-released.md b/ja/news/_posts/2021-07-07-ruby-3-0-2-released.md index 80503b84f4..a5cf2efad7 100644 --- a/ja/news/_posts/2021-07-07-ruby-3-0-2-released.md +++ b/ja/news/_posts/2021-07-07-ruby-3-0-2-released.md @@ -7,7 +7,7 @@ date: 2021-07-07 09:00:00 +0000 lang: ja --- -Ruby 3.0.1 がリリースされました。 +Ruby 3.0.2 がリリースされました。 このリリースでは以下の脆弱性修正が含まれています。 詳しくは以下の記事などを参照してください。 From f8cb7bc11b334d4d9481144522fd6c8296e1b75c Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Wed, 7 Jul 2021 22:35:05 +0300 Subject: [PATCH 0392/1487] Update stable version on downloads --- _data/downloads.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_data/downloads.yml b/_data/downloads.yml index addc574b9a..f0926cb30d 100644 --- a/_data/downloads.yml +++ b/_data/downloads.yml @@ -8,7 +8,7 @@ preview: stable: - 3.0.2 - - 2.7.2 + - 2.7.4 # optional security_maintenance: From dead8f8af1ed536c7f104f70b42fb86ab2b6c01d Mon Sep 17 00:00:00 2001 From: Sorah Fukumori Date: Thu, 8 Jul 2021 05:20:13 +0900 Subject: [PATCH 0393/1487] CVE-2021-32066 is for Net::IMAP --- en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md b/en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md index 1fbc0ff0af..bdbb3357ba 100644 --- a/en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md +++ b/en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md @@ -8,7 +8,7 @@ tags: security lang: en --- -A StartTLS stripping vulnerability was discovered in Net::FTP. +A StartTLS stripping vulnerability was discovered in Net::IMAP. This vulnerability has been assigned the CVE identifier [CVE-2021-32066](https://nvd.nist.gov/vuln/detail/CVE-2021-32066). We strongly recommend upgrading Ruby. From e6486f590727e2aa7b655941d80557bf148cdb24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20T=C3=A1mara=20Pati=C3=B1o?= Date: Thu, 8 Jul 2021 06:34:14 -0500 Subject: [PATCH 0394/1487] Translation of StartTLS Striping in Net:Imap (es) (#2675) * Translation of StartTLS Striping in Net:Imap (es) * Remove trailing whitespace --- ...21-07-07-starttls-stripping-in-net-imap.md | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 es/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md diff --git a/es/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md b/es/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md new file mode 100644 index 0000000000..1823df767e --- /dev/null +++ b/es/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md @@ -0,0 +1,40 @@ +--- +layout: news_post +title: "CVE-2021-32066: Vulnerabilidad de recortado de StartTLS en Net::IMAP" +author: "shugo" +translator: "vtamara" +date: 2021-07-07 09:00:00 +0000 +tags: security +lang: es +--- + +Se descubrió una vulnerabilidad de recortado de StartTLS en Net::IMAP. +A esta vulnerabilidad se le ha asignado el identificador CVE +[CVE-2021-32066](https://nvd.nist.gov/vuln/detail/CVE-2021-32066). +Recomendamos enfáticamente actualizar Ruby. + +net-imap es una gema predeterminada en Ruby 3.0.1 pero tiene un problema +de empaquetado, así que por favor actualice Ruby completo. + +## Detalles + +Net::IMAP no lanzan una excepción cuando falla StartTLS por una respuesta +desconocida, lo que puede permitir a un atacante intermediario sobrepasar +la proteccíon TLS aprovechando la posición de su red entre el cliente y +el registro para bloquear la orden StartTLS, es decir un +"ataque por recorte de StartTLS." + +## Versiones afectadas + +* Series de Ruby 2.6: 2.6.7 y anteriores +* Series de Ruby 2.7: 2.7.3 y anteriores +* Serires de Ruby 3.0: 3.0.1 y anteriores + +## Creditos + +Agradecimientos a [Alexandr Savca](https://hackerone.com/chinarulezzz) +por reportar este problema. + +## Historia + +* Publicado originalmente el 2021-07-07 09:00:00 UTC From f5258d1362916acc7fb868a6c93cfc1bb0ff0fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20T=C3=A1mara=20Pati=C3=B1o?= Date: Thu, 8 Jul 2021 06:37:19 -0500 Subject: [PATCH 0395/1487] Translate Trusting PASV responses in Net::FTP (es) (#2676) * Translate Trusting PASV responses in Net::FTP (es) * lang --- ...7-07-trusting-pasv-responses-in-net-ftp.md | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 es/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md diff --git a/es/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md b/es/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md new file mode 100644 index 0000000000..22063c9bfa --- /dev/null +++ b/es/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md @@ -0,0 +1,41 @@ +--- +layout: news_post +title: "CVE-2021-31810: Vulnerabilidad por confiar en respuestas FTP PASV en Net::FTP" +author: "shugo" +translator: +date: 2021-07-07 09:00:00 +0000 +tags: security +lang: es +--- + +Se ha descubierto una vulnerabilidad en Net::FTP por confiar en respuestas +FTP PASV. +A eta vulnerabilidad se le ha asignado el identificador CVE +[CVE-2021-31810](https://nvd.nist.gov/vuln/detail/CVE-2021-31810). +Recomendamos enfáticamente actualizar Ruby. + +net-ftp es una gema predeterminada en Ruby 3.0.1 pero tiene un +problema de empaquetamiento, así que por favor actualice Ruby completo. + +## Detalles + +Una servidor FTP malicioso puede usar la respuesta PASV para engañar +a Net::FTP para que se conecte de vuelta a una dirección IP y puerto dados. +Esto potencialmente hace que Net::FTP extraiga información sobre servicios +que de otra manera es privada y que no se publica (e.g. el atacante puede +conducir escaneo de puertos y extraer anuncios de los servicios). + +## Versiones afectadas + +* Series de Ruby 2.6: 2.6.7 y anteriores +* Series de Ruby 2.7: 2.7.3 y anteriores +* Series de Ruby 3.0: 3.0.1 y anteriores + +## Creditos + +Agradecemos a [Alexandr Savca](https://hackerone.com/chinarulezzz) por +reportar este problema. + +## Historia + +* Se publicó originalmente el 2021-07-07 09:00:00 UTC From fae9da580dc25eb6ffcbda38f14d374ffdcae357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20T=C3=A1mara=20Pati=C3=B1o?= Date: Thu, 8 Jul 2021 18:59:59 -0500 Subject: [PATCH 0396/1487] Translate Ruby 2.6.8, 2.7.4 and 3.0.2 (es) (#2674) * Translate Ruby 2.6.8, 2.7.4 and 3.0.2 (es) * No newline at end * links * Links to spanish versions --- .../_posts/2021-07-07-ruby-2-6-8-released.md | 66 +++++++++++++++++++ .../_posts/2021-07-07-ruby-2-7-4-released.md | 60 +++++++++++++++++ .../_posts/2021-07-07-ruby-3-0-2-released.md | 51 ++++++++++++++ 3 files changed, 177 insertions(+) create mode 100644 es/news/_posts/2021-07-07-ruby-2-6-8-released.md create mode 100644 es/news/_posts/2021-07-07-ruby-2-7-4-released.md create mode 100644 es/news/_posts/2021-07-07-ruby-3-0-2-released.md diff --git a/es/news/_posts/2021-07-07-ruby-2-6-8-released.md b/es/news/_posts/2021-07-07-ruby-2-6-8-released.md new file mode 100644 index 0000000000..6d9ce0069f --- /dev/null +++ b/es/news/_posts/2021-07-07-ruby-2-6-8-released.md @@ -0,0 +1,66 @@ +--- +layout: news_post +title: "Publicado Ruby 2.6.8" +author: "usa" +translator: "vtamara" +date: 2021-07-07 09:00:00 +0000 +lang: es +--- + +Ruby 2.6.8 ha sido publicado. + +Esta versión incluye correcciones de seguridad. +Por favor revise detalles en los siguientes tópicos. + +* [CVE-2021-31810: Vulnerabilidad por confiar en respuestas FTP PASV en Net::FTP]({%link es/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) +* [CVE-2021-32066: Vulnerabilidad de recortado de StartTLS en Net::IMAP]({%link es/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) +* [CVE-2021-31799: Vulnerabilidad de inyección de ordenes en RDoc]({%link es/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) + +Comúnmente no corregimos Ruby 2.6 excepto cuando son correcciones de seguridad, +pero esta versión también incluye correcciones a algunas fallas y a problemas +de compilación. +Vea detalles en la [bitácora de contribuciones](https://github.com/ruby/ruby/compare/v2_6_7...v2_6_8). + +Ruby 2.6 ahora está en la fase de mantenimiento de seguridad, hasta el final +de Marzo de 2022. +Tras esa fecha, terminará el mantenimiento de Ruby 2.6. +Recomendamos que empiece a planear la migración a una versión más +reciente de Ruby, tal como 3.0 o 2.7. + +## Descargas + +{% assign release = site.data.releases | where: "version", "2.6.8" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Comentarios de la versión + +Muchos contribuyentes, desarrolladores y usuarios que reportaron fallas +nos ayudaron a hacer esta versión. +Gracias por sus contribuciones. diff --git a/es/news/_posts/2021-07-07-ruby-2-7-4-released.md b/es/news/_posts/2021-07-07-ruby-2-7-4-released.md new file mode 100644 index 0000000000..a9d27ea5db --- /dev/null +++ b/es/news/_posts/2021-07-07-ruby-2-7-4-released.md @@ -0,0 +1,60 @@ +--- +layout: news_post +title: "Publicado Ruby 2.7.4" +author: "usa" +translator: "vtamara" +date: 2021-07-07 09:00:00 +0000 +lang: es +--- + +Ruby 2.7.4 ha sido publicado. + +Esta versión incluye correcciones de seguridad. +Por favor vea detalles en los siguientes tópicos. + +* [CVE-2021-31810: Vulnerabilidad al confiar en respuestas FTP PASV en Net::FTP]({%link es/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) +* [CVE-2021-32066: Vulnerabilidad de recortado de StartTLS en Net::IMAP]({%link es/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) +* [CVE-2021-31799: Vulnerabilidad de inyección de ordenes en RDoc]({%link es/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) + +Vea detalles en la [bitacora de contribuciones](https://github.com/ruby/ruby/compare/v2_7_3...v2_7_4). + +## Descargas + +{% assign release = site.data.releases | where: "version", "2.7.4" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Comentarios de la versión + +Muchos contribuyentes, desarrolladores y usuarios que reportaron fallas +nos ayudaron a hacer esta versión. +Gracias por sus contribuciones. + +El mantenimiento de Ruby 2.7, incluyendo esta versión, se basan en el +"Acuerdo sobre la versión estable de Ruby" de la Asociación Ruby. diff --git a/es/news/_posts/2021-07-07-ruby-3-0-2-released.md b/es/news/_posts/2021-07-07-ruby-3-0-2-released.md new file mode 100644 index 0000000000..57a0ca329b --- /dev/null +++ b/es/news/_posts/2021-07-07-ruby-3-0-2-released.md @@ -0,0 +1,51 @@ +--- +layout: news_post +title: "Publicado Ruby 3.0.2" +author: "nagachika" +translator: "vtamara" +date: 2021-07-07 09:00:00 +0000 +lang: es +--- + +Ruby 3.0.2 ha sido publicado. + +Esta versión incluye correcciones de seguridad. +Por favor vea detalles en los siguientes tópicos. + +* [CVE-2021-31810: Vulnerabilidad al confiar en respuestas FTP PASV en Net::FTP]({%link es/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) +* [CVE-2021-32066: Vulnerabilidad de recortado de StartTLS en Net::IMAP]({%link es/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) +* [CVE-2021-31799: Vulnerabilidad de inyección de ordenes en RDoc]({%link es/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) + +Vea detalles en la [bitacora de contribuciones](https://github.com/ruby/ruby/compare/v3_0_1...v3_0_2). + +## Descargas + +{% assign release = site.data.releases | where: "version", "3.0.2" | first %} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + + +## Comentarios de la versión + +Muchos contribuyentes, desarrolladores y usuarios que reportaron fallas +nos ayudaron a hacer esta versión. +Gracias por sus contribuciones. From 18fde72adf973056783c4d135ff880aa113e45ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20Ar=C4=B1l=C4=B1k?= Date: Mon, 12 Jul 2021 15:50:16 +0300 Subject: [PATCH 0397/1487] Translate new release and vulnerability news (tr) (#2677) --- .../_posts/2021-07-07-ruby-2-6-8-released.md | 61 +++++++++++++++++++ .../_posts/2021-07-07-ruby-2-7-4-released.md | 58 ++++++++++++++++++ .../_posts/2021-07-07-ruby-3-0-2-released.md | 49 +++++++++++++++ ...21-07-07-starttls-stripping-in-net-imap.md | 34 +++++++++++ ...7-07-trusting-pasv-responses-in-net-ftp.md | 35 +++++++++++ 5 files changed, 237 insertions(+) create mode 100644 tr/news/_posts/2021-07-07-ruby-2-6-8-released.md create mode 100644 tr/news/_posts/2021-07-07-ruby-2-7-4-released.md create mode 100644 tr/news/_posts/2021-07-07-ruby-3-0-2-released.md create mode 100644 tr/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md create mode 100644 tr/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md diff --git a/tr/news/_posts/2021-07-07-ruby-2-6-8-released.md b/tr/news/_posts/2021-07-07-ruby-2-6-8-released.md new file mode 100644 index 0000000000..edb9dca1e8 --- /dev/null +++ b/tr/news/_posts/2021-07-07-ruby-2-6-8-released.md @@ -0,0 +1,61 @@ +--- +layout: news_post +title: "Ruby 2.6.8 Yayınlandı" +author: "usa" +translator: "ismailarilik" +date: 2021-07-07 09:00:00 +0000 +lang: tr +--- + +Ruby 2.6.8 yayınlandı. + +Bu yayın güvenlik düzeltmeleri içermektedir. +Ayrıntılar için lütfen aşağıdaki konuları kontrol edin. + +* [CVE-2021-31810: Net::FTP'de FTP PASV yanıtlarına güvenme zaafiyeti]({%link tr/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) +* [CVE-2021-32066: Net::IMAP'te bir StartTLS çıkarma zaafiyeti]({%link tr/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) +* [CVE-2021-31799: RDoc'ta bir komut satırı enjeksiyon zaafiyeti]({%link tr/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) + +Biz normalde Ruby 2.6'ya güvenlik güncellemeleri dışında düzeltmeler göndermiyoruz ancak bu yayın bazı gerilemiş hatalar ve inşa sorunları için de düzeltmeler içermektedir. +Ayrıntılar için lütfen [işleme loglarına](https://github.com/ruby/ruby/compare/v2_6_7...v2_6_8) bakın. + +Ruby 2.6 şu anda güvenlik sürdürmesi aşamasında, 2022 yılının Mart ayı sonuna kadar. +Bu tarihten sonra Ruby 2.6'nın sürdürmesi sona erecek. +2.7 ya da 3.0 gibi daha yeni Ruby sürümlerine göç etmeyi planlamaya başlamanızı öneririz. + +## İndirin + +{% assign release = site.data.releases | where: "version", "2.6.8" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Yayın Yorumu + +Birçok işleyici, geliştirici ve hata bildirileri gönderen kullanıcı bu yayını yapmamızda bize yardım etti. +Katkıları için kendilerine teşekkür ederiz. diff --git a/tr/news/_posts/2021-07-07-ruby-2-7-4-released.md b/tr/news/_posts/2021-07-07-ruby-2-7-4-released.md new file mode 100644 index 0000000000..3e81e81478 --- /dev/null +++ b/tr/news/_posts/2021-07-07-ruby-2-7-4-released.md @@ -0,0 +1,58 @@ +--- +layout: news_post +title: "Ruby 2.7.4 Yayınlandı" +author: "usa" +translator: "ismailarilik" +date: 2021-07-07 09:00:00 +0000 +lang: tr +--- + +Ruby 2.7.4 yayınlandı. + +Bu yayın güvenlik düzeltmeleri içermektedir. +Ayrıntılar için lütfen aşağıdaki konuları kontrol edin. + +* [CVE-2021-31810: Net::FTP'de FTP PASV yanıtlarına güvenme zaafiyeti]({%link tr/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) +* [CVE-2021-32066: Net::IMAP'te bir StartTLS çıkarma zaafiyeti]({%link tr/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) +* [CVE-2021-31799: RDoc'ta bir komut satırı enjeksiyon zaafiyeti]({%link tr/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) + +Ayrıntılar için [işleme kayıtlarına](https://github.com/ruby/ruby/compare/v2_7_3...v2_7_4) bakınız. + +## İndirin + +{% assign release = site.data.releases | where: "version", "2.7.4" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Yayın Yorumu + +Birçok işleyici, geliştirici ve hata bildirileri gönderen kullanıcı bu yayını yapmamızda bize yardım etti. +Katkıları için kendilerine teşekkür ederiz. + +Ruby 2.7'nin sürdürmesi, bu yayın da dahil olmak üzere, Ruby Derneği'nin "Ruby kararlı sürüm anlaşması" temellidir. diff --git a/tr/news/_posts/2021-07-07-ruby-3-0-2-released.md b/tr/news/_posts/2021-07-07-ruby-3-0-2-released.md new file mode 100644 index 0000000000..e381cb7c99 --- /dev/null +++ b/tr/news/_posts/2021-07-07-ruby-3-0-2-released.md @@ -0,0 +1,49 @@ +--- +layout: news_post +title: "Ruby 3.0.2 Yayınlandı" +author: "nagachika" +translator: "ismailarilik" +date: 2021-07-07 09:00:00 +0000 +lang: tr +--- + +Ruby 3.0.2 yayınlandı. + +Bu yayın güvenlik düzeltmeleri içermektedir. +Ayrıntılar için lütfen aşağıdaki konuları kontrol edin. + +* [CVE-2021-31810: Net::FTP'de FTP PASV yanıtlarına güvenme zaafiyeti]({%link tr/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) +* [CVE-2021-32066: Net::IMAP'te bir StartTLS çıkarma zaafiyeti]({%link tr/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) +* [CVE-2021-31799: RDoc'ta bir komut satırı enjeksiyon zaafiyeti]({%link tr/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) + +Ayrıntılar için [işleme kayıtlarına](https://github.com/ruby/ruby/compare/v3_0_1...v3_0_2) bakınız. + +## İndirin + +{% assign release = site.data.releases | where: "version", "3.0.2" | first %} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Yayın Yorumu + +Birçok işleyici, geliştirici ve hata bildirileri gönderen kullanıcı bu yayını yapmamızda bize yardım etti. +Katkıları için kendilerine teşekkür ederiz. diff --git a/tr/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md b/tr/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md new file mode 100644 index 0000000000..bcf0100dcf --- /dev/null +++ b/tr/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md @@ -0,0 +1,34 @@ +--- +layout: news_post +title: "CVE-2021-32066: Net::IMAP'te bir StartTLS çıkarma zaafiyeti" +author: "shugo" +translator: "ismailarilik" +date: 2021-07-07 09:00:00 +0000 +tags: security +lang: tr +--- + +Bir StartTLS çıkarma zaafiyeti Net::IMAP'te keşfedildi. +Bu zaafiyet [CVE-2021-32066](https://nvd.nist.gov/vuln/detail/CVE-2021-32066) CVE belirtecine atanmıştır. +Ruby'yi güncellemenizi şiddetle tavsiye ederiz. + +net-imap, Ruby 3.0.1'de varsayılan bir gem fakat paketleme sorunlarına sahip, yani lütfen Ruby'nin kendisini güncelleyin. + +## Ayrıntılar + +Net::IMAP, StartTLS başarısız olduğunda bir istisna yükseltmemektedir, ki bu durumda ortadaki-adam saldırganları istemci ile kayıt arasındaki konuma kaldıraç uygulayarak StartTLS komutunu bloklayabilir ve TLS korumalarını atlatabilir. +İşte bu "StartTLS çıkarma saldırısı" adını almaktadır. + +## Etkilenen Sürümler + +* Ruby 2.6 serisi: 2.6.7 ve öncesi +* Ruby 2.7 serisi: 2.7.3 ve öncesi +* Ruby 3.0 serisi: 3.0.1 ve öncesi + +## Teşekkürler + +[Alexandr Savca](https://hackerone.com/chinarulezzz)'ya bu zaafiyeti bildirdiği için teşekkür ederiz. + +## Geçmiş + +* İlk olarak 2021-07-07 09:00:00 UTC tarihinde yayınlandı. diff --git a/tr/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md b/tr/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md new file mode 100644 index 0000000000..9cdbf412a8 --- /dev/null +++ b/tr/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md @@ -0,0 +1,35 @@ +--- +layout: news_post +title: "CVE-2021-31810: Net::FTP'de FTP PASV yanıtlarına güvenme zaafiyeti" +author: "shugo" +translator: "ismailarilik" +date: 2021-07-07 09:00:00 +0000 +tags: security +lang: tr +--- + +Net::FTP'de bir FTP PASV yanıtlarına güvenme zaafiyeti keşfedildi. +Bu zaafiyete [CVE-2021-31810](https://nvd.nist.gov/vuln/detail/CVE-2021-31810) CVE belirteci atanmıştır. +Şiddetle Ruby'yi güncellemenizi tavsiye ederiz. + +net-ftp Ruby 3.0.1 ile gelen varsayılan bir gem'dir fakat paketleme sorunlarına sahiptir, yani lütfen Ruby'nin kendisini güncelleyin. + +## Ayrıntılar + +Zararlı bir FTP sunucusu PASV yanıtını, Net::FTP'yi verilen bir IP adresi ve port'a tekrar bağlamak için kullanabilir. +Bu muhtemelen Net::FTP'nin normalde gizli olan bilgileri dışarı çıkarmasını sağlayabilir. +Örneğin; saldırgan port taramaları ve servis afişi çıkarmaları yönetebilir. + +## Etkilenen sürümler + +* Ruby 2.6 serisi: 2.6.7 ve öncesi +* Ruby 2.7 serisi: 2.7.3 ve öncesi +* Ruby 3.0 serisi: 3.0.1 ve öncesi + +## Teşekkürler + +[Alexandr Savca](https://hackerone.com/chinarulezzz)'ya bu zaafiyeti bildirdiği için teşekkür ederiz. + +## Geçmiş + +* İlk olarak 2021-07-07 09:00:00 UTC tarihinde yayınlandı. From c9b2e7fda858fdce14ea79c2ca266803bdc447ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Jul 2021 17:16:28 +0000 Subject: [PATCH 0398/1487] Bump addressable from 2.7.0 to 2.8.0 Bumps [addressable](https://github.com/sporkmonger/addressable) from 2.7.0 to 2.8.0. - [Release notes](https://github.com/sporkmonger/addressable/releases) - [Changelog](https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md) - [Commits](https://github.com/sporkmonger/addressable/compare/addressable-2.7.0...addressable-2.8.0) --- updated-dependencies: - dependency-name: addressable dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index c89cbf52e1..0ba875888c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: - addressable (2.7.0) + addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) colorator (1.1.0) concurrent-ruby (1.1.7) From b37cf8cc8314292e063a56185eaeddefea98a9c3 Mon Sep 17 00:00:00 2001 From: digitalfukuoka Date: Tue, 3 Aug 2021 15:26:47 +0900 Subject: [PATCH 0399/1487] Add Fukuoka Ruby Award 2022. --- .../2021-08-03-fukuoka-ruby-award-2022.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 en/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md diff --git a/en/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md b/en/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md new file mode 100644 index 0000000000..85b73a7d62 --- /dev/null +++ b/en/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md @@ -0,0 +1,32 @@ +--- +layout: news_post +title: "2022 Fukuoka Ruby Award Competition - Entries to be judged by Matz" +author: "Fukuoka Ruby" +translator: +date: 2021-08-03 00:00:00 +0000 +lang: en +--- + +Dear Ruby Enthusiasts, + +The Government of Fukuoka, Japan together with "Matz" Matsumoto would like to invite you to enter the following Ruby competition.If you have developed an interesting Ruby program, please be encouraged to apply. + +2022 Fukuoka Ruby Award Competition - Grand Prize - 1 Million Yen! + +Entry Deadline: December 3, 2021 + +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) + +Matz and a group of panelists will select the winners of the Fukuoka Competition. The grand prize for the Fukuoka Competition is 1 million yen. Past grand prize winners include Rhomobile (USA) and APEC Climate Center (Korea). + +Programs entered in the competition do not have to be written entirely in Ruby but should take advantage of the unique characteristics of Ruby. + +The program must have been developed or updated in the past year or so. Please visit the following Fukuoka website to enter. + +[http://www.digitalfukuoka.jp/events/242](http://www.digitalfukuoka.jp/events/242) + +Please email the application form to award@f-ruby.com + +"Matz will be testing and reviewing your source code thoroughly, so it's very meaningful to apply! The competition is free to enter." + + Thanks! From 04fa479eefbf24c70a710fb3e31384dd9430799b Mon Sep 17 00:00:00 2001 From: Juanito Fatas Date: Tue, 3 Aug 2021 15:44:23 +0900 Subject: [PATCH 0400/1487] Fix typos closes #2682 --- en/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/en/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md b/en/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md index 85b73a7d62..7c9a6a6743 100644 --- a/en/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md +++ b/en/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md @@ -9,7 +9,7 @@ lang: en Dear Ruby Enthusiasts, -The Government of Fukuoka, Japan together with "Matz" Matsumoto would like to invite you to enter the following Ruby competition.If you have developed an interesting Ruby program, please be encouraged to apply. +The Government of Fukuoka, Japan together with "Matz" Matsumoto would like to invite you to enter the following Ruby competition. If you have developed an interesting Ruby program, please be encouraged to apply. 2022 Fukuoka Ruby Award Competition - Grand Prize - 1 Million Yen! @@ -29,4 +29,4 @@ Please email the application form to award@f-ruby.com "Matz will be testing and reviewing your source code thoroughly, so it's very meaningful to apply! The competition is free to enter." - Thanks! +Thanks! From 78dcf451fddd17e489439946721ca3940553a43c Mon Sep 17 00:00:00 2001 From: ismailarilik Date: Tue, 25 May 2021 09:54:17 +0300 Subject: [PATCH 0401/1487] Follow #2654 (tr) --- tr/news/_posts/2021-05-02-os-command-injection-in-rdoc.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tr/news/_posts/2021-05-02-os-command-injection-in-rdoc.md b/tr/news/_posts/2021-05-02-os-command-injection-in-rdoc.md index 93df21c1e6..ce41879cc1 100644 --- a/tr/news/_posts/2021-05-02-os-command-injection-in-rdoc.md +++ b/tr/news/_posts/2021-05-02-os-command-injection-in-rdoc.md @@ -35,6 +35,8 @@ Zaafiyeti düzeltmek amacıyla RDoc'u en son sürüme (6.3.1 ya da sonrası) gü gem install rdoc ``` +Eğer bundler kullanıyorsanız, lütfen `gem "rdoc", ">= 6.3.1"` satırını `Gemfile` dosyanıza ekleyin. + ## Teşekkürler Bu sorunu bildirdiği için [Alexandr Savca](https://hackerone.com/chinarulezzz)'ya teşekkür ederiz. From d0de61842544396845c504524f903cb77963bb7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20Ar=C4=B1l=C4=B1k?= Date: Wed, 4 Aug 2021 09:19:22 +0300 Subject: [PATCH 0402/1487] Translate Fukuoka Ruby Award 2022 (#2682) (tr) --- .../2021-08-03-fukuoka-ruby-award-2022.md | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 tr/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md diff --git a/tr/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md b/tr/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md new file mode 100644 index 0000000000..a3320c58ff --- /dev/null +++ b/tr/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md @@ -0,0 +1,37 @@ +--- +layout: news_post +title: "2022 Fukuoka Ruby Ödül Yarışması - Girişler Matz tarafından yargılanacak" +author: "Fukuoka Ruby" +translator: "İsmail Arılık" +date: 2021-08-03 00:00:00 +0000 +lang: tr +--- + +Sevgili Ruby Hayranları, + +Fukuoka/Japonya Hükümeti, "Matz" ile birlikte sizi aşağıdaki Ruby yarışmasına katılmaya davet ediyor. +Eğer ilginç bir Ruby programı geliştirdiyseniz, lütfen başvurun. + +2022 Fukuoka Ruby Ödül Yarışması - Büyük Ödül - 1 Milyon Yen! + +Son Başvuru Tarihi: 3 Aralık 2021 + +![Fukuoka Ruby Ödülü](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) + +Matz ve bir grup oturum katılımcısı Fukuoka Yarışmasının kazananlarını belirleyecek. +Fukuoka Yarışması için büyük ödül 1 milyon yen'dir. +Önceki büyük ödül sahipleri arasında Rhomobile (ABD) ve APEC İklim Merkezi (Kore) bulunmaktadır. + +Yarışmaya giren programlar tümüyle Ruby ile yazılmak zorunda değildir fakat Ruby'nin eşsiz karakteristiklerinden faydalanmalıdır. + +Projeler, değerlendirmeye alınabilmeleri için, son 12 ayda geliştirilmiş ya da tamamlanmış olmalıdır. +Ek ayrıntılar ya da başvurmak için lütfen aşağıdaki Fukuoka websitesini ziyaret edin: + +[http://www.digitalfukuoka.jp/events/242](http://www.digitalfukuoka.jp/events/242) + +Lütfen başvuru formunu award@f-ruby.com'a gönderin. + +"Matz, kaynak kodunu test edecek ve gözden geçirecek, yani başvurman oldukça anlamlı! +Yarışmaya katılmak ücretsiz." + +Teşekkürler! From 30e68c0c14fdbf13557d21888b64b89dad75c651 Mon Sep 17 00:00:00 2001 From: Victor Maslov Date: Sun, 8 Aug 2021 21:14:03 +0300 Subject: [PATCH 0403/1487] Recent news translation and two corrections in _data/locales (ru) (#2684) * Translated news about CVEs and Fukuoka (ru) * Some corrections in _data/locales/ru.yml (ru) * Translated the CVE news article addition from #2679 (ru) --- _data/locales/ru.yml | 4 +- ...2021-05-02-os-command-injection-in-rdoc.md | 1 + .../_posts/2021-07-07-ruby-2-6-8-released.md | 61 +++++++++++++++++++ .../_posts/2021-07-07-ruby-2-7-4-released.md | 58 ++++++++++++++++++ .../_posts/2021-07-07-ruby-3-0-2-released.md | 49 +++++++++++++++ ...21-07-07-starttls-stripping-in-net-imap.md | 36 +++++++++++ ...7-07-trusting-pasv-responses-in-net-ftp.md | 36 +++++++++++ .../2021-08-03-fukuoka-ruby-award-2022.md | 32 ++++++++++ 8 files changed, 275 insertions(+), 2 deletions(-) create mode 100644 ru/news/_posts/2021-07-07-ruby-2-6-8-released.md create mode 100644 ru/news/_posts/2021-07-07-ruby-2-7-4-released.md create mode 100644 ru/news/_posts/2021-07-07-ruby-3-0-2-released.md create mode 100644 ru/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md create mode 100644 ru/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md create mode 100644 ru/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md diff --git a/_data/locales/ru.yml b/_data/locales/ru.yml index 78930e4a14..e8f23ca88e 100644 --- a/_data/locales/ru.yml +++ b/_data/locales/ru.yml @@ -74,9 +74,9 @@ sidebar: issue_tracking: text: Решение проблем url: https://bugs.ruby-lang.org/ - description: Сообщайте или помогите решить проблемы в Ruby. + description: Сообщайте или помогайте решать проблемы в Ruby. syndicate: - text: Синдикат + text: Подписаться recent_news: text: Последние новости (RSS) url: /ru/feeds/news.rss diff --git a/ru/news/_posts/2021-05-02-os-command-injection-in-rdoc.md b/ru/news/_posts/2021-05-02-os-command-injection-in-rdoc.md index fdc5fd3674..81ac9011ef 100644 --- a/ru/news/_posts/2021-05-02-os-command-injection-in-rdoc.md +++ b/ru/news/_posts/2021-05-02-os-command-injection-in-rdoc.md @@ -42,3 +42,4 @@ gem install rdoc ## История * Изначально опубликовано в 2021-05-02 09:00:00 UTC +* Ruby 3.0.2 (поставляется с RDoc 6.3.1), Ruby 2.7.4 (поставляется с RDoc 6.2.1.1) and Ruby 2.6.8 (поставляется с RDoc 6.1.2.1) уже содержат исправления и потому не подвержены уязвимости diff --git a/ru/news/_posts/2021-07-07-ruby-2-6-8-released.md b/ru/news/_posts/2021-07-07-ruby-2-6-8-released.md new file mode 100644 index 0000000000..7f2a22839c --- /dev/null +++ b/ru/news/_posts/2021-07-07-ruby-2-6-8-released.md @@ -0,0 +1,61 @@ +--- +layout: news_post +title: "Вышел Ruby 2.6.8" +author: "usa" +translator: "nakilon" +date: 2021-07-07 09:00:00 +0000 +lang: ru +--- + +Вышел Ruby 2.6.8. + +Этот релиз включает в себя исправления уязвимостей. +Ознакомьтесь с подробностями ниже. + +* [CVE-2021-31810: Уязвимость доверия к PASV-ответам FTP в Net::FTP]({%link ru/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) +* [CVE-2021-32066: Уязвимость StartTLS stripping в Net::IMAP]({%link ru/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) +* [CVE-2021-31799: Уязвимость внедрения команды в RDoc]({%link ru/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) + +Обычно мы не вносим исправления в Ruby 2.6 за исключением исправлений уязвимости, однако этот релиз также содержит исправления некоторых регрессий и проблем сборки. +См. [коммиты](https://github.com/ruby/ruby/compare/v2_6_7...v2_6_8). + +Ruby 2.6 находится в фазе поддержки безопасности до марта 2022. +После этого поддержка Ruby 2.6 завершится. +Мы рекомендуем начать планировать миграцию на более новые версии Ruby, такие как 3.0 или 2.7. + +## Скачать + +{% assign release = site.data.releases | where: "version", "2.6.8" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Комментарий к релизу + +Многие коммитеры, разработчики и пользователи, кто присылал баг-репорты, помогли нам сделать этот релиз. +Благодарим за этот вклад. diff --git a/ru/news/_posts/2021-07-07-ruby-2-7-4-released.md b/ru/news/_posts/2021-07-07-ruby-2-7-4-released.md new file mode 100644 index 0000000000..a77e007b5c --- /dev/null +++ b/ru/news/_posts/2021-07-07-ruby-2-7-4-released.md @@ -0,0 +1,58 @@ +--- +layout: news_post +title: "Вышел Ruby 2.7.4" +author: "usa" +translator: "nakilon" +date: 2021-07-07 09:00:00 +0000 +lang: ru +--- + +Вышел Ruby 2.7.4. + +Этот релиз включает в себя исправления уязвимостей. +Ознакомьтесь с подробностями ниже. + +* [CVE-2021-31810: Уязвимость доверия к PASV-ответам FTP в Net::FTP]({%link ru/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) +* [CVE-2021-32066: Уязвимость StartTLS stripping в Net::IMAP]({%link ru/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) +* [CVE-2021-31799: Уязвимость внедрения команды в RDoc]({%link ru/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) + +См. [коммиты](https://github.com/ruby/ruby/compare/v2_7_3...v2_7_4). + +## Скачать + +{% assign release = site.data.releases | where: "version", "2.7.4" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Комментарий к релизу + +Многие коммитеры, разработчики и пользователи, кто присылал баг-репорты, помогли нам сделать этот релиз. +Благодарим за этот вклад. + +Поддержка Ruby 2.7, включая этот релиз, основана на "Соглашении о стабильной версии Ruby" Ассоциации Ruby. diff --git a/ru/news/_posts/2021-07-07-ruby-3-0-2-released.md b/ru/news/_posts/2021-07-07-ruby-3-0-2-released.md new file mode 100644 index 0000000000..dc4a025c9d --- /dev/null +++ b/ru/news/_posts/2021-07-07-ruby-3-0-2-released.md @@ -0,0 +1,49 @@ +--- +layout: news_post +title: "Вышел Ruby 3.0.2" +author: "nagachika" +translator: "nakilon" +date: 2021-07-07 09:00:00 +0000 +lang: ru +--- + +Вышел Ruby 3.0.2. + +Этот релиз включает в себя исправления уязвимостей. +Ознакомьтесь с подробностями ниже. + +* [CVE-2021-31810: Уязвимость доверия к PASV-ответам FTP в Net::FTP]({%link ru/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) +* [CVE-2021-32066: Уязвимость StartTLS stripping в Net::IMAP]({%link ru/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) +* [CVE-2021-31799: Уязвимость внедрения команды в RDoc]({%link ru/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) + +См. [коммиты](https://github.com/ruby/ruby/compare/v3_0_1...v3_0_2). + +## Скачать + +{% assign release = site.data.releases | where: "version", "3.0.2" | first %} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Комментарий к релизу + +Многие коммитеры, разработчики и пользователи, кто присылал баг-репорты, помогли нам сделать этот релиз. +Благодарим за этот вклад. diff --git a/ru/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md b/ru/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md new file mode 100644 index 0000000000..1b69125bef --- /dev/null +++ b/ru/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md @@ -0,0 +1,36 @@ +--- +layout: news_post +title: "CVE-2021-32066: Уязвимость StartTLS stripping в Net::IMAP" +author: "shugo" +translator: "nakilon" +date: 2021-07-07 09:00:00 +0000 +tags: security +lang: ru +--- + +В Net::IMAP обнаружена уязвимость StartTLS stripping. +Этой уязвимости присвоен идентификатор [CVE-2021-32066](https://nvd.nist.gov/vuln/detail/CVE-2021-32066). +Мы настоятельно рекомендуем обновить Ruby. + +net-imap является встроенным гемом Ruby 3.0.1, но т.к. есть трудности с его поставкой, следует обновить Ruby целиком. + +## Подробности + +Net::IMAP не генерирует исключение, когда StartTLS +прерывает работу с неизвестным ответом, что позволяет +обходить защиту TLS атакой man-in-the-middle, +блокируя команду StartTLS. Это называется "атака StartTLS". + +## Уязвимые версии + +* Ruby 2.6: 2.6.7 и ниже +* Ruby 2.7: 2.7.3 и ниже +* Ruby 3.0: 3.0.1 и ниже + +## Авторство + +Благодарим [Alexandr Savca](https://hackerone.com/chinarulezzz) за сообщение о проблеме. + +## История + +* Изначально опубликовано в 2021-07-07 09:00:00 UTC diff --git a/ru/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md b/ru/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md new file mode 100644 index 0000000000..807e3a0f07 --- /dev/null +++ b/ru/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md @@ -0,0 +1,36 @@ +--- +layout: news_post +title: "CVE-2021-31810: Уязвимость доверия к PASV-ответам FTP в Net::FTP" +author: "shugo" +translator: "nakilon" +date: 2021-07-07 09:00:00 +0000 +tags: security +lang: ru +--- + +В Net::FTP обнаружена уязвимость доверия к PASV-ответам FTP. +Этой уязвимости присвоен идентификатор [CVE-2021-31810](https://nvd.nist.gov/vuln/detail/CVE-2021-31810). +Мы настоятельно рекомендуем обновить Ruby. + +net-ftp является встроенным гемом Ruby 3.0.1, но т.к. есть трудности с его поставкой, следует обновить Ruby целиком. + +## Подробности + +Вредоносный FTP-сервер может использовать ответ PASV так, что Net::FTP +подключится к заданному IP адресу и порту. Это потенциально +позволяет Net::FTP получать информацию о сервисах, которые иначе +скрыты (например, злоумышленник может сканировать порты и доставать баннеры). + +## Уязвимые версии + +* Ruby 2.6: 2.6.7 и ниже +* Ruby 2.7: 2.7.3 и ниже +* Ruby 3.0: 3.0.1 и ниже + +## Авторство + +Благодарим [Alexandr Savca](https://hackerone.com/chinarulezzz) за сообщение о проблеме. + +## История + +* Изначально опубликовано в 2021-07-07 09:00:00 UTC diff --git a/ru/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md b/ru/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md new file mode 100644 index 0000000000..d30f46c1a5 --- /dev/null +++ b/ru/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md @@ -0,0 +1,32 @@ +--- +layout: news_post +title: "Конкурс на соискание премии Fukuoka Ruby 2022 - судить участников будет Matz" +author: "Fukuoka Ruby" +translator: "nakilon" +date: 2021-08-03 00:00:00 +0000 +lang: ru +--- + +Дорогие Ruby-энтузиасты, + +Правительство Фукуоки, Япония, вместе с "Matz" Мацумото приглашают поучаствовать в конкурсе по Ruby. Если вы разработали интересную программу на Ruby, пожалуйста, примите участие. + +Конкурс на соискание премии Fukuoka Ruby 2022, главный приз - 1 миллион иен! + +Дедлайн подачи заявки: 3 декабря 2021 года. + +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) + +Matz и группа участников дискуссии выберут победителей конкурса. Главный приз соревнования - 1 миллион иен. В числе прошлых обладателей гран-при: Rhomobile (США) и APEC Climate Center (Корея). + +Программы, участвующие в конкурсе, не обязаны быть написаны целиком на Ruby, однако должны использовать уникальные преимущества языка. + +Программа должна быть разработана или разрабатываема в течение прошлого года или около того. Для входа проследуйте на сайт Фукуоки. + +[http://www.digitalfukuoka.jp/events/242](http://www.digitalfukuoka.jp/events/242) + +Заявку отправляйте на адрес award@f-ruby.com + +"Matz будет тщательно тестировать и проверять ваш исходный код, так что это много значит! Принять участие может любой." + +Спасибо! From 2e9a1fd04cb6902af9c3387f985c5500c501f2cb Mon Sep 17 00:00:00 2001 From: Andrea Spadaccini Date: Tue, 7 Sep 2021 15:09:34 +0200 Subject: [PATCH 0404/1487] Mention Windows Package Manager as a way to get Ruby (#2686) (en) * Mention winget as a way to get Ruby on Windows * Update naming to "Windows Package Manager" Co-authored-by: Hiroshi SHIBATA --- en/documentation/installation/index.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/en/documentation/installation/index.md b/en/documentation/installation/index.md index 0aa8dec86c..9d32ab5d1d 100644 --- a/en/documentation/installation/index.md +++ b/en/documentation/installation/index.md @@ -46,6 +46,7 @@ Here are available installation methods: * [FreeBSD](#freebsd) * [OpenBSD](#openbsd) * [OpenIndiana](#openindiana) + * [Windows Package Manager](#winget) * [Other Distributions](#other-systems) * [Installers](#installers) * [ruby-build](#ruby-build) @@ -217,6 +218,15 @@ $ pkg install runtime/ruby However, the third-party tools might be a good way to obtain the latest version of Ruby. +### Windows Package Manager +{: #winget} + +On Windows, you can use the [Windows Package Manager CLI](https://github.com/microsoft/winget-cli) +to install Ruby: + +{% highlight sh %} +> winget install Ruby +{% endhighlight %} ### Other Distributions {: #other-systems} From ae8774e43432568b91c61359eef20cc981b7b7ba Mon Sep 17 00:00:00 2001 From: ismailarilik Date: Wed, 8 Sep 2021 08:25:46 +0300 Subject: [PATCH 0405/1487] Follow #2686 (tr) --- tr/documentation/installation/index.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tr/documentation/installation/index.md b/tr/documentation/installation/index.md index 1d137ca41c..cda9369ac7 100644 --- a/tr/documentation/installation/index.md +++ b/tr/documentation/installation/index.md @@ -46,6 +46,7 @@ sistemde var olan kurulum yöntemlerinden herhangi birini kullanmak için * [FreeBSD](#freebsd) * [OpenBSD](#openbsd) * [OpenIndiana](#openindiana) + * [Windows Package Manager](#winget) * [Diğer Dağıtımlar](#other-systems) * [Kurucular](#installers) * [ruby-build](#ruby-build) @@ -211,6 +212,14 @@ $ pkg install runtime/ruby Fakat üçüncü taraf araçlar, Ruby'nin en son sürümünü elde etmek için iyi bir yol olabilir. +### Windows Paket Yöneticisi +{: #winget} + +Windows'ta Ruby'yi kurmak için [Windows Paket Yöneticisi CLI](https://github.com/microsoft/winget-cli)'ını kullanabilirsiniz: + +{% highlight sh %} +> winget install Ruby +{% endhighlight %} ### Diğer Dağıtımlar {: #other-systems} From b9acfeb5f36cbc69cb818e562585005cfccb1b86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20T=C3=A1mara=20Pati=C3=B1o?= Date: Sat, 11 Sep 2021 21:02:10 -0500 Subject: [PATCH 0406/1487] Translation of Fukuoka Ruby Award 2022 (es) (#2685) Co-authored-by: Nombre Usuario --- .../2021-08-03-fukuoka-ruby-award-2022.md | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 es/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md diff --git a/es/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md b/es/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md new file mode 100644 index 0000000000..30e78531b4 --- /dev/null +++ b/es/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md @@ -0,0 +1,46 @@ +--- +layout: news_post +title: "Concurso Galardón Ruby Fukuoka 2022 - Los programas participantes serán +juzgados por Matz" +author: "Fukuoka Ruby" +translator: vtamara +date: 2021-08-03 00:00:00 +0000 +lang: es +--- + + +Estimado entusiasta Ruby + +El Gobierno de Fukuoka, Japón junto con "Matz" Matsumoto quisieran invitarlo +a participar en el siguiente concurso de Ruby. Si ha desarrollado un +programa en Ruby interesante, por favor anímese a aplicar. + +Concurso Galardón Ruby Fukuoka 2020 - Premio Mayor - 1 Millón de Yenes! + +Fecha límite: 3 de diciembre de 2021 + +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) + + +Matz y un grupo de panelistas seleccionarán los ganadores del Concurso +Fukuoka. El premio mayor del Concurso Fukuoka es de 1 millón de yenes. +Los ganadores del premio mayor en versiones anteriores incluyen a +Rhomobile (USA) y Centro de Clima APEC (Korea). + +Los programas que ingresen al concurso no tienen que estar escritos +enteramente en Ruby, pero deben aprovechar las características únicas de Ruby. + +Los programas deben haber sido desarrollados o actualizados en el último +año. Por favor visite el siguiente sitio web de Fukuoka para ingresar: + +[http://www.digitalfukuoka.jp/events/242](http://www.digitalfukuoka.jp/events/242) + +Por favor envie por correo electrónico el formulario de aplicación a +award@f-ruby.com + + +"¡Matz estará probando y revisando su código fuente, así que aplicar es +muy significativo! El ingreso al concurso es gratuito." + + +Gracias! From 2477c3de174fe555157479fe1ddfadc857a5efc2 Mon Sep 17 00:00:00 2001 From: twlixin Date: Fri, 10 Sep 2021 00:29:48 +0900 Subject: [PATCH 0407/1487] Translation for 2021-04-05-ruby-2-5-9-released.md (zh_tw) Closes #2688 --- .../_posts/2021-04-05-ruby-2-5-9-released.md | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 zh_tw/news/_posts/2021-04-05-ruby-2-5-9-released.md diff --git a/zh_tw/news/_posts/2021-04-05-ruby-2-5-9-released.md b/zh_tw/news/_posts/2021-04-05-ruby-2-5-9-released.md new file mode 100644 index 0000000000..63f6dfe3b3 --- /dev/null +++ b/zh_tw/news/_posts/2021-04-05-ruby-2-5-9-released.md @@ -0,0 +1,60 @@ +--- +layout: news_post +title: "Ruby 2.5.9 發佈" +author: "usa" +translator: "twlixin" +date: 2021-04-05 12:00:00 +0000 +lang: zh_tw +--- + +Ruby 2.5.9 發佈了。 + +這個版本包含以下的脆弱性修正。 +請參照以下的詳細記事。 + +* [CVE-2020-25613: Potential HTTP Request Smuggling Vulnerability in WEBrick]({%link en/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md %}) +* [CVE-2021-28965: XML round-trip vulnerability in REXML]({% link en/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md %}) + +另外、配合Ruby的特性,包含了若干変更。 +変更的詳細請參照 [commit logs](https://github.com/ruby/ruby/compare/v2_5_8...v2_5_9)。 + +隨著這個版本的發佈,Ruby 2.5 系列進入了終了階段(EOL)。 +這意味著,Ruby 2.5.9 將成為 Ruby 2.5 系列的最後版本。 +以後,即使新脆弱性被發現,Ruby 2.5.10 之類的版本也不會被發佈。 +我們鼓勵各用戶盡快遷移到更新的版本,例如 3.0、2.7 和 2.6。 + +## 下載 + +{% assign release = site.data.releases | where: "version", "2.5.9" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## 版本發佈的註記 + +我們要感謝所有對此版本提供協力的人,尤其對於報告漏洞的人致上特別感謝之意。 From 6871d9ad0f956ce4cfea8c3b212d00633a68581c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Sep 2021 20:22:15 +0000 Subject: [PATCH 0408/1487] Bump nokogiri from 1.11.4 to 1.12.5 Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.4 to 1.12.5. - [Release notes](https://github.com/sparklemotion/nokogiri/releases) - [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md) - [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.4...v1.12.5) --- updated-dependencies: - dependency-name: nokogiri dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0ba875888c..ad1dd77348 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -48,10 +48,10 @@ GEM rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.4.0) - mini_portile2 (2.5.1) + mini_portile2 (2.6.1) minitest (5.14.2) - nokogiri (1.11.4) - mini_portile2 (~> 2.5.0) + nokogiri (1.12.5) + mini_portile2 (~> 2.6.1) racc (~> 1.4) paint (2.2.1) pathutil (0.16.2) From 8ff5273146db3d5e2f0ffbf22cbbc1597610c7dc Mon Sep 17 00:00:00 2001 From: Jacob Herrington Date: Wed, 29 Sep 2021 13:44:34 -0500 Subject: [PATCH 0409/1487] Remove abuse enabling language My rationale for these changes is documented on Twitter: https://twitter.com/JakeHerrington/status/1443286841533374469 --- en/community/mailing-lists/ruby-talk-guidelines/index.md | 4 +--- en/conduct/index.md | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/en/community/mailing-lists/ruby-talk-guidelines/index.md b/en/community/mailing-lists/ruby-talk-guidelines/index.md index a9879ea121..185ea5cbe6 100644 --- a/en/community/mailing-lists/ruby-talk-guidelines/index.md +++ b/en/community/mailing-lists/ruby-talk-guidelines/index.md @@ -9,9 +9,7 @@ You should follow these guidelines when posting to the ruby-talk mailing list. 1. **Always** be friendly, considerate, tactful, and tasteful. We want to - keep this list hospitable to the growing ranks of newbies, very - young people, and their teachers, as well as cater to fire breathing - wizards. :-) + keep this list hospitable and safe for everyone. 2. Keep your content relevant and easy to follow. Try to keep your content brief and to the point, but also try to include all relevant diff --git a/en/conduct/index.md b/en/conduct/index.md index 7dbdc22974..41c5994ebb 100644 --- a/en/conduct/index.md +++ b/en/conduct/index.md @@ -18,5 +18,5 @@ commit comments, etc.). * Participants will be tolerant of opposing views. * Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks. - * When interpreting the words and actions of others, participants should always assume good intentions. + * Participants should speak and act with good intentions, but understand that intent and impact are not equivalent. * Behaviour which can be reasonably considered harassment will not be tolerated. From 66bbbcb9eaea3074dce4e15bf79373d45c3525de Mon Sep 17 00:00:00 2001 From: hmdne <54514036+hmdne@users.noreply.github.com> Date: Thu, 30 Sep 2021 03:11:38 +0200 Subject: [PATCH 0410/1487] Remove abuse enabling language pt. 2 This is a follow-up to #2690 --- en/conduct/index.md | 1 - 1 file changed, 1 deletion(-) diff --git a/en/conduct/index.md b/en/conduct/index.md index 41c5994ebb..98e167cb38 100644 --- a/en/conduct/index.md +++ b/en/conduct/index.md @@ -16,7 +16,6 @@ community. It applies to all "collaborative space", which is defined as community communications channels (such as mailing lists, submitted patches, commit comments, etc.). - * Participants will be tolerant of opposing views. * Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks. * Participants should speak and act with good intentions, but understand that intent and impact are not equivalent. * Behaviour which can be reasonably considered harassment will not be tolerated. From 7e96640e1ca9fc74ac31e0f33d7c01692801eb66 Mon Sep 17 00:00:00 2001 From: hmdne <54514036+hmdne@users.noreply.github.com> Date: Thu, 30 Sep 2021 03:26:33 +0200 Subject: [PATCH 0411/1487] Enhance the harassment clause --- en/conduct/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/conduct/index.md b/en/conduct/index.md index 98e167cb38..4d6564005a 100644 --- a/en/conduct/index.md +++ b/en/conduct/index.md @@ -18,4 +18,4 @@ commit comments, etc.). * Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks. * Participants should speak and act with good intentions, but understand that intent and impact are not equivalent. - * Behaviour which can be reasonably considered harassment will not be tolerated. + * Behaviour which can be considered harassment against protected classes will not be tolerated. From cd3c95842f0ce41e1ae652759d66650ba370e88f Mon Sep 17 00:00:00 2001 From: The Stranjer <791672+TheStranjer@users.noreply.github.com> Date: Fri, 1 Oct 2021 04:51:26 -0600 Subject: [PATCH 0412/1487] Remove duplicate Ruby Essentials mention Generally speaking, when you define something, you shouldn't mention the thing you're defining. Mentioning Ruby Essentials twice like this doesn't add anything to the writing, and in fact detracts from it. --- en/documentation/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/documentation/index.md b/en/documentation/index.md index 32305dd6d1..4725666d88 100644 --- a/en/documentation/index.md +++ b/en/documentation/index.md @@ -33,7 +33,7 @@ the [installation guide](installation/) for help on installing Ruby. constructs. [Ruby Essentials][7] -: Ruby Essentials is a free on-line book designed to provide a concise +: A free on-line book designed to provide a concise and easy to follow guide to learning Ruby. [Learn to Program][8] From 828dd482ed977864560390e9864acc6668595d7d Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 4 Oct 2021 11:21:53 +0900 Subject: [PATCH 0413/1487] Revert all changes about CoC after 9/28/2021 --- en/community/mailing-lists/ruby-talk-guidelines/index.md | 4 +++- en/conduct/index.md | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/en/community/mailing-lists/ruby-talk-guidelines/index.md b/en/community/mailing-lists/ruby-talk-guidelines/index.md index 185ea5cbe6..a9879ea121 100644 --- a/en/community/mailing-lists/ruby-talk-guidelines/index.md +++ b/en/community/mailing-lists/ruby-talk-guidelines/index.md @@ -9,7 +9,9 @@ You should follow these guidelines when posting to the ruby-talk mailing list. 1. **Always** be friendly, considerate, tactful, and tasteful. We want to - keep this list hospitable and safe for everyone. + keep this list hospitable to the growing ranks of newbies, very + young people, and their teachers, as well as cater to fire breathing + wizards. :-) 2. Keep your content relevant and easy to follow. Try to keep your content brief and to the point, but also try to include all relevant diff --git a/en/conduct/index.md b/en/conduct/index.md index 4d6564005a..7dbdc22974 100644 --- a/en/conduct/index.md +++ b/en/conduct/index.md @@ -16,6 +16,7 @@ community. It applies to all "collaborative space", which is defined as community communications channels (such as mailing lists, submitted patches, commit comments, etc.). + * Participants will be tolerant of opposing views. * Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks. - * Participants should speak and act with good intentions, but understand that intent and impact are not equivalent. - * Behaviour which can be considered harassment against protected classes will not be tolerated. + * When interpreting the words and actions of others, participants should always assume good intentions. + * Behaviour which can be reasonably considered harassment will not be tolerated. From c3103b7aa8da7bf327d9501e9e0f5375d1176d1b Mon Sep 17 00:00:00 2001 From: Alexande B Date: Sun, 10 Oct 2021 10:55:38 +0200 Subject: [PATCH 0414/1487] Add information about chocolatey --- en/documentation/installation/index.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/en/documentation/installation/index.md b/en/documentation/installation/index.md index 9d32ab5d1d..1cc5090529 100644 --- a/en/documentation/installation/index.md +++ b/en/documentation/installation/index.md @@ -47,6 +47,7 @@ Here are available installation methods: * [OpenBSD](#openbsd) * [OpenIndiana](#openindiana) * [Windows Package Manager](#winget) + * [Chocolatey package manager for Windows](#chocolatey) * [Other Distributions](#other-systems) * [Installers](#installers) * [ruby-build](#ruby-build) @@ -228,6 +229,18 @@ to install Ruby: > winget install Ruby {% endhighlight %} +### Chocolatey package manager for Windows +{: #chocolatey} + +Also on Windows, you can use the [Chocolatey Package Manager](https://chocolatey.org/install) +to install Ruby: + +{% highlight sh %} +> choco install ruby +{% endhighlight %} + +It will reuse existing `msys2`, or install own for complete Ruby development environment + ### Other Distributions {: #other-systems} From 5750a052f340031a6197be6fbdc52698983d95e1 Mon Sep 17 00:00:00 2001 From: Chayoung You Date: Mon, 11 Oct 2021 15:50:46 +0900 Subject: [PATCH 0415/1487] Translate "Ruby 3.0.0 Preview 2 Released" (ko) (#2698) --- ...2020-12-08-ruby-3-0-0-preview2-released.md | 277 ++++++++++++++++++ 1 file changed, 277 insertions(+) create mode 100644 ko/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md diff --git a/ko/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md b/ko/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md new file mode 100644 index 0000000000..d7802da402 --- /dev/null +++ b/ko/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md @@ -0,0 +1,277 @@ +--- +layout: news_post +title: "Ruby 3.0.0 Preview 2 릴리스" +author: "naruse" +translator: "yous" +date: 2020-12-08 00:00:00 +0000 +lang: ko +--- + +Ruby 3.0.0-preview2 릴리스를 알리게 되어 기쁩니다. + +이번 버전은 많은 새 기능과 성능 향상을 포함하고 있습니다. + +## 정적 분석 + +### RBS + +RBS는 Ruby 프로그램의 타입을 기술하기 위한 언어입니다. + +TypeProf와 다른 도구들을 포함해서, RBS를 지원하는 타입 검사기는 RBS 정의를 통해 루비 프로그램을 더 잘 이해합니다. + +클래스나 모듈에 정의된 메서드, 인스턴스 변수와 타입, 상속이나 믹스인 관계에 대한 정의를 작성할 수 있습니다. + +RBS의 목표는 루비 프로그램에서 흔히 보이는 패턴을 지원하는 것과 유니언 타입, 메서드 오버로딩, 제네릭을 포함하는 고급 타입을 지원하는 것입니다. 또한 _인터페이스 타입_을 이용해 덕타이핑을 지원합니다. + +Ruby 3.0은 RBS로 작성된 타입 정의를 해석하고 처리하는 `rbs` gem을 포함합니다. +다음은 클래스, 모듈, 상수 정의를 포함하는 RBS의 작은 예시입니다. + +``` rbs +module ChatApp + VERSION: String + class Channel + attr_reader name: String + attr_reader messages: Array[Message] + attr_reader users: Array[User | Bot] # `|`는 유니언 타입을 의미합니다. 여기에서는 `User` 또는 `Bot`이라는 의미입니다. + def initialize: (String) -> void + def post: (String, from: User | Bot) -> Message # 메서드 오버로딩을 지원합니다. + | (File, from: User | Bot) -> Message + end +end +``` + +더 자세한 내용은 [rbs gem의 README](https://github.com/ruby/rbs)를 확인하세요. + +### TypeProf + +TypeProf는 Ruby 패키지에 포함된 타입 분석 도구입니다. + +지금의 TypeProf는 타입 추론 도구 역할을 합니다. + +TypeProf는 타입 어노테이션이 없는 일반적인 Ruby 코드를 읽어서, 어떤 메서드가 정의되어 있고 어떻게 사용되는지 분석하고, RBS 형식으로 타입 시그니처의 프로토타입을 생성합니다. + +다음은 TypeProf의 간단한 데모입니다. + +예제 입력입니다. + +``` ruby +# test.rb +class User + def initialize(name:, age:) + @name, @age = name, age + end + attr_reader :name, :age +end +User.new(name: "John", age: 20) +``` + +예제 출력입니다. + +``` +$ typeprof test.rb +# Classes +class User + attr_reader name : String + attr_reader age : Integer + def initialize : (name: String, age: Integer) -> [String, Integer] +end +``` + +입력을 "test.rb"에 저장하고 "typeprof test.rb" 커맨드를 통해 TypeProf를 실행할 수 있습니다. + +[TypeProf를 온라인에서 사용](https://mame.github.io/typeprof-playground/#rb=%23+test.rb%0Aclass+User%0A++def+initialize%28name%3A%2C+age%3A%29%0A++++%40name%2C+%40age+%3D+name%2C+age%0A++end%0A++%0A++attr_reader+%3Aname%2C+%3Aage%0Aend%0A%0AUser.new%28name%3A+%22John%22%2C+age%3A+20%29&rbs=)해볼 수도 있습니다. (TypeProf를 서버 쪽에서 실행하는 거라서, 잠시 동작하지 않을 수도 있습니다!) + +더 자세한 내용은 [문서](https://github.com/ruby/typeprof/blob/master/doc/doc.md)와 [데모](https://github.com/ruby/typeprof/blob/master/doc/demo.md)를 확인하세요. + +TypeProf는 실험적이고 아직 완성되지 않았습니다. Ruby 언어의 일부만 지원되고, 타입 오류 감지 기능은 제한적입니다. 하지만 언어 기능의 지원 범위, 분석 성능, 사용성이 빠르게 개선되고 있는 중입니다. 어떤 종류의 피드백이든 환영합니다. + +## Ractor (실험적) +Ractor는 스레드 안전에 대한 걱정이 없는 병렬 실행을 제공하기 위해 설계된 액터 모델과 비슷한 동시 실행 추상화 모델입니다. + +여러 개의 Ractor를 만들고 병렬로 실행할 수 있습니다. Ractor는 일반 객체를 공유할 수 없기 때문에 스레드 안전한 병렬 프로그램을 만들 수 있습니다. Ractor 간의 통신은 메시지 넘기기를 통해서 지원됩니다. + +객체 공유를 제한하기 위해, Ractor는 Ruby 문법에 여러 제한을 추가했습니다(여러 개의 Ractor를 사용하지 않는다면 제한은 없습니다). + +명세와 구현은 아직 완성되지 않았으므로 앞으로 변경될 수 있습니다. 그러므로 이 기능은 실험적으로 제공되며 처음 `Ractor.new`를 실행하면 "실험적 기능"이라는 경고를 표시합니다. + +다음은 2개의 Ractor를 통해 `n.prime?`(`n`은 상대적으로 큰 정수)을 계산하는 작은 프로그램입니다. 병렬 컴퓨터에서 순차적으로 실행하는 프로그램보다 약 2배 빠르다는 걸 확인할 수 있습니다. + +``` ruby +require 'prime' +# r1, r2에 보낸 정수들로 n.prime?을 병렬 실행 +r1, r2 = *(1..2).map do + Ractor.new do + n = Ractor.recv + n.prime? + end +end +# 파라미터를 송신 +r1.send 2**61 - 1 +r2.send 2**61 + 15 +# expr1, expr2의 실행 결과 대기 +p r1.take #=> true +p r2.take #=> true +``` + +더 자세한 내용은 [doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md)를 확인하세요. + +## Fiber 스케줄러 + +블로킹 작업에 끼어들 수 있는 `Fiber#scheduler`가 도입됩니다. 이는 기존에 존재하는 코드를 변경하지 않고 가벼운 동시성을 지원할 수 있게 합니다. 어떻게 동작하는지 궁금하다면 ["Don't Wait For Me, Scalable Concurrency for Ruby 3"](https://www.youtube.com/watch?v=Y29SSOS4UOc)을 보세요. + +현재 지원되는 클래스와 메서드는 다음과 같습니다. + +- `Mutex#lock`, `Mutex#unlock`, `Mutex#sleep` +- `ConditionVariable#wait` +- `Queue#pop`, `SizedQueue#push` +- `Thread#join` +- `Kernel#sleep` +- `Process.wait` +- `IO#wait`, `IO#read`, `IO#write`와 관련 메서드(예: `#wait_readable`, `#gets`, `#puts` 등). +- `IO#select`는 *지원되지 않습니다*. +(Async gem에 대해 링크와 함께 설명하기). 이 예제는 몇 가지 HTTP 요청을 동시에 수행합니다. +(다음을 설명하기:) +1. async는 외부 gem이다. +2. async는 다음 새 기능을 사용한다. + +``` ruby +require 'async' +require 'net/http' +require 'uri' +Async do + ["ruby", "python", "c"].each do |topic| + Async do + Net::HTTP.get(URI "https://www.google.com/search?q=#{topic}") + end + end +end +``` + +## 그 이외의 주목할 만한 기능 + +* 한 줄 패턴 매칭이 `in` 대신 `=>`를 사용합니다. + ``` ruby + # 버전 3.0 + {a: 0, b: 1} => {a:} + p a # => 0 + # 버전 2.7 + {a: 0, b: 1} in {a:} + p a # => 0 + ``` +* 검색 패턴이 추가됩니다. + ``` ruby + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + ``` +* end 없는 메서드 정의가 추가됩니다. + ``` ruby + def square(x) = x * x + ``` +* `Hash#except`가 내장됩니다. + ``` ruby + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + ``` +* 메모리 뷰가 실험적인 기능으로 추가됩니다. + * 이는 숫자 배열이나 비트맵 이미지와 같은 메모리 공간을 확장 라이브러리 간에 교환하기 위한 새로운 C-API 집합입니다. 확장 라이브러리는 모양, 요소의 형식 등으로 구성된 메모리 공간의 메타데이터를 공유할 수 있습니다. 이러한 메타데이터를 사용하여 확장 라이브러리는 다차원 배열을 적절하게 공유할 수 있습니다. 이 기능은 Python의 버퍼 프로토콜을 참고하여 설계되었습니다. + +## 성능 향상 + +* MJIT에 많은 개선이 추가되었습니다. 자세한 내용은 NEWS를 확인하세요. +* IRB에 긴 코드를 붙여 넣는 속도가 Ruby 2.7.0에 포함된 버전보다 53배 빨라졌습니다. 예를 들어, [이 샘플 코드](https://gist.github.com/aycabta/30ab96334275bced5796f118c9220b0b)를 붙여 넣는 데 드는 시간이 11.7초에서 0.22초로 줄어들었습니다. + +## 그 이외의 2.7 이후로 주목할 만한 변경 + +* 키워드 인자가 다른 인자들로부터 분리됩니다. + * 원칙적으로 Ruby 2.7에서 경고를 출력하는 코드는 동작하지 않습니다. 자세한 내용은 [문서](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/)를 확인하세요. + * 한편, 인자를 전달할 때 앞쪽 인자를 사용할 수 있습니다. + ``` ruby + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end + ``` +* `$SAFE` 기능이 완전히 제거됩니다. 이 값은 이제 일반 전역 변수입니다. +* Ruby 2.5에서 백트레이스의 순서가 역순이 되었습니다만, 이를 취소합니다. 이제 백트레이스는 Ruby 2.4처럼 동작합니다. 예외가 발생한 곳의 오류 메시지와 줄 번호가 가장 먼저 출력되며, 이를 호출한 곳의 정보가 그 뒤에 출력됩니다. +* 표준 라이브러리를 업데이트했습니다. + * RubyGems 3.2.0.rc.1 + * Bundler 2.2.0.rc.1 + * IRB 1.2.6 + * Reline 0.1.5 +* 다음 라이브러리는 이제 기본으로 포함되지 않습니다. + 각 기능이 필요한 경우에는 해당하는 gem을 설치해주세요. + * net-telnet + * xmlrpc +* 다음 기본 gem은 이제 내장 gem이 됩니다. + * rexml + * rss +* 다음 표준 라이브러리가 기본 gem이 되고, rubygems.org에 배포됩니다. + * abbrev + * base64 + * English + * erb + * find + * io-nonblock + * io-wait + * net-ftp + * net-http + * net-imap + * net-protocol + * nkf + * open-uri + * optparse + * resolv + * resolv-replace + * rinda + * securerandom + * set + * shellwords + * tempfile + * time + * tmpdir + * tsort + * weakref + +더 자세한 내용은 [NEWS](https://github.com/ruby/ruby/blob/v3_0_0_preview2/NEWS.md)나 +[커밋 로그](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_preview2)를 +확인해주세요. + +{% assign release = site.data.releases | where: "version", "3.0.0-preview2" | first %} + +이러한 변경사항에 따라, Ruby 2.7.0 이후로 [파일 {{ release.stats.files_changed }}개 수정, {{ release.stats.insertions }}줄 추가(+), {{ release.stats.deletions }}줄 삭제(-)](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0)가 +이루어졌습니다! + +Ruby 3.0.0-preview2를 사용해보시고, 피드백을 보내주세요! + +## 다운로드 + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Ruby는 + +Ruby는 1993년에 Matz(마츠모토 유키히로) 씨가 처음 개발했고, +현재는 오픈 소스로서 개발되고 있습니다. 여러 플랫폼에서 동작하며, +특히 웹 개발에서 전 세계적으로 이용되고 있습니다. From a1cfad2c9c047a0abba83f081432eecce1acff95 Mon Sep 17 00:00:00 2001 From: Alejandra Cernas Date: Thu, 14 Oct 2021 08:56:17 -0500 Subject: [PATCH 0416/1487] Update Home text on es.yml Add translation for the home button --- _data/locales/es.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_data/locales/es.yml b/_data/locales/es.yml index 679539743e..e193c328f9 100644 --- a/_data/locales/es.yml +++ b/_data/locales/es.yml @@ -3,7 +3,7 @@ ruby: Ruby slogan: El mejor amigo de un desarrollador sitelinks: -- text: Home +- text: Inicio url: /es home: true - text: Descargas From c1a3f7a05fd23bb108679bf84eef05d701ac2be3 Mon Sep 17 00:00:00 2001 From: Chayoung You Date: Tue, 19 Oct 2021 03:43:30 +0900 Subject: [PATCH 0417/1487] Translate "Ruby 3.0.0 RC1 Released" (ko) (#2700) * Translate "Ruby 3.0.0 RC1 Released" (ko) * Fix typo --- ...2020-12-08-ruby-3-0-0-preview2-released.md | 4 +- .../2020-12-20-ruby-3-0-0-rc1-released.md | 320 ++++++++++++++++++ 2 files changed, 322 insertions(+), 2 deletions(-) create mode 100644 ko/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md diff --git a/ko/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md b/ko/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md index d7802da402..a795aef51a 100644 --- a/ko/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md +++ b/ko/news/_posts/2020-12-08-ruby-3-0-0-preview2-released.md @@ -17,11 +17,11 @@ Ruby 3.0.0-preview2 릴리스를 알리게 되어 기쁩니다. RBS는 Ruby 프로그램의 타입을 기술하기 위한 언어입니다. -TypeProf와 다른 도구들을 포함해서, RBS를 지원하는 타입 검사기는 RBS 정의를 통해 루비 프로그램을 더 잘 이해합니다. +TypeProf와 다른 도구들을 포함해서, RBS를 지원하는 타입 검사기는 RBS 정의를 통해 Ruby 프로그램을 더 잘 이해합니다. 클래스나 모듈에 정의된 메서드, 인스턴스 변수와 타입, 상속이나 믹스인 관계에 대한 정의를 작성할 수 있습니다. -RBS의 목표는 루비 프로그램에서 흔히 보이는 패턴을 지원하는 것과 유니언 타입, 메서드 오버로딩, 제네릭을 포함하는 고급 타입을 지원하는 것입니다. 또한 _인터페이스 타입_을 이용해 덕타이핑을 지원합니다. +RBS의 목표는 Ruby 프로그램에서 흔히 보이는 패턴을 지원하는 것과 유니언 타입, 메서드 오버로딩, 제네릭을 포함하는 고급 타입을 지원하는 것입니다. 또한 _인터페이스 타입_을 이용해 덕타이핑을 지원합니다. Ruby 3.0은 RBS로 작성된 타입 정의를 해석하고 처리하는 `rbs` gem을 포함합니다. 다음은 클래스, 모듈, 상수 정의를 포함하는 RBS의 작은 예시입니다. diff --git a/ko/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md b/ko/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md new file mode 100644 index 0000000000..e1cc1a3944 --- /dev/null +++ b/ko/news/_posts/2020-12-20-ruby-3-0-0-rc1-released.md @@ -0,0 +1,320 @@ +--- +layout: news_post +title: "Ruby 3.0.0 RC1 릴리스" +author: "naruse" +translator: "yous" +date: 2020-12-20 00:00:00 +0000 +lang: ko +--- + +Ruby 3.0.0-rc1 릴리스를 알리게 되어 기쁩니다. + +이번 버전은 많은 새 기능과 성능 향상을 포함하고 있습니다. + +## 정적 분석 + +### RBS + +RBS는 Ruby 프로그램의 타입을 기술하기 위한 언어입니다. + +TypeProf와 다른 도구들을 포함해서, RBS를 지원하는 타입 검사기는 RBS 정의를 통해 Ruby 프로그램을 더 잘 이해합니다. + +클래스나 모듈에 정의된 메서드, 인스턴스 변수와 타입, 상속이나 믹스인 관계에 대한 정의를 작성할 수 있습니다. + +RBS의 목표는 Ruby 프로그램에서 흔히 보이는 패턴을 지원하는 것과 유니언 타입, 메서드 오버로딩, 제네릭을 포함하는 고급 타입을 지원하는 것입니다. 또한 _인터페이스 타입_을 이용해 덕타이핑을 지원합니다. + +Ruby 3.0은 RBS로 작성된 타입 정의를 해석하고 처리하는 `rbs` gem을 포함합니다. +다음은 클래스, 모듈, 상수 정의를 포함하는 RBS의 작은 예시입니다. + +``` rbs +module ChatApp + VERSION: String + class Channel + attr_reader name: String + attr_reader messages: Array[Message] + attr_reader users: Array[User | Bot] # `|`는 유니언 타입을 의미합니다. 여기에서는 `User` 또는 `Bot`이라는 의미입니다. + def initialize: (String) -> void + def post: (String, from: User | Bot) -> Message # 메서드 오버로딩을 지원합니다. + | (File, from: User | Bot) -> Message + end +end +``` + +더 자세한 내용은 [rbs gem의 README](https://github.com/ruby/rbs)를 확인하세요. + +### TypeProf + +TypeProf는 Ruby 패키지에 포함된 타입 분석 도구입니다. + +지금의 TypeProf는 타입 추론 도구 역할을 합니다. + +TypeProf는 타입 어노테이션이 없는 일반적인 Ruby 코드를 읽어서, 어떤 메서드가 정의되어 있고 어떻게 사용되는지 분석하고, RBS 형식으로 타입 시그니처의 프로토타입을 생성합니다. + +다음은 TypeProf의 간단한 데모입니다. + +예제 입력입니다. + +``` ruby +# test.rb +class User + def initialize(name:, age:) + @name, @age = name, age + end + attr_reader :name, :age +end +User.new(name: "John", age: 20) +``` + +예제 출력입니다. + +``` +$ typeprof test.rb +# Classes +class User + attr_reader name : String + attr_reader age : Integer + def initialize : (name: String, age: Integer) -> [String, Integer] +end +``` + +입력을 "test.rb"에 저장하고 "typeprof test.rb" 커맨드를 통해 TypeProf를 실행할 수 있습니다. + +[TypeProf를 온라인에서 사용](https://mame.github.io/typeprof-playground/#rb=%23+test.rb%0Aclass+User%0A++def+initialize%28name%3A%2C+age%3A%29%0A++++%40name%2C+%40age+%3D+name%2C+age%0A++end%0A++%0A++attr_reader+%3Aname%2C+%3Aage%0Aend%0A%0AUser.new%28name%3A+%22John%22%2C+age%3A+20%29&rbs=)해볼 수도 있습니다. (TypeProf를 서버 쪽에서 실행하는 거라서, 잠시 동작하지 않을 수도 있습니다!) + +더 자세한 내용은 [문서](https://github.com/ruby/typeprof/blob/master/doc/doc.md)와 [데모](https://github.com/ruby/typeprof/blob/master/doc/demo.md)를 확인하세요. + +TypeProf는 실험적이고 아직 완성되지 않았습니다. Ruby 언어의 일부만 지원되고, 타입 오류 감지 기능은 제한적입니다. 하지만 언어 기능의 지원 범위, 분석 성능, 사용성이 빠르게 개선되고 있는 중입니다. 어떤 종류의 피드백이든 환영합니다. + +## Ractor (실험적) + +Ractor는 스레드 안전에 대한 걱정이 없는 병렬 실행을 제공하기 위해 설계된 액터 모델과 비슷한 동시 실행 추상화 모델입니다. + +여러 개의 Ractor를 만들고 병렬로 실행할 수 있습니다. Ractor는 일반 객체를 공유할 수 없기 때문에 스레드 안전한 병렬 프로그램을 만들 수 있습니다. Ractor 간의 통신은 메시지 넘기기를 통해서 지원됩니다. + +객체 공유를 제한하기 위해, Ractor는 Ruby 문법에 여러 제한을 추가했습니다(여러 개의 Ractor를 사용하지 않는다면 제한은 없습니다). + +명세와 구현은 아직 완성되지 않았으므로 앞으로 변경될 수 있습니다. 그러므로 이 기능은 실험적으로 제공되며 처음 `Ractor.new`를 실행하면 "실험적 기능"이라는 경고를 표시합니다. + +다음은 2개의 Ractor를 통해 `n.prime?`(`n`은 상대적으로 큰 정수)을 계산하는 작은 프로그램입니다. 병렬 컴퓨터에서 순차적으로 실행하는 프로그램보다 약 2배 빠르다는 걸 확인할 수 있습니다. + +``` ruby +require 'prime' +# r1, r2에 보낸 정수들로 n.prime?을 병렬 실행 +r1, r2 = *(1..2).map do + Ractor.new do + n = Ractor.receive + n.prime? + end +end +# 파라미터를 송신 +r1.send 2**61 - 1 +r2.send 2**61 + 15 +# expr1, expr2의 실행 결과 대기 +p r1.take #=> true +p r2.take #=> true +``` + +더 자세한 내용은 [doc/ractor.md](https://github.com/ruby/ruby/blob/master/doc/ractor.md)를 확인하세요. + +## Fiber 스케줄러 + +블로킹 작업에 끼어들 수 있는 `Fiber#scheduler`가 도입됩니다. 이는 기존에 존재하는 코드를 변경하지 않고 가벼운 동시성을 지원할 수 있게 합니다. 어떻게 동작하는지 궁금하다면 ["Don't Wait For Me, Scalable Concurrency for Ruby 3"](https://www.youtube.com/watch?v=Y29SSOS4UOc)을 보세요. + +현재 지원되는 클래스와 메서드는 다음과 같습니다. + +- `Mutex#lock`, `Mutex#unlock`, `Mutex#sleep` +- `ConditionVariable#wait` +- `Queue#pop`, `SizedQueue#push` +- `Thread#join` +- `Kernel#sleep` +- `Process.wait` +- `IO#wait`, `IO#read`, `IO#write`와 관련 메서드(예: `#wait_readable`, `#gets`, `#puts` 등). +- `IO#select`는 *지원되지 않습니다*. + +(Async gem에 대해 링크와 함께 설명하기). 이 예제는 몇 가지 HTTP 요청을 동시에 수행합니다. + +(다음을 설명하기:) +1. async는 외부 gem이다. +2. async는 다음 새 기능을 사용한다. + +``` ruby +require 'async' +require 'net/http' +require 'uri' +Async do + ["ruby", "python", "c"].each do |topic| + Async do + Net::HTTP.get(URI "https://www.google.com/search?q=#{topic}") + end + end +end +``` + +## 그 이외의 주목할 만한 기능 + +* 한 줄 패턴 매칭을 재설계했습니다. (실험적) + + * `=>`가 추가됩니다. 오른 방향 대입처럼 사용할 수 있습니다. + + ```ruby + 0 => a + p a #=> 0 + + {b: 0, c: 1} => {b:} + p b #=> 0 + ``` + + * `in`이 `true` 또는 `false`를 반환하도록 변경됩니다. + + ```ruby + # 버전 3.0 + 0 in 1 #=> false + + # 버전 2.7 + 0 in 1 #=> raise NoMatchingPatternError + ``` + +* 검색 패턴이 추가됩니다. (실험적) + + ``` ruby + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + ``` + +* end 없는 메서드 정의가 추가됩니다. + + ``` ruby + def square(x) = x * x + ``` + +* `Hash#except`가 내장됩니다. + + ``` ruby + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + ``` + +* 메모리 뷰가 실험적인 기능으로 추가됩니다. + + * 이는 숫자 배열이나 비트맵 이미지와 같은 메모리 공간을 확장 라이브러리 간에 교환하기 위한 새로운 C-API 집합입니다. 확장 라이브러리는 모양, 요소의 형식 등으로 구성된 메모리 공간의 메타데이터를 공유할 수 있습니다. 이러한 메타데이터를 사용하여 확장 라이브러리는 다차원 배열을 적절하게 공유할 수 있습니다. 이 기능은 Python의 버퍼 프로토콜을 참고하여 설계되었습니다. + +## 성능 향상 + +* MJIT에 많은 개선이 추가되었습니다. 자세한 내용은 NEWS를 확인하세요. +* IRB에 긴 코드를 붙여 넣는 속도가 Ruby 2.7.0에 포함된 버전보다 53배 빨라졌습니다. 예를 들어, [이 샘플 코드](https://gist.github.com/aycabta/30ab96334275bced5796f118c9220b0b)를 붙여 넣는 데 드는 시간이 11.7초에서 0.22초로 줄어들었습니다. + +## 그 이외의 2.7 이후로 주목할 만한 변경 + +* 키워드 인자가 다른 인자들로부터 분리됩니다. + * 원칙적으로 Ruby 2.7에서 경고를 출력하는 코드는 동작하지 않습니다. 자세한 내용은 [문서](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/)를 확인하세요. + * 한편, 인자를 전달할 때 앞쪽 인자를 사용할 수 있습니다. + + ``` ruby + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end + ``` + +* 패턴 매칭(`case`/`in`)은 이제 실험적이지 않습니다. +* `$SAFE` 기능이 완전히 제거됩니다. 이 값은 이제 일반 전역 변수입니다. +* Ruby 2.5에서 백트레이스의 순서가 역순이 되었습니다만, 이를 취소합니다. 이제 백트레이스는 Ruby 2.4처럼 동작합니다. 예외가 발생한 곳의 오류 메시지와 줄 번호가 가장 먼저 출력되며, 이를 호출한 곳의 정보가 그 뒤에 출력됩니다. +* 표준 라이브러리를 업데이트했습니다. + * RubyGems 3.2.2 + * Bundler 2.2.2 + * IRB 1.2.6 + * Reline 0.1.5 + * Psych 3.2.1 + * JSON 2.4.1 + * BigDecimal 3.0.0 + * CSV 3.1.9 + * Digest 3.0.0 + * Fiddle 1.0.4 + * StringIO 3.0.0 + * StringScanner 3.0.0 +* 다음 라이브러리는 이제 기본으로 포함되지 않습니다. + 각 기능이 필요한 경우에는 해당하는 gem을 설치해주세요. + * net-telnet + * xmlrpc +* 다음 기본 gem은 이제 내장 gem이 됩니다. + * rexml + * rss +* 다음 표준 라이브러리가 기본 gem이 되고, rubygems.org에 배포됩니다. + * English + * abbrev + * base64 + * drb + * debug + * erb + * find + * net-ftp + * net-http + * net-imap + * net-protocol + * open-uri + * optparse + * pp + * prettyprint + * resolv-replace + * resolv + * rinda + * set + * securerandom + * shellwords + * tempfile + * tmpdir + * time + * tsort + * un + * weakref + * digest + * io-nonblock + * io-wait + * nkf + * pathname + * syslog + * win32ole + +더 자세한 내용은 [NEWS](https://github.com/ruby/ruby/blob/v3_0_0_rc1/NEWS.md)나 +[커밋 로그](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0_rc1)를 +확인해주세요. + +{% assign release = site.data.releases | where: "version", "3.0.0-rc1" | first %} + +이러한 변경사항에 따라, Ruby 2.7.0 이후로 [파일 {{ release.stats.files_changed }}개 수정, {{ release.stats.insertions }}줄 추가(+), {{ release.stats.deletions }}줄 삭제(-)](https://github.com/ruby/ruby/compare/v2_7_0...v3_0_0)가 +이루어졌습니다! + +Ruby 3.0.0-rc1을 사용해보시고, 피드백을 보내주세요! + +## 다운로드 + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Ruby는 + +Ruby는 1993년에 Matz(마츠모토 유키히로) 씨가 처음 개발했고, +현재는 오픈 소스로서 개발되고 있습니다. 여러 플랫폼에서 동작하며, +특히 웹 개발에서 전 세계적으로 이용되고 있습니다. From 051c36de1d5785612208b76c9706c20731b8c89a Mon Sep 17 00:00:00 2001 From: Chayoung You Date: Tue, 19 Oct 2021 03:45:16 +0900 Subject: [PATCH 0418/1487] Translate "Ruby 3.0.0 Released" (ko) (#2702) --- .../_posts/2020-12-25-ruby-3-0-0-released.md | 391 ++++++++++++++++++ 1 file changed, 391 insertions(+) create mode 100644 ko/news/_posts/2020-12-25-ruby-3-0-0-released.md diff --git a/ko/news/_posts/2020-12-25-ruby-3-0-0-released.md b/ko/news/_posts/2020-12-25-ruby-3-0-0-released.md new file mode 100644 index 0000000000..4cd4b6628c --- /dev/null +++ b/ko/news/_posts/2020-12-25-ruby-3-0-0-released.md @@ -0,0 +1,391 @@ +--- +layout: news_post +title: "Ruby 3.0.0 릴리스" +author: "naruse" +translator: "yous" +date: 2020-12-25 00:00:00 +0000 +lang: ko +--- + +Ruby 3.0.0 릴리스를 알리게 되어 기쁩니다. 우리는 2015년부터 성능, 동시성, 타입 기능을 목표로 한 Ruby 3을 위해 열심히 개발해 왔습니다. 특히 성능 부분에서, Matz 씨는 "Ruby3는 Ruby2보다 3배 더 빠를 것"이라고 해 [Ruby 3x3](https://blog.heroku.com/ruby-3-by-3)으로 알려지기도 했습니다. + +{% assign release = site.data.releases | where: "version", "3.0.0" | first %} + +Optcarrot 3000 frames + +NES의 게임 에뮬레이션 작업을 통해 싱글 스레드 성능을 측정한 [optcarrot 벤치마크](https://github.com/mame/optcarrot)를 보면, Ruby 2.0보다 3배 더 빠른 성능을 달성했습니다!
이 벤치마크는 [benchmark-driver.github.io/hardware.html](https://benchmark-driver.github.io/hardware.html)에 표기된 환경에서 측정되었습니다. [8c510e4095 커밋](https://github.com/ruby/ruby/commit/8c510e4095)이 Ruby 3.0 코드로 사용되었습니다. 환경과 벤치마크에 따라 3배 빠르지 않을 수도 있습니다.
+ +Ruby 3.0.0의 목표는 다음 항목을 통해 다루고 있습니다. +* 성능 + * MJIT +* 동시성 + * Ractor + * Fiber 스케줄러 +* 타입 (정적 분석) + * RBS + * TypeProf + +위의 성능 향상과 함께, Ruby 3.0에 몇 가지 새 기능이 도입됩니다. + +## 성능 + +> 제가 콘퍼런스 키노트에서 처음 "Ruby3x3"을 선언했을 때, 코어 팀 구성원을 포함한 많은 사람들은 "Matz 씨는 허풍쟁이"라고 느꼈습니다. 사실 저도 그렇게 느꼈어요. 하지만 우리는 해냈습니다. (일부 벤치마크에서) Ruby3.0을 Ruby2.0보다 세 배 빠르게 만드는 데 성공한 코어 팀이 자랑스럽습니다. -- Matz + +### MJIT + +MJIT의 많은 개선이 추가되었습니다. 자세한 내용은 NEWS를 확인하세요. + +Ruby 3.0에서 JIT는 게임([Optcarrot](https://benchmark-driver.github.io/benchmarks/optcarrot/commits.html#chart-1)), AI([Rubykon](https://benchmark-driver.github.io/benchmarks/rubykon/commits.html)), 적은 메서드를 여러 번 호출하는 데 대부분의 시간을 사용하는 애플리케이션 등의 제한적인 작업 성능을 향상시킵니다. + +Ruby 3.0이 [JIT이 적용된 코드 크기를 현저히 줄였지만](https://twitter.com/k0kubun/status/1256142302608650244), Rails와 같은 작업에 대해서는 아직 준비되지 않았습니다. 굉장히 많은 메서드에 시간을 사용하는 Rails의 경우 JIT으로 인해 명령어 캐시 미스가 더 악화됩니다. 이 문제에 대한 추후 개선은 Ruby 3.1 소식을 기다려주세요. + +## 동시성 / 병렬성 + +> 지금은 멀티코어 시대입니다. 동시성은 아주 중요합니다. Ruby는 Ractor, Async Fiber와 함께 진정한 동시성 언어가 될 것입니다. --- Matz + +### Ractor (실험적) + +Ractor는 스레드 안전에 대한 걱정이 없는 병렬 실행을 제공하기 위해 설계된 액터 모델과 비슷한 동시 실행 추상화 모델입니다. + +여러 개의 Ractor를 만들고 병렬로 실행할 수 있습니다. Ractor는 일반 객체를 공유할 수 없기 때문에 스레드 안전한 병렬 프로그램을 만들 수 있습니다. Ractor 간의 통신은 메시지 넘기기를 통해서 지원됩니다. + +객체 공유를 제한하기 위해, Ractor는 Ruby 문법에 여러 제한을 추가했습니다(여러 개의 Ractor를 사용하지 않는다면 제한은 없습니다). + +명세와 구현은 아직 완성되지 않았으므로 앞으로 변경될 수 있습니다. 그러므로 이 기능은 실험적으로 제공되며 처음 `Ractor.new`를 실행하면 "실험적 기능"이라는 경고를 표시합니다. + +다음은 유명한 벤치마크 tak 함수([Tak (function) - Wikipedia](https://en.wikipedia.org/wiki/Tak_(function)))의 실행 시간을 측정하는 작은 프로그램입니다. 4번 순차적으로 실행하거나, Ractor를 통해 4번 병렬로 실행합니다. + +``` ruby +def tarai(x, y, z) = + x <= y ? y : tarai(tarai(x-1, y, z), + tarai(y-1, z, x), + tarai(z-1, x, y)) +require 'benchmark' +Benchmark.bm do |x| + # 순차적 버전 + x.report('seq'){ 4.times{ tarai(14, 7, 0) } } + + # 병렬 버전 + x.report('par'){ + 4.times.map do + Ractor.new { tarai(14, 7, 0) } + end.each(&:take) + } +end +``` + +``` +Benchmark result: + user system total real +seq 64.560736 0.001101 64.561837 ( 64.562194) +par 66.422010 0.015999 66.438009 ( 16.685797) +``` + +이 결과는 Ubuntu 20.04, Intel(R) Core(TM) i7-6700(4 코어, 8 하드웨어 스레드)에서 측정되었습니다. 이는 병렬 버전이 순차적 버전보다 3.87배 빠르다는 것을 보여줍니다. + +더 자세한 내용은 [doc/ractor.md](https://docs.ruby-lang.org/en/3.0.0/doc/ractor_md.html)를 확인하세요. + +### Fiber 스케줄러 + +블로킹 작업에 끼어들 수 있는 `Fiber#scheduler`가 도입됩니다. 이는 기존에 존재하는 코드를 변경하지 않고 가벼운 동시성을 지원할 수 있게 합니다. 어떻게 동작하는지 궁금하다면 ["Don't Wait For Me, Scalable Concurrency for Ruby 3"](https://www.youtube.com/watch?v=Y29SSOS4UOc)을 보세요. + +현재 지원되는 클래스와 메서드는 다음과 같습니다. + +- `Mutex#lock`, `Mutex#unlock`, `Mutex#sleep` +- `ConditionVariable#wait` +- `Queue#pop`, `SizedQueue#push` +- `Thread#join` +- `Kernel#sleep` +- `Process.wait` +- `IO#wait`, `IO#read`, `IO#write`와 관련 메서드(예: `#wait_readable`, `#gets`, `#puts` 등). +- `IO#select`는 *지원되지 않습니다*. + +이 예제 프로그램은 HTTP 요청 몇 개를 동시에 수행합니다. + +``` ruby +require 'async' +require 'net/http' +require 'uri' + +Async do + ["ruby", "rails", "async"].each do |topic| + Async do + Net::HTTP.get(URI "https://www.google.com/search?q=#{topic}") + end + end +end +``` + +이 코드는 이벤트 루프를 지원하는 [async](https://github.com/socketry/async)를 사용합니다. 이 이벤트 루프는 `Net::HTTP`를 논블로킹 작업으로 만들기 위해 `Fiber#scheduler` 훅을 사용합니다. Ruby의 논블로킹 실행을 제공하기 위해 다른 gem도 이 인터페이스를 사용할 수 있습니다. 그리고 이러한 gem은 논블로킹 훅을 지원하는 Ruby의 다른 구현체(예: JRuby, TruffleRuby)와도 호환됩니다. + +## 정적 분석 + +> 2010년대는 정적 타입 프로그래밍 언어의 시대였습니다. Ruby는 추상 해석을 통해, 타입 선언 없이 정적 타입 체크를 하여 미래를 추구합니다. RBS와 TypeProf는 미래를 향한 첫걸음입니다. 다음 단계도 기대해주세요. --- Matz + +### RBS + +RBS는 Ruby 프로그램의 타입을 기술하기 위한 언어입니다. + +TypeProf와 다른 도구들을 포함해서, RBS를 지원하는 타입 검사기는 RBS 정의를 통해 Ruby 프로그램을 더 잘 이해합니다. + +클래스나 모듈에 정의된 메서드, 인스턴스 변수와 타입, 상속이나 믹스인 관계에 대한 정의를 작성할 수 있습니다. + +RBS의 목표는 Ruby 프로그램에서 흔히 보이는 패턴을 지원하는 것과 유니언 타입, 메서드 오버로딩, 제네릭을 포함하는 고급 타입을 작성할 수 있도록 하는 것입니다. 또한 _인터페이스 타입_을 이용해 덕타이핑을 지원합니다. + +Ruby 3.0은 RBS로 작성된 타입 정의를 해석하고 처리하는 `rbs` gem을 포함합니다. +다음은 클래스, 모듈, 상수 정의를 포함하는 RBS의 작은 예시입니다. + +``` rbs +module ChatApp + VERSION: String + class Channel + attr_reader name: String + attr_reader messages: Array[Message] + attr_reader users: Array[User | Bot] # `|`는 유니언 타입을 의미합니다. 여기에서는 `User` 또는 `Bot`이라는 의미입니다. + def initialize: (String) -> void + def post: (String, from: User | Bot) -> Message # 메서드 오버로딩을 지원합니다. + | (File, from: User | Bot) -> Message + end +end +``` + +더 자세한 내용은 [rbs gem의 README](https://github.com/ruby/rbs)를 확인하세요. + +### TypeProf + +TypeProf는 Ruby 패키지에 포함된 타입 분석 도구입니다. + +지금의 TypeProf는 타입 추론 도구 역할을 합니다. + +TypeProf는 타입 어노테이션이 없는 일반적인 Ruby 코드를 읽어서, 어떤 메서드가 정의되어 있고 어떻게 사용되는지 분석하고, RBS 형식으로 타입 시그니처의 프로토타입을 생성합니다. + +다음은 TypeProf의 간단한 데모입니다. + +예제 입력입니다. + +``` ruby +# test.rb +class User + def initialize(name:, age:) + @name, @age = name, age + end + attr_reader :name, :age +end +User.new(name: "John", age: 20) +``` + +예제 출력입니다. + +``` +$ typeprof test.rb +# Classes +class User + attr_reader name : String + attr_reader age : Integer + def initialize : (name: String, age: Integer) -> [String, Integer] +end +``` + +입력을 "test.rb"에 저장하고 "typeprof test.rb" 커맨드를 통해 TypeProf를 실행할 수 있습니다. + +[TypeProf를 온라인에서 사용](https://mame.github.io/typeprof-playground/#rb=%23+test.rb%0Aclass+User%0A++def+initialize%28name%3A%2C+age%3A%29%0A++++%40name%2C+%40age+%3D+name%2C+age%0A++end%0A++%0A++attr_reader+%3Aname%2C+%3Aage%0Aend%0A%0AUser.new%28name%3A+%22John%22%2C+age%3A+20%29&rbs=)해볼 수도 있습니다. (TypeProf를 서버 쪽에서 실행하는 거라서, 잠시 동작하지 않을 수도 있습니다!) + +더 자세한 내용은 [TypeProf 문서](https://github.com/ruby/typeprof/blob/master/doc/doc.md)와 [데모](https://github.com/ruby/typeprof/blob/master/doc/demo.md)를 확인하세요. + +TypeProf는 실험적이고 아직 완성되지 않았습니다. Ruby 언어의 일부만 지원되고, 타입 오류 감지 기능은 제한적입니다. 하지만 언어 기능의 지원 범위, 분석 성능, 사용성이 빠르게 개선되고 있는 중입니다. 어떤 종류의 피드백이든 환영합니다. + +## 그 이외의 주목할 만한 기능 + +* 한 줄 패턴 매칭을 재설계했습니다. (실험적) + + * `=>`가 추가됩니다. 오른 방향 대입처럼 사용할 수 있습니다. + + ```ruby + 0 => a + p a #=> 0 + + {b: 0, c: 1} => {b:} + p b #=> 0 + ``` + + * `in`이 `true` 또는 `false`를 반환하도록 변경됩니다. + + ```ruby + # 버전 3.0 + 0 in 1 #=> false + + # 버전 2.7 + 0 in 1 #=> raise NoMatchingPatternError + ``` + +* 검색 패턴이 추가됩니다. (실험적) + + ``` ruby + case ["a", 1, "b", "c", 2, "d", "e", "f", 3] + in [*pre, String => x, String => y, *post] + p pre #=> ["a", 1] + p x #=> "b" + p y #=> "c" + p post #=> [2, "d", "e", "f", 3] + end + ``` + +* end 없는 메서드 정의가 추가됩니다. + + ``` ruby + def square(x) = x * x + ``` + +* `Hash#except`가 내장됩니다. + + ``` ruby + h = { a: 1, b: 2, c: 3 } + p h.except(:a) #=> {:b=>2, :c=>3} + ``` + +* 메모리 뷰가 실험적인 기능으로 추가됩니다. + + * 이는 숫자 배열이나 비트맵 이미지와 같은 메모리 공간을 확장 라이브러리 간에 교환하기 위한 새로운 C-API 집합입니다. 확장 라이브러리는 모양, 요소의 형식 등으로 구성된 메모리 공간의 메타데이터를 공유할 수 있습니다. 이러한 메타데이터를 사용하여 확장 라이브러리는 다차원 배열을 적절하게 공유할 수 있습니다. 이 기능은 Python의 버퍼 프로토콜을 참고하여 설계되었습니다. + +## 성능 향상 + +* IRB에 긴 코드를 붙여 넣는 속도가 Ruby 2.7.0에 포함된 버전보다 53배 빨라졌습니다. 예를 들어, [이 샘플 코드](https://gist.github.com/aycabta/30ab96334275bced5796f118c9220b0b)를 붙여 넣는 데 드는 시간이 11.7초에서 0.22초로 줄어들었습니다. + + + + + +* IRB에 `measure` 커맨드가 추가되었습니다. 간단한 실행 시간 측정이 가능합니다. + + ``` + irb(main):001:0> 3 + => 3 + irb(main):002:0> measure + TIME is added. + => nil + irb(main):003:0> 3 + processing time: 0.000058s + => 3 + irb(main):004:0> measure :off + => nil + irb(main):005:0> 3 + => 3 + ``` + +## 그 이외의 2.7 이후로 주목할 만한 변경 + +* 키워드 인자가 다른 인자들로부터 분리됩니다. + * 원칙적으로 Ruby 2.7에서 경고를 출력하는 코드는 동작하지 않습니다. 자세한 내용은 [이 문서](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/)를 확인하세요. + * 한편, 인자를 전달할 때 앞쪽 인자를 사용할 수 있습니다. + + ``` ruby + def method_missing(meth, ...) + send(:"do_#{ meth }", ...) + end + ``` + +* 패턴 매칭(`case`/`in`)은 이제 실험적이지 않습니다. + * 더 자세한 내용은 [패턴 매칭 문서](https://docs.ruby-lang.org/en/3.0.0/doc/syntax/pattern_matching_rdoc.html)를 확인하세요. +* `$SAFE` 기능이 완전히 제거됩니다. 이 값은 이제 일반 전역 변수입니다. +* Ruby 2.5에서 백트레이스의 순서가 역순이 되었습니다만, 이를 취소합니다. 이제 백트레이스는 Ruby 2.4처럼 동작합니다. 예외가 발생한 곳의 오류 메시지와 줄 번호가 가장 먼저 출력되며, 이를 호출한 곳의 정보가 그 뒤에 출력됩니다. +* 표준 라이브러리를 업데이트했습니다. + * RubyGems 3.2.3 + * Bundler 2.2.3 + * IRB 1.3.0 + * Reline 0.2.0 + * Psych 3.3.0 + * JSON 2.5.1 + * BigDecimal 3.0.0 + * CSV 3.1.9 + * Date 3.1.0 + * Digest 3.0.0 + * Fiddle 1.0.6 + * StringIO 3.0.0 + * StringScanner 3.0.0 + * 등 +* 다음 라이브러리는 이제 내장 gem이나 표준 라이브러리가 아닙니다. + 각 기능이 필요한 경우에는 해당하는 gem을 설치해주세요. + * sdbm + * webrick + * net-telnet + * xmlrpc +* 다음 기본 gem은 이제 내장 gem이 됩니다. + * rexml + * rss +* 다음 표준 라이브러리가 기본 gem이 되고, rubygems.org에 배포됩니다. + * English + * abbrev + * base64 + * drb + * debug + * erb + * find + * net-ftp + * net-http + * net-imap + * net-protocol + * open-uri + * optparse + * pp + * prettyprint + * resolv-replace + * resolv + * rinda + * set + * securerandom + * shellwords + * tempfile + * tmpdir + * time + * tsort + * un + * weakref + * digest + * io-nonblock + * io-wait + * nkf + * pathname + * syslog + * win32ole + +더 자세한 내용은 [NEWS](https://github.com/ruby/ruby/blob/{{ release.tag }}/NEWS.md)나 +[커밋 로그](https://github.com/ruby/ruby/compare/v2_7_0...{{ release.tag }})를 +확인해주세요. + +이러한 변경사항에 따라, Ruby 2.7.0 이후로 [파일 {{ release.stats.files_changed }}개 수정, {{ release.stats.insertions }}줄 추가(+), {{ release.stats.deletions }}줄 삭제(-)](https://github.com/ruby/ruby/compare/v2_7_0...{{ release.tag }}#file_bucket)가 +이루어졌습니다! + +> Ruby3.0은 마일스톤입니다. 언어는 진화했고, 호환성은 유지했습니다. 이게 끝이 아닙니다. Ruby는 계속 진보하고, 더 대단해질 것입니다. 기대해주세요! --- Matz + +메리 크리스마스, 해피 홀리데이, Ruby 3.0과 함께 프로그래밍을 즐겨보세요! + +## 다운로드 + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Ruby는 + +Ruby는 1993년에 Matz(마츠모토 유키히로) 씨가 처음 개발했고, +현재는 오픈 소스로서 개발되고 있습니다. 여러 플랫폼에서 동작하며, +특히 웹 개발에서 전 세계적으로 이용되고 있습니다. From 0820b1a5e6b9a0c3e33d89bcb906d2d01fa7d7a1 Mon Sep 17 00:00:00 2001 From: Benson Muite Date: Tue, 19 Oct 2021 10:04:05 +0300 Subject: [PATCH 0419/1487] Add OnRuby OnRuby is a meetup alternative written in Ruby --- en/community/user-groups/index.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/en/community/user-groups/index.md b/en/community/user-groups/index.md index f7d7f62266..b6b610d497 100644 --- a/en/community/user-groups/index.md +++ b/en/community/user-groups/index.md @@ -27,6 +27,11 @@ Information about Ruby user groups can be found on various websites: including: private forums, a place for announcements, automated meeting reminders, and a nice RSVP system. +[OnRuby][2] +: A number of user groups can also be found at OnRuby. OnRuby is an + open source platform written in Ruby that can be used to organize + meetups. It is available on [GitHub][3]. + ### Organizing Your Own Group If you are interested in forming your own group, be sure to find out if @@ -37,3 +42,5 @@ option if there is already one nearby. [1]: https://ruby.meetup.com +[2]: https://www.onruby.eu/ +[3]: https://github.com/phoet/on_ruby From 89a49070ea0e7875922893911fb8069a1908d7f0 Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Wed, 20 Oct 2021 16:11:05 +0700 Subject: [PATCH 0420/1487] Translate CVE-2021-28965: XML round-trip vulnerability in REXML (id) --- ...p-vulnerability-in-rexml-cve-2021-28965.md | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 id/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md diff --git a/id/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md b/id/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md new file mode 100644 index 0000000000..5aba3104e9 --- /dev/null +++ b/id/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md @@ -0,0 +1,51 @@ +--- +layout: news_post +title: "CVE-2021-28965: Kerentanan XML round-trip pada REXML" +author: "mame" +translator: "meisyal" +date: 2021-04-05 12:00:00 +0000 +tags: security +lang: id +--- + +Ada sebuah kerentanan XML *round-trip* pada *gem* REXML yang di-*bundle* +dengan Ruby. Kerentanan ini telah ditetapkan sebagai penanda +[CVE-2021-28965](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-28965). +Kami sangat merekomendasikan untuk memperbarui *gem* REXML. + +## Detail + +Ketika *parsing* dan *serializing* sebuah dokumen XML, *gem* REXML (termasuk +yang di-*bundle* dengan Ruby) dapat membuat sebuah dokumen XML yang salah +di mana struktur dokumen berbeda dengan aslinya. Dampak dari masalah ini sangat +bergantung dengan konteks, tetapi ini bisa menyebabkan kerentanan pada beberapa +program yang menggunakan REXML. + +Mohon perbarui *gem* REXML ke versi 3.2.5 atau setelahnya. + +Jika Anda sedang menggunakan Ruby 2.6 atau setelahnya: + +* Mohon gunakan Ruby 2.6.7, 2.7.3, atau 3.0.1. +* Kemungkinan lain, Anda dapat menjalankan `gem update rexml` untuk memperbarui. Jika Anda menggunakan *bundler*, mohon tambahkan `gem "rexml", ">= 3.2.5"` pada `Gemfile`. + +Jika Anda sedang menggunakan Ruby 2.5.8 atau sebelumnya: + +* Mohon gunakan Ruby 2.5.9. +* Anda tidak dapat menjalankan `gem update rexml` pada Ruby 2.5.8 atau sebelumnya. +* Catat bahwa rangkaian Ruby 2.5 saat ini EOL, sehingga pertimbangkan untuk memperbarui ke 2.6.7 atau setelahnya segera mungkin. + +## Versi terimbas + +* Ruby 2.5.8 atau sebelumnya (Anda tidak dapat menjalankan `gem upgrade rexml` pada versi ini.) +* Ruby 2.6.6 atau sebelumnya +* Ruby 2.7.2 atau sebelumnya +* Ruby 3.0.0 +* *Gem* REXML 3.2.4 atau sebelumnya + +## Rujukan + +Terima kasih kepada [Juho Nurminen](https://hackerone.com/jupenur) yang telah menemukan masalah ini. + +## Riwayat + +* Semula dipublikasikan pada 2021-04-05 12:00:00 (UTC) From 9564fa74948b75b3b5aa05de5c9a7686ca7e600b Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Wed, 20 Oct 2021 16:17:16 +0700 Subject: [PATCH 0421/1487] Translate Ruby 2.6.7 released news (id) (#2661) * Translate Ruby 2.6.7 released news (id) * Fix link to translated CVE-2021-28965 post (id) --- .../_posts/2021-04-05-ruby-2-6-7-released.md | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 id/news/_posts/2021-04-05-ruby-2-6-7-released.md diff --git a/id/news/_posts/2021-04-05-ruby-2-6-7-released.md b/id/news/_posts/2021-04-05-ruby-2-6-7-released.md new file mode 100644 index 0000000000..9eb9e5ef3f --- /dev/null +++ b/id/news/_posts/2021-04-05-ruby-2-6-7-released.md @@ -0,0 +1,69 @@ +--- +layout: news_post +title: "Ruby 2.6.7 Dirilis" +author: "usa" +translator: "meisyal" +date: 2021-04-05 12:00:00 +0000 +lang: id +--- + +Ruby 2.6.7 telah dirilis. + +Rilis ini memuat perbaikan keamanan. +Mohon cek topik-topik di bawah ini untuk lebih detail. + +* [CVE-2020-25613: Potensi Kerentanan HTTP Request Smuggling pada WEBrick]({%link id/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md %}) +* [CVE-2021-28965: XML round-trip vulnerability in REXML]({% link id/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md %}) + +Lihat [commit logs](https://github.com/ruby/ruby/compare/v2_6_6...v2_6_7) untuk +detail. + +Dengan rilis ini, kami mengakhiri fase perawatan dari Ruby 2.6 dan Ruby 2.6 +masuk ke fase perawatan keamanan. +Ini berarti kami tidak akan melakukan *backport* perbaikan *bug* apapun pada +Ruby 2.6, kecuali perbaikan keamanan. +Masa perawatan keamanan dijadwalkan selama satu tahun. +Ruby 2.6 mencapai EOL dan dukungan resminya berakhir saat fase perawatan +keamanan selesai. +Oleh sebab itu, kami menyarankan Anda untuk merencanakan pembaruan ke +Ruby 2.7 atau 3.0. + +## Unduh + +{% assign release = site.data.releases | where: "version", "2.6.7" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Komentar Rilis + +Banyak *committer*, pengembang, dan pengguna yang telah menyediakan laporan +*bug* membantu kami membuat rilis ini. Terima kasih atas kontribusinya. + +Perawatan Ruby 2.6, termasuk rilis ini, didasarkan pada "Agreement for the Ruby +stable version" dari Ruby Associaction. From 84747dc70d2d5884ffe4535015d0b0888a01f2c6 Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Fri, 22 Oct 2021 22:57:00 +0700 Subject: [PATCH 0422/1487] Translate Ruby 2.7.3 released news post (id) --- .../_posts/2021-04-05-ruby-2-7-3-released.md | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 id/news/_posts/2021-04-05-ruby-2-7-3-released.md diff --git a/id/news/_posts/2021-04-05-ruby-2-7-3-released.md b/id/news/_posts/2021-04-05-ruby-2-7-3-released.md new file mode 100644 index 0000000000..72ab593135 --- /dev/null +++ b/id/news/_posts/2021-04-05-ruby-2-7-3-released.md @@ -0,0 +1,56 @@ +--- +layout: news_post +title: "Ruby 2.7.3 Dirilis" +author: "nagachika" +translator: "meisyal" +date: 2021-04-05 12:00:00 +0000 +lang: id +--- + +Ruby 2.7.3 telah dirilis. + +Rilis ini mencakup perbaikan keamanan. +Mohon cek topik-topik di bawah ini untuk lebih detail. + +* [CVE-2021-28965: Kerentanan XML round-trip pada REXML]({% link id/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md %}) +* [CVE-2021-28966: Path traversal in Tempfile on Windows]({% link en/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md %}) + +Cek [commit logs](https://github.com/ruby/ruby/compare/v2_7_2...v2_7_3) untuk +detail. + +## Unduh + +{% assign release = site.data.releases | where: "version", "2.7.3" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Komentar Rilis + +Banyak *committer*, pengembang, dan pengguna yang menyediakan laporan *bug* +telah membantu kami membuat rilis ini. Terima kasih atas kontribusinya. From 5dd6e5f7629c665a1d1447a22d7b4960abf9e608 Mon Sep 17 00:00:00 2001 From: Chayoung You Date: Sat, 23 Oct 2021 14:12:46 +0900 Subject: [PATCH 0423/1487] Add Ruby Discord Server (ko) (#2706) --- ko/community/index.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ko/community/index.md b/ko/community/index.md index 2bcecc4ee9..cdf5a45da6 100644 --- a/ko/community/index.md +++ b/ko/community/index.md @@ -27,6 +27,11 @@ Ruby의 장점, 특징에 대한 설명에서 빠지지 않고 등장하는 것 : Ruby는 여러 언어에 걸쳐 다른 주제를 다루는 다양한 메일링 리스트를 가지고 있습니다. Ruby에 관해 질문이 있다면, 메일링 리스트에 질문하시면 됩니다. +[Ruby Discord 서버 (초대 링크)][ruby-discord] +: Ruby 언어 Discord 서버에서 다른 Ruby 사용자와 채팅하고, Ruby 질문을 통해 + 도움을 받고, 다른 사람을 도울 수 있습니다. + Discord는 초보 개발자가 시작하기 좋은 곳이고, 참여하기도 쉽습니다. + [IRC에서의 Ruby(#ruby)](https://web.libera.chat/#ruby) : Ruby 언어 IRC 채널에서 동료 루비스트와 채팅할 수 있습니다. @@ -54,5 +59,6 @@ Ruby의 장점, 특징에 대한 설명에서 빠지지 않고 등장하는 것 * [Rails at Open Directory Project][rails-opendir] [ruby-central]: http://rubycentral.org/ +[ruby-discord]: https://discord.gg/EnSevaRfct [ruby-opendir]: https://dmoztools.net/Computers/Programming/Languages/Ruby/ [rails-opendir]: https://dmoztools.net/Computers/Programming/Languages/Ruby/Software/Frameworks/Rails/ From 9b6a8c486c1513c81b4fa2620b0ddb808b3eaa9d Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Sat, 23 Oct 2021 17:52:29 +0700 Subject: [PATCH 0424/1487] Translate CVE-2021-28966: Path traversal in Tempfile on Windows (id) --- ...ath-traversal-on-windows-cve-2021-28966.md | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 id/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md diff --git a/id/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md b/id/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md new file mode 100644 index 0000000000..34e5531b31 --- /dev/null +++ b/id/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md @@ -0,0 +1,44 @@ +--- +layout: news_post +title: "CVE-2021-28966: Path traversal pada Tempfile di Windows" +author: "mame" +translator: "meisyal" +date: 2021-04-05 12:00:00 +0000 +tags: security +lang: id +--- + +Ada sebuah keretanan pembuatan direktori secara tidak sengaja pada pustaka +*tmpdir* yang di-*bundle* dengan Ruby di Windows. Selain itu, ada juga +kerentanan pembuatan berkas secara tidak sengaja pada pustaka *tempfile* yang +di-*bundle* dengan Ruby di Windows. Kerentanan ini telah ditetapkan sebagai +penanda [CVE-2021-28966](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-28966). + +## Detail + +*Method* `Dir.mktmpdir` yang dikenalkan oleh pustaka *tmpdir* menerima prefiks +dan sufiks dari direktori yang akan dibuat pada parameter pertama. Prefiks dapat +berisi penentu direktori relatif `"..\\"`, sehingga *method* ini dapat +digunakan untuk mengarahkan ke direktori manapun. Jika sebuah *script* menerima +masukan dari luar sebagai prefiks dan sasaran direktori tidak memiliki izin +semestinya atau Ruby tidak memiliki hak akses, penyerang dapat membuat +sebuah direktori atau berkas pada direktori manapun. + +Ini adalah isu yang sama pada [CVE-2018-6914](https://www.ruby-lang.org/id/news/2018/03/28/unintentional-file-and-directory-creation-with-directory-traversal-cve-2018-6914/), tetapi perbaikan +sebelumnya belum mencakup Windows. + +Semua pengguna yang terimbas dengan rilis seharusnya memperbarui segera. + +## Versi terimbas + +* Ruby 2.7.2 atau sebelumnya +* Ruby 3.0.0 + +## Rujukan + +Terima kasih kepada [Bugdiscloseguys](https://hackerone.com/bugdiscloseguys) +yang telah menemukan isu ini. + +## Riwayat + +* Semula dipublikasikan pada 2021-04-05 12:00:00 (UTC) From e0ad42b4d86c3e95cc8bf65fd0b4f9bde512d493 Mon Sep 17 00:00:00 2001 From: OKURA Masafumi Date: Mon, 25 Oct 2021 14:55:51 +0900 Subject: [PATCH 0425/1487] Add `Slack` section to ja We mention Discord community in en page, so I think it's fine to mention Slack community. Modifying the expression is welcome. --- ja/community/index.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ja/community/index.md b/ja/community/index.md index c26e7feab4..51e8626994 100644 --- a/ja/community/index.md +++ b/ja/community/index.md @@ -40,6 +40,10 @@ Rubyコミュニティに興味があるのなら、ぜひ以下のコミュニ * Libera Chatの[#ruby](https://web.libera.chat/#ruby) * Rubyの利用者の交流、質問のためのチャンネルです。(英語) +## Slack + +* Slack上には[ruby-jp](https://ruby-jp.github.io/)コミュニティがあります。3000人を超えるユーザーと100を超えるチャンネルが存在し、初歩的な質問からCRubyについての高度な質問まで、多種多様な質問と回答が飛び交っています。 + ## メーリングリスト * [メーリングリスト](/ja/community/mailing-lists/) のページを参照してください。 From eb12cdb2bec96f72228728778a0cee19edea5a32 Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Mon, 25 Oct 2021 23:34:17 +0700 Subject: [PATCH 0426/1487] Translate Ruby 3.0.1 released news (id) --- .../_posts/2021-04-05-ruby-3-0-1-released.md | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 id/news/_posts/2021-04-05-ruby-3-0-1-released.md diff --git a/id/news/_posts/2021-04-05-ruby-3-0-1-released.md b/id/news/_posts/2021-04-05-ruby-3-0-1-released.md new file mode 100644 index 0000000000..282f9a5822 --- /dev/null +++ b/id/news/_posts/2021-04-05-ruby-3-0-1-released.md @@ -0,0 +1,49 @@ +--- +layout: news_post +title: "Ruby 3.0.1 Dirilis" +author: "naruse" +translator: "meisyal" +date: 2021-04-05 12:00:00 +0000 +lang: id +--- + +Ruby 3.0.1 telah dirilis. + +Rilis ini memuat perbaikan keamanan. +Mohon cek topik-topik di bawah ini untuk lebih detail. + +* [CVE-2021-28965: Kerentanan XML round-trip pada REXML]({% link id/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md %}) +* [CVE-2021-28966: Path traversal in Tempfile on Windows]({% link en/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md %}) + +Lihat [commit logs](https://github.com/ruby/ruby/compare/v3_0_0...v3_0_1) +untuk detail. + +## Unduh + +{% assign release = site.data.releases | where: "version", "3.0.1" | first %} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Komentar Rilis + +Banyak *committer*, pengembang, dan pengguna yang menyediakan laporan *bug* +telah membantu kami membuat rilis ini. Terima kasih atas kontribusinya. From d81b47c8261ec7aa1ce81acc1f48c0225384d402 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 26 Oct 2021 12:48:58 +0900 Subject: [PATCH 0427/1487] Fixed markdown style and Removed trailing whitespaces --- en/community/user-groups/index.md | 4 +--- zh_tw/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/en/community/user-groups/index.md b/en/community/user-groups/index.md index b6b610d497..fb346e14d0 100644 --- a/en/community/user-groups/index.md +++ b/en/community/user-groups/index.md @@ -31,7 +31,7 @@ Information about Ruby user groups can be found on various websites: : A number of user groups can also be found at OnRuby. OnRuby is an open source platform written in Ruby that can be used to organize meetups. It is available on [GitHub][3]. - + ### Organizing Your Own Group If you are interested in forming your own group, be sure to find out if @@ -39,8 +39,6 @@ there is already a Ruby user group in your area. Larger meetings are usually much more fun, so starting your own group may not be the best option if there is already one nearby. - - [1]: https://ruby.meetup.com [2]: https://www.onruby.eu/ [3]: https://github.com/phoet/on_ruby diff --git a/zh_tw/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md b/zh_tw/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md index 0dfe1bbb6b..2e8a9ac8eb 100644 --- a/zh_tw/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md +++ b/zh_tw/news/_posts/2020-04-05-support-of-ruby-2-4-has-ended.md @@ -12,10 +12,10 @@ Ruby 2.4 系列的官方支持終了期間之宣布。 昨年 4 月以來的 1 年間、Ruby 2.4系列處於安全維護期。正如先前所宣布的,官方支持將於2020年3月31日結束。 之後,有簡單的錯誤修復或者即使發現安全問題,也不會針對Ruby 2.4系列發布新版本。 -2020年3月31日,Ruby 2.4系列的最終版本2.4.10發布,這只是為了讓使用者更有時間轉移到較新的版本系列。 +2020年3月31日,Ruby 2.4系列的最終版本2.4.10發布,這只是為了讓使用者更有時間轉移到較新的版本系列。 如果您當前正在使用Ruby 2.4系列,請盡快轉換到較新的版本系列。 -##關於當前支持的版本系列 +## 關於當前支持的版本系列 ### Ruby 2.7系列 From dcf83f9163a8966c43c7382cd90d3b9b63a36d0f Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 26 Oct 2021 12:55:13 +0900 Subject: [PATCH 0428/1487] Bump Ruby version to 2.7.4 --- Gemfile | 2 +- Gemfile.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 43685579d2..945407efd2 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source "https://rubygems.org" -ruby "~> 2.7.2" +ruby "~> 2.7.4" gem "rake" gem "jekyll", "~> 4.0" diff --git a/Gemfile.lock b/Gemfile.lock index ad1dd77348..2274054e6c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -114,7 +114,7 @@ DEPENDENCIES validate-website (~> 1.6) RUBY VERSION - ruby 2.7.2p137 + ruby 2.7.4p191 BUNDLED WITH 2.1.4 From 8f1aee23f6905e2aeb7e71e37a7649a5a7ea5070 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 26 Oct 2021 13:10:26 +0900 Subject: [PATCH 0429/1487] update bundles --- Gemfile.lock | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2274054e6c..cd9f3c69bd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,18 +4,18 @@ GEM addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) colorator (1.1.0) - concurrent-ruby (1.1.7) + concurrent-ruby (1.1.9) crass (1.0.6) em-websocket (0.5.2) eventmachine (>= 0.12.9) http_parser.rb (~> 0.6.0) eventmachine (1.2.7) - ffi (1.14.2) + ffi (1.15.4) forwardable-extended (2.6.0) http_parser.rb (0.6.0) - i18n (1.8.5) + i18n (1.8.10) concurrent-ruby (~> 1.0) - jekyll (4.2.0) + jekyll (4.2.1) addressable (~> 2.4) colorator (~> 1.0) em-websocket (~> 0.5) @@ -34,8 +34,8 @@ GEM sassc (> 2.0.1, < 3.0) jekyll-watch (2.2.1) listen (~> 3.0) - json (2.5.1) - kgio (2.11.3) + json (2.6.1) + kgio (2.11.4) kramdown (2.3.1) rexml kramdown-parser-gfm (1.1.0) @@ -44,58 +44,63 @@ GEM jekyll (>= 2.0) rack (>= 1.6, < 3.0) liquid (4.0.3) - listen (3.3.3) + listen (3.7.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.4.0) mini_portile2 (2.6.1) - minitest (5.14.2) + minitest (5.14.4) nokogiri (1.12.5) mini_portile2 (~> 2.6.1) racc (~> 1.4) + nokogumbo (2.0.5) + nokogiri (~> 1.8, >= 1.8.4) paint (2.2.1) pathutil (0.16.2) forwardable-extended (~> 2.6) public_suffix (4.0.6) - racc (1.5.2) + racc (1.6.0) rack (2.2.3) rack-protection (2.1.0) rack rack-rewrite (1.5.1) rack-ssl (1.4.1) rack - raindrops (0.19.1) - rake (13.0.3) - rb-fsevent (0.10.4) + raindrops (0.19.2) + rake (13.0.6) + rb-fsevent (0.11.0) rb-inotify (0.10.1) ffi (~> 1.0) rexml (3.2.5) - rouge (3.26.0) + rouge (3.26.1) safe_yaml (1.0.5) sassc (2.4.0) ffi (~> 1.9) - slop (4.8.2) + slop (4.9.1) spidr (0.6.1) nokogiri (~> 1.3) terminal-table (2.0.0) unicode-display_width (~> 1.1, >= 1.1.1) tidy_ffi (1.0.1) ffi (~> 1.2) - unicode-display_width (1.7.0) - unicorn (5.8.0) + unicode-display_width (1.8.0) + unicorn (6.0.0) kgio (~> 2.6) raindrops (~> 0.7) - validate-website (1.10.0) + validate-website (1.11.1) crass (~> 1) + nokogumbo (~> 2.0) paint (~> 2) slop (~> 4.6) spidr (~> 0.6) tidy_ffi (~> 1.0) w3c_validators (~> 1.3) + webrick (~> 1) w3c_validators (1.3.6) json (>= 1.8) nokogiri (~> 1.6) rexml (~> 3.2) + webrick (1.7.0) PLATFORMS ruby From 41d8abca5dfd1a2dbd578c47796740cd5cf7c24e Mon Sep 17 00:00:00 2001 From: vurtn Date: Tue, 26 Oct 2021 08:56:52 +0200 Subject: [PATCH 0430/1487] Translate from Jul to Aug 2021 (fr) --- .../_posts/2021-04-05-ruby-2-5-9-released.md | 2 +- .../_posts/2021-04-05-ruby-2-6-7-released.md | 4 +- .../_posts/2021-04-05-ruby-2-7-3-released.md | 2 +- .../_posts/2021-04-05-ruby-3-0-1-released.md | 2 +- ...ath-traversal-on-windows-cve-2021-28966.md | 4 +- ...p-vulnerability-in-rexml-cve-2021-28965.md | 4 +- ...2021-05-02-os-command-injection-in-rdoc.md | 2 +- .../_posts/2021-07-07-ruby-2-6-8-released.md | 59 +++++++++++++++++++ .../_posts/2021-07-07-ruby-2-7-4-released.md | 57 ++++++++++++++++++ .../_posts/2021-07-07-ruby-3-0-2-released.md | 48 +++++++++++++++ ...21-07-07-starttls-stripping-in-net-imap.md | 33 +++++++++++ ...7-07-trusting-pasv-responses-in-net-ftp.md | 33 +++++++++++ .../2021-08-03-fukuoka-ruby-award-2022.md | 32 ++++++++++ 13 files changed, 272 insertions(+), 10 deletions(-) create mode 100644 fr/news/_posts/2021-07-07-ruby-2-6-8-released.md create mode 100644 fr/news/_posts/2021-07-07-ruby-2-7-4-released.md create mode 100644 fr/news/_posts/2021-07-07-ruby-3-0-2-released.md create mode 100644 fr/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md create mode 100644 fr/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md create mode 100644 fr/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md diff --git a/fr/news/_posts/2021-04-05-ruby-2-5-9-released.md b/fr/news/_posts/2021-04-05-ruby-2-5-9-released.md index 945c6db0ec..f560198b7e 100644 --- a/fr/news/_posts/2021-04-05-ruby-2-5-9-released.md +++ b/fr/news/_posts/2021-04-05-ruby-2-5-9-released.md @@ -2,7 +2,7 @@ layout: news_post title: "Ruby 2.5.9 est disponible" author: "usa" -translator: "Manaleak2d" +translator: "Kevin Rosaz" date: 2021-04-05 12:00:00 +0000 lang: fr --- diff --git a/fr/news/_posts/2021-04-05-ruby-2-6-7-released.md b/fr/news/_posts/2021-04-05-ruby-2-6-7-released.md index 6c5d6f6659..b14bbaffb3 100644 --- a/fr/news/_posts/2021-04-05-ruby-2-6-7-released.md +++ b/fr/news/_posts/2021-04-05-ruby-2-6-7-released.md @@ -2,7 +2,7 @@ layout: news_post title: "Ruby 2.6.7 est disponible" author: "usa" -translator: "Manaleak2d" +translator: "Kevin Rosaz" date: 2021-04-05 12:00:00 +0000 lang: fr --- @@ -20,7 +20,7 @@ Voir les [logs de commit](https://github.com/ruby/ruby/compare/v2_6_6...v2_6_7) A partir de cette version, nous terminons la phase de maintenance standard de la branche 2.6 et entrons dans la phase de maintenance de sécurité. Cela signifie qu'il n'y aura plus de _backports_ de correctifs pour Ruby 2.6 sauf pour ceux concernant la sécurité. Cette phase de maintenance réduite se terminera dans un an. La branche 2.6 de Ruby ne sera alors plus officiellement supportée. -Nous vous recommandons donc passer vers Ruby 2.7 ou 3.0. +Nous vous recommandons donc de passer vers Ruby 2.7 ou 3.0. ## Téléchargement diff --git a/fr/news/_posts/2021-04-05-ruby-2-7-3-released.md b/fr/news/_posts/2021-04-05-ruby-2-7-3-released.md index 7ff88a2073..f02e19a499 100644 --- a/fr/news/_posts/2021-04-05-ruby-2-7-3-released.md +++ b/fr/news/_posts/2021-04-05-ruby-2-7-3-released.md @@ -2,7 +2,7 @@ layout: news_post title: "Ruby 2.7.3 est disponible" author: "nagachika" -translator: "Manaleak2d" +translator: "Kevin Rosaz" date: 2021-04-05 12:00:00 +0000 lang: fr --- diff --git a/fr/news/_posts/2021-04-05-ruby-3-0-1-released.md b/fr/news/_posts/2021-04-05-ruby-3-0-1-released.md index f0121a2917..9865d8d46d 100644 --- a/fr/news/_posts/2021-04-05-ruby-3-0-1-released.md +++ b/fr/news/_posts/2021-04-05-ruby-3-0-1-released.md @@ -2,7 +2,7 @@ layout: news_post title: "Ruby 3.0.1 est disponible" author: "naruse" -translator: "Manaleak2d" +translator: "Kevin Rosaz" date: 2021-04-05 12:00:00 +0000 lang: fr --- diff --git a/fr/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md b/fr/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md index e65cecd177..70ede1cf1b 100644 --- a/fr/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md +++ b/fr/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md @@ -2,7 +2,7 @@ layout: news_post title: "CVE-2021-28966: Path traversal dans Tempfile sur Windows" author: "mame" -translator: "Manaleak2d" +translator: "Kevin Rosaz" date: 2021-04-05 12:00:00 +0000 tags: security lang: fr @@ -23,7 +23,7 @@ Tous les utilisateurs qui possède une version concernée devraient faire la mis - Ruby 2.7.2 ou inférieure - Ruby 3.0.0 -## Crédits +## Remerciements Merci à [Bugdiscloseguys](https://hackerone.com/bugdiscloseguys) pour la découverte de ce problème. diff --git a/fr/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md b/fr/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md index 2f29eeeffb..f1b84c3db5 100644 --- a/fr/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md +++ b/fr/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md @@ -2,7 +2,7 @@ layout: news_post title: "CVE-2021-28965: Vulnérabilité XML round-trip dans REXML" author: "mame" -translator: "Manaleak2d" +translator: "Kevin Rosaz" date: 2021-04-05 12:00:00 +0000 tags: security lang: fr @@ -35,7 +35,7 @@ Si vous utilisez Ruby 2.5.8 ou inférieure : - Ruby 3.0.1 ou inférieure - REXML gem 3.2.4 ou inférieure -## Crédits +## Remerciements Merci à [Juho Nurminen](https://hackerone.com/jupenur) pour la découverte de ce problème. diff --git a/fr/news/_posts/2021-05-02-os-command-injection-in-rdoc.md b/fr/news/_posts/2021-05-02-os-command-injection-in-rdoc.md index 68fde7fa64..7a0e46f25c 100644 --- a/fr/news/_posts/2021-05-02-os-command-injection-in-rdoc.md +++ b/fr/news/_posts/2021-05-02-os-command-injection-in-rdoc.md @@ -2,7 +2,7 @@ layout: news_post title: "CVE-2021-31799: Faille d'injection de commandes dans RDoc" author: "aycabta" -translator: "Manaleak2d" +translator: "Kevin Rosaz" date: 2021-05-02 09:00:00 +0000 tags: security lang: fr diff --git a/fr/news/_posts/2021-07-07-ruby-2-6-8-released.md b/fr/news/_posts/2021-07-07-ruby-2-6-8-released.md new file mode 100644 index 0000000000..08eefc0918 --- /dev/null +++ b/fr/news/_posts/2021-07-07-ruby-2-6-8-released.md @@ -0,0 +1,59 @@ +--- +layout: news_post +title: "Ruby 2.6.8 est disponible" +author: "usa" +translator: "Kevin Rosaz" +date: 2021-07-07 09:00:00 +0000 +lang: fr +--- +Ruby 2.6.8 est disponible. + +Cette version contient des correctifs concernant des problèmes de sécurité. +Merci de regarder les sujets suivants pour plus de détails. + +* [CVE-2021-31810: Une vulnérabilité concernant la confiance des réponses FTP PASV dans Net::FTP]({%link fr/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) +* [CVE-2021-32066: Une vulnérabilité StartTLS stripping dans Net::IMAP]({%link fr/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) +* [CVE-2021-31799: Faille d'injection de commandes dans RDoc]({%link fr/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) + +En règle générale, nous ne mettons pas à jour Ruby 2.6 à l'exception des correctifs de sécurité. Néanmoins, cette version inclut également la résolution de bugs de régression et de build. +Voir les [logs de commit](https://github.com/ruby/ruby/compare/v2_6_7...v2_6_8) pour de plus amples informations. + +Ruby 2.6 est désormais dans la phase de maintenance de sécurité jusqu'à la fin mars 2022. +Après cette date, la maintenance de Ruby 2.6 sera terminée. +Nous vous recommandons donc de passer vers Ruby 2.7 ou 3.0. + +## Téléchargement + +{% assign release = site.data.releases | where: "version", "2.6.8" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Commentaire de version + +Merci aux contributeurs, développeurs et utilisateurs qui, en reportant les bugs, nous ont permis de faire cette version. \ No newline at end of file diff --git a/fr/news/_posts/2021-07-07-ruby-2-7-4-released.md b/fr/news/_posts/2021-07-07-ruby-2-7-4-released.md new file mode 100644 index 0000000000..8f425a43ca --- /dev/null +++ b/fr/news/_posts/2021-07-07-ruby-2-7-4-released.md @@ -0,0 +1,57 @@ +--- +layout: news_post +title: "Ruby 2.7.4 est disponible" +author: "usa" +translator: "Kevin Rosaz" +date: 2021-07-07 09:00:00 +0000 +lang: fr +--- + +Ruby 2.7.4 est disponible. + +Cette version contient des correctifs concernant des problèmes de sécurité. +Merci de regarder les sujets suivants pour plus de détails. + +* [CVE-2021-31810: Une vulnérabilité concernant la confiance des réponses FTP PASV dans Net::FTP]({%link fr/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) +* [CVE-2021-32066: Une vulnérabilité StartTLS stripping dans Net::IMAP]({%link fr/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) +* [CVE-2021-31799: Faille d'injection de commandes dans RDoc]({%link fr/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) + +Voir les [logs de commit](https://github.com/ruby/ruby/compare/v2_7_3...v2_7_4) pour de plus amples informations. + +## Téléchargement + +{% assign release = site.data.releases | where: "version", "2.7.4" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Commentaire de version + +Merci aux contributeurs, développeurs et utilisateurs qui, en reportant les bugs, nous ont permis de faire cette version. + +Le support de la branche 2.7 est documenté et encadré par le document *Agreement for the Ruby stable version* publié par la Ruby Association. \ No newline at end of file diff --git a/fr/news/_posts/2021-07-07-ruby-3-0-2-released.md b/fr/news/_posts/2021-07-07-ruby-3-0-2-released.md new file mode 100644 index 0000000000..5b4c46fa5e --- /dev/null +++ b/fr/news/_posts/2021-07-07-ruby-3-0-2-released.md @@ -0,0 +1,48 @@ +--- +layout: news_post +title: "Ruby 3.0.2 est disponible" +author: "nagachika" +translator: "Kevin Rosaz" +date: 2021-07-07 09:00:00 +0000 +lang: fr +--- + +Ruby 3.0.2 est disponible. + +Cette version contient des correctifs concernant des problèmes de sécurité. +Merci de regarder les sujets suivants pour plus de détails. + +* [CVE-2021-31810: Une vulnérabilité concernant la confiance des réponses FTP PASV dans Net::FTP]({%link fr/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) +* [CVE-2021-32066: Une vulnérabilité StartTLS stripping dans Net::IMAP]({%link fr/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) +* [CVE-2021-31799: Faille d'injection de commandes dans RDoc]({%link fr/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) + +Voir les [logs de commit](https://github.com/ruby/ruby/compare/v3_0_1...v3_0_2) pour de plus amples informations. + +## Téléchargement + +{% assign release = site.data.releases | where: "version", "3.0.2" | first %} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Commentaire de version + +Merci aux contributeurs, développeurs et utilisateurs qui, en reportant les bugs, nous ont permis de faire cette version. \ No newline at end of file diff --git a/fr/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md b/fr/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md new file mode 100644 index 0000000000..09bbe43b9f --- /dev/null +++ b/fr/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md @@ -0,0 +1,33 @@ +--- +layout: news_post +title: "CVE-2021-32066: Une vulnérabilité StartTLS stripping dans Net::IMAP" +author: "shugo" +translator: "Kevin Rosaz" +date: 2021-07-07 09:00:00 +0000 +tags: security +lang: fr +--- + +Une vulnérabilité StartTLS stripping a été découverte dans Net::IMAP. +Cette vulnérabilité possède l'identifiant CVE [CVE-2021-32066](https://nvd.nist.gov/vuln/detail/CVE-2021-32066). +Nous vous recommandons fortement de mettre à jour Ruby. + +net-imap est une gemme incluse par défaut dans Ruby 3.0.1, mais a un problème d'empaquetage. Veuillez donc mettre à jour Ruby lui-même. + +## Détails + +Net::IMAP ne lève pas d'exception lorsque StartTLS échoue avec une réponse inconnue. Cela pourrait permettre à des attaques de type man-in-the-middle de contourner les protections de TLS en se positionnant entre le client et le registre pour bloquer la commande StartTLS, alias une attaque par "StartTLS stripping". + +## Versions concernées + +* Toutes les versions de Ruby 2.6 antérieures à Ruby 2.6.7 +* Toutes les versions de Ruby 2.7 antérieures à Ruby 2.7.3 +* Toutes les versions de Ruby 3.0 antérieures à Ruby 3.0.1 + +## Remerciements + +Merci à [Alexandr Savca](https://hackerone.com/chinarulezzz) pour la découverte de ce problème. + +## Historique + +* Paru initialement le 2021-07-07 09:00:00 UTC diff --git a/fr/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md b/fr/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md new file mode 100644 index 0000000000..fa2af0a512 --- /dev/null +++ b/fr/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md @@ -0,0 +1,33 @@ +--- +layout: news_post +title: "CVE-2021-31810: Une vulnérabilité concernant la confiance des réponses FTP PASV dans Net::FTP" +author: "shugo" +translator: "Kevin Rosaz" +date: 2021-07-07 09:00:00 +0000 +tags: security +lang: fr +--- + +Une vulnérabilité concernant la confiance des réponses FTP PASV a été découverte dans Net::FTP. +Cette vulnérabilité possède l'identifiant CVE [CVE-2021-31810](https://nvd.nist.gov/vuln/detail/CVE-2021-31810). +Nous vous recommandons fortement de mettre à jour Ruby. + +net-ftp est une gemme incluse par défaut dans Ruby 3.0.1, mais a un problème d'empaquetage. Veuillez donc mettre à jour Ruby lui-même. + +## Détails + +Un serveur FTP malveillant peut utiliser la réponse PASV pour tromper Net::FTP afin qu'il se reconnecte à une adresse IP et port donnés. Cela permet potentiellement à Net::FTP de récupérer des informations sur des services qui sont par ailleurs privés et non divulgués (par exemple, l'attaquant peut effectuer des analyses de ports et récupérer les bannières de services). + +## Versions concernées + +* Toutes les versions de Ruby 2.6 antérieures à Ruby 2.6.7 +* Toutes les versions de Ruby 2.7 antérieures à Ruby 2.7.3 +* Toutes les versions de Ruby 3.0 antérieures à Ruby 3.0.1 + +## Remerciements + +Merci à [Alexandr Savca](https://hackerone.com/chinarulezzz) pour la découverte de ce problème. + +## Historique + +* Paru initialement le 2021-07-07 09:00:00 UTC diff --git a/fr/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md b/fr/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md new file mode 100644 index 0000000000..0fa8054067 --- /dev/null +++ b/fr/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md @@ -0,0 +1,32 @@ +--- +layout: news_post +title: "Concours 2022 Fukuoka Ruby Award - Les candidatures seront jugées par Matz" +author: "Fukuoka Ruby" +translator: "Kevin Rosaz" +date: 2021-08-03 00:00:00 +0000 +lang: fr +--- + +Chers passionnés de Ruby, + +Le gouvernement de Fukuoka au Japon et « Matz » Matsumoto aimeraient vous inviter à participer au concours Ruby suivant. Si vous avez développé un programme Ruby intéressant, vous êtes encouragés à postuler. + +Concours 2022 Fukuoka Ruby Award - Grand Prix - 1 Million de Yens! + +Date limite d'inscription : 3 décembre 2021 + +![Fukuoka Ruby Award](https://www.digitalfukuoka.jp/javascripts/kcfinder/upload/images/fukuokarubyaward2017.png) + +Matz et un groupe de panélistes sélectionneront les gagnants du concours de Fukuoka. Le grand prix du concours de Fukuoka est de 1 million de yens. Les anciens gagnants du grand prix sont Rhomobile (États-Unis) et APEC Climate Center (Corée). + +Les programmes inscrits au concours n'ont pas à être entièrement écrits en Ruby, mais doivent tirer parti des caractéristiques uniques de Ruby. + +Le programme doit avoir été développé ou mis à jour au cours de l'année passée. Veuillez visiter le site Web de Fukuoka suivant pour participer. + +[http://www.digitalfukuoka.jp/events/242](http://www.digitalfukuoka.jp/events/242) + +Veuillez envoyer le formulaire de candidature à award@f-ruby.com + +« Matz testera et révisera votre code source de manière approfondie, il est donc très intéressant de postuler ! Le concours est gratuit. » + +Merci! \ No newline at end of file From 45b03a82f61eb00c95ad1fe30395957d96605e7e Mon Sep 17 00:00:00 2001 From: vurtn Date: Tue, 26 Oct 2021 09:17:50 +0200 Subject: [PATCH 0431/1487] remove trailing whitespace and add newline at end of files --- fr/news/_posts/2021-07-07-ruby-2-6-8-released.md | 2 +- fr/news/_posts/2021-07-07-ruby-2-7-4-released.md | 2 +- fr/news/_posts/2021-07-07-ruby-3-0-2-released.md | 2 +- fr/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md | 6 +++--- .../_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md | 6 +++--- fr/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/fr/news/_posts/2021-07-07-ruby-2-6-8-released.md b/fr/news/_posts/2021-07-07-ruby-2-6-8-released.md index 08eefc0918..d798a9db12 100644 --- a/fr/news/_posts/2021-07-07-ruby-2-6-8-released.md +++ b/fr/news/_posts/2021-07-07-ruby-2-6-8-released.md @@ -56,4 +56,4 @@ Nous vous recommandons donc de passer vers Ruby 2.7 ou 3.0. ## Commentaire de version -Merci aux contributeurs, développeurs et utilisateurs qui, en reportant les bugs, nous ont permis de faire cette version. \ No newline at end of file +Merci aux contributeurs, développeurs et utilisateurs qui, en reportant les bugs, nous ont permis de faire cette version. diff --git a/fr/news/_posts/2021-07-07-ruby-2-7-4-released.md b/fr/news/_posts/2021-07-07-ruby-2-7-4-released.md index 8f425a43ca..2f06161b78 100644 --- a/fr/news/_posts/2021-07-07-ruby-2-7-4-released.md +++ b/fr/news/_posts/2021-07-07-ruby-2-7-4-released.md @@ -54,4 +54,4 @@ Voir les [logs de commit](https://github.com/ruby/ruby/compare/v2_7_3...v2_7_4) Merci aux contributeurs, développeurs et utilisateurs qui, en reportant les bugs, nous ont permis de faire cette version. -Le support de la branche 2.7 est documenté et encadré par le document *Agreement for the Ruby stable version* publié par la Ruby Association. \ No newline at end of file +Le support de la branche 2.7 est documenté et encadré par le document *Agreement for the Ruby stable version* publié par la Ruby Association. diff --git a/fr/news/_posts/2021-07-07-ruby-3-0-2-released.md b/fr/news/_posts/2021-07-07-ruby-3-0-2-released.md index 5b4c46fa5e..b6753fc1d4 100644 --- a/fr/news/_posts/2021-07-07-ruby-3-0-2-released.md +++ b/fr/news/_posts/2021-07-07-ruby-3-0-2-released.md @@ -45,4 +45,4 @@ Voir les [logs de commit](https://github.com/ruby/ruby/compare/v3_0_1...v3_0_2) ## Commentaire de version -Merci aux contributeurs, développeurs et utilisateurs qui, en reportant les bugs, nous ont permis de faire cette version. \ No newline at end of file +Merci aux contributeurs, développeurs et utilisateurs qui, en reportant les bugs, nous ont permis de faire cette version. diff --git a/fr/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md b/fr/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md index 09bbe43b9f..8574b3db89 100644 --- a/fr/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md +++ b/fr/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md @@ -20,9 +20,9 @@ Net::IMAP ne lève pas d'exception lorsque StartTLS échoue avec une réponse in ## Versions concernées -* Toutes les versions de Ruby 2.6 antérieures à Ruby 2.6.7 -* Toutes les versions de Ruby 2.7 antérieures à Ruby 2.7.3 -* Toutes les versions de Ruby 3.0 antérieures à Ruby 3.0.1 +* Toutes les versions de Ruby 2.6 antérieures à Ruby 2.6.7 +* Toutes les versions de Ruby 2.7 antérieures à Ruby 2.7.3 +* Toutes les versions de Ruby 3.0 antérieures à Ruby 3.0.1 ## Remerciements diff --git a/fr/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md b/fr/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md index fa2af0a512..4e3d446bf8 100644 --- a/fr/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md +++ b/fr/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md @@ -20,9 +20,9 @@ Un serveur FTP malveillant peut utiliser la réponse PASV pour tromper Net::FTP ## Versions concernées -* Toutes les versions de Ruby 2.6 antérieures à Ruby 2.6.7 -* Toutes les versions de Ruby 2.7 antérieures à Ruby 2.7.3 -* Toutes les versions de Ruby 3.0 antérieures à Ruby 3.0.1 +* Toutes les versions de Ruby 2.6 antérieures à Ruby 2.6.7 +* Toutes les versions de Ruby 2.7 antérieures à Ruby 2.7.3 +* Toutes les versions de Ruby 3.0 antérieures à Ruby 3.0.1 ## Remerciements diff --git a/fr/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md b/fr/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md index 0fa8054067..5cfd9c11f3 100644 --- a/fr/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md +++ b/fr/news/_posts/2021-08-03-fukuoka-ruby-award-2022.md @@ -11,7 +11,7 @@ Chers passionnés de Ruby, Le gouvernement de Fukuoka au Japon et « Matz » Matsumoto aimeraient vous inviter à participer au concours Ruby suivant. Si vous avez développé un programme Ruby intéressant, vous êtes encouragés à postuler. -Concours 2022 Fukuoka Ruby Award - Grand Prix - 1 Million de Yens! +Concours 2022 Fukuoka Ruby Award - Grand Prix - 1 Million de Yens ! Date limite d'inscription : 3 décembre 2021 @@ -29,4 +29,4 @@ Veuillez envoyer le formulaire de candidature à award@f-ruby.com « Matz testera et révisera votre code source de manière approfondie, il est donc très intéressant de postuler ! Le concours est gratuit. » -Merci! \ No newline at end of file +Merci ! From c25ca4f4adfb76a746583ba1f10c124e13c6981d Mon Sep 17 00:00:00 2001 From: Alejandra Cernas Date: Wed, 27 Oct 2021 04:34:59 -0500 Subject: [PATCH 0432/1487] add es/community/ruby-core (#2708) * add es/community/ruby-core * Remove blank line at the end of the file * Attend pr comments --- es/community/ruby-core/index.md | 136 ++++++++++++++++++ .../ruby-core/writing-patches/index.md | 47 ++++++ 2 files changed, 183 insertions(+) create mode 100644 es/community/ruby-core/index.md create mode 100644 es/community/ruby-core/writing-patches/index.md diff --git a/es/community/ruby-core/index.md b/es/community/ruby-core/index.md new file mode 100644 index 0000000000..bde8701826 --- /dev/null +++ b/es/community/ruby-core/index.md @@ -0,0 +1,136 @@ +--- +layout: page +title: "Ruby Core" +lang: es +--- + +Ahora es un momento fantástico para seguir el desarrollo de Ruby. +Con la mayor atención que Ruby ha recibido en los últimos años, +existe una creciente necesidad de buenos talentos para ayudar a mejorar Ruby +y documentar sus partes. Entonces, ¿por dónde empezar? +{: .summary} + +Los temas relacionados con el desarrollo de Ruby que se tratan aquí son: + +* [Usando Git para rastrear el desarrollo de Ruby](#following-ruby) +* [Mejorando Ruby, Parche por Parche](#patching-ruby) +* [Nota sobre las ramas](#branches-ruby) + +### Usando Git para rastrear el desarrollo de Ruby +{: #following-ruby} + +El repositorio principal actual del último código fuente de Ruby es +[git.ruby-lang.org/ruby.git][gitrlo]. +También existe un repositorio [espejo en GitHub][7]. En lo general, usa el +repositorio espejo, por favor. + +Puedes obtener el último código fuente de Ruby usando Git. +Desde tu línea de comandos: + +{% highlight sh %} +$ git clone https://github.com/ruby/ruby.git +{% endhighlight %} + +El directorio `ruby` ahora contendrá el último código fuente +para la versión de desarrollo de Ruby (ruby-trunk). + +Vease también [Cómo unirse a nuestro desarrollo como no contribuyente de código fuente][noncommitterhowto]. + +Si tienes permisos de contribución al código fuente y deseas empujar cambios, +deberías usar el repositorio principal. + +{% highlight sh %} +$ git clone git@git.ruby-lang.org:ruby.git +{% endhighlight %} + +### Mejorando Ruby, Parche por Parche +{: #patching-ruby} + +El equipo central mantiene un [rastreador de problemas][10] para enviar parches e +informes de errores a Matz y al grupo. Estos informes también se envían a +la [lista de distribución de Ruby-Core][mailing-lists] para discusión, +así que puedes estar seguro que tu petición no pasará desapercibida. +También puedes enviar tus parches directamente a la lista de +distribución. De cualquier manera, te invitamos a formar parte de las +discusiones siguientes. + +Consulta la [Guía del redactor de Parches][writing-patches] para obtener algunos consejos, +directamente de Matz, sobre cómo hacer que tus parches sean considerados. + +En resumen, los pasos para crear un parche son: + +1. Consulta una copia del código fuente de Ruby de GitHub. + Por lo general, los parches para la corrección de errores + o las nuevas funciones deben enviarse al tronco de la fuente de Ruby. + + $ git clone https://github.com/ruby/ruby.git + + Si estás solucionando un error que es específico de una sola rama de mantenimiento, + revisa una copia de la rama respectiva. + + $ git checkout ruby_X_X + + X_X debe ser reemplazado por la versión que desees revisar. + +2. Agrega tus mejoras al código. + +3. Crea un parche. + + $ git diff > ruby-changes.patch + +4. Crea un ticket en el [rastreador de problemas][10] o envía tu parche + a la [lista de distribución de Ruby-Core][mailing-lists] con un registro de ChangeLog + describiendo tu parche. + +5. Si no surgen problemas sobre el parche, los contribuyentes darán + la aprobación para aplicarlo. + +**Por favor ten en cuenta:** los parches deben enviarse como una [diferencia unificada][12]. +Para obtener más información sobre cómo se fusionan los parches, consulta [la referencia de diffutils][13]. + +La discusión sobre el desarrollo de Ruby converge en la +[Lista de distribución de Ruby-Core][mailing-lists]. Entonces, si tienes curiosidad +sobre si tu parche vale la pena o si deseas iniciar una discusión +sobre el futuro de Ruby, no dudes en subir a bordo. +Ten presente que las discusiones fuera de tema no se toleran en esta lista, +el nivel de ruido debe ser muy bajo, los temas deben ser puntuales, bien concebidos y +bien escritos. Ya que nos dirigimos al creador de Ruby, tengamos un poco de reverencia. + +Ten en cuenta que muchos de los desarrolladores principales de Ruby viven en Japón y, aunque muchos +hablan muy bien inglés, hay una diferencia de zona horaria significativa. +También tienen un cuerpo completo de listas de desarrollo japonesas sucediendo +junto a las contrapartes inglesas. Se paciente, +si tu petición no se resuelve, se persistente, inténtalo de nuevo unos días más tarde. + + +### Nota sobre las ramas +{: #branches-ruby} + +El código fuente de Ruby se había gestionado en el repositorio de Subversion hasta el 22 de abril de 2019. +Por lo tanto, algunas ramas aún pueden administrarse bajo Subversion. +Puedes ver el repositorio de SVN. + +* [<URL:https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?root=ruby>][svn-viewvc] + +Sin embargo, no tienes que preocuparte por eso (a menos que seas un mantenedor de rama). +Puedes consultar las ramas en tu copia de trabajo de Git. +Por ejemplo, ejecuta el siguiente comando. + +{% highlight sh %} +$ git checkout ruby_X_X +{% endhighlight %} + +X_X debe ser reemplazado por la versión que desees revisar. + +Si deseas modificar las ramas, por favor, abre una incidencia en nuestro [rastreador de problemas][10]. +Ver también la siguiente sección. + +[gitrlo]: https://git.ruby-lang.org/ruby.git +[mailing-lists]: /es/community/mailing-lists/ +[writing-patches]: /es/community/ruby-core/writing-patches/ +[noncommitterhowto]: https://github.com/shyouhei/ruby/wiki/noncommitterhowto +[svn-viewvc]: https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?root=ruby +[7]: https://github.com/ruby/ruby +[10]: https://bugs.ruby-lang.org/ +[12]: http://www.gnu.org/software/diffutils/manual/html_node/Unified-Format.html +[13]: http://www.gnu.org/software/diffutils/manual/html_node/Merging-with-patch.html#Merging%20with%20patch diff --git a/es/community/ruby-core/writing-patches/index.md b/es/community/ruby-core/writing-patches/index.md new file mode 100644 index 0000000000..4652a7aa21 --- /dev/null +++ b/es/community/ruby-core/writing-patches/index.md @@ -0,0 +1,47 @@ +--- +layout: page +title: "Guía del redactor de Parches" +lang: es +--- +Sigue algunos consejos, directamente de Matz, sobre cómo hacer para que tus parches sean considerados. +{: .summary} + +Estas pautas fueron adoptadas de una [publicación hecha por Matz][ruby-core-post] +en la lista de distribución de Ruby-Core: + +* Implementa una modificación por parche + + Este es el mayor problema para la mayoría de los parches diferidos. Cuando tú + envias un parche que corrija varios errores (y agregue funciones) a la vez, + tenemos que separarlos antes de aplicarlos. Es una tarea bastante difícil para nosotros, + desarrolladores ocupados, por lo que este tipo de parches tiende a aplazarse. + Por favor, no envies parches grandes. + +* Agrega descripciones + + A veces, un simple parche no describe suficientemente el problema que soluciona. + Una mejor descripción (el problema que soluciona, las condiciones previas, la plataforma, etc.) + ayudaría a un parche a aplicarse más rápido. + +* Haz diff a la última revisión + + Es posible que tu problema se haya solucionado en la última revisión. O el código + podría ser totalmente diferente a estas alturas. Antes de enviar un parche, intenta recuperar + la última versión (la rama `trunk` para la última versión de desarrollo, + `{{ site.svn.stable.branch }}` para {{ site.svn.stable.version }}) + desde el repositorio de Subversion, por favor. + +* Usa `diff -u` + + Preferimos los parches de diferencias unificados de estilo `diff -u` a diferencia de `diff -c` + o cualquier otro estilo de parches. Son mucho más fáciles de revisar. + No envíes archivos modificados, no queremos hacer un diff por nosotros mismos. + +* Proporciona casos de prueba (opcional) + + Un parche que proporciona casos de prueba (preferiblemente un parche para `test/*/test_*.rb`) + nos ayudaría a comprender el parche y su intención. + +Podríamos pasar a un flujo de trabajo push/pull estilo Git en el futuro.. +Pero hasta entonces, seguir las pautas anteriores te ayudaría a evitar +una frustración. From 88c759625a890c2faf7b3eb51e579cb7f171788e Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 28 Oct 2021 21:23:40 +0900 Subject: [PATCH 0433/1487] Use Ruby 3.0 --- .github/workflows/ci.yml | 2 +- Gemfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4f59de335..50e5b601d6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - ruby: [2.7] + ruby: ["3.0"] os: [ubuntu-latest] fail-fast: false diff --git a/Gemfile b/Gemfile index 945407efd2..c274052fc9 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source "https://rubygems.org" -ruby "~> 2.7.4" +ruby "~> 3.0.2" gem "rake" gem "jekyll", "~> 4.0" From 0d2c01b1baad1b2912627257a84160ff023dbabe Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 28 Oct 2021 21:28:38 +0900 Subject: [PATCH 0434/1487] Update lockfile --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index cd9f3c69bd..ebfc7e5301 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -119,7 +119,7 @@ DEPENDENCIES validate-website (~> 1.6) RUBY VERSION - ruby 2.7.4p191 + ruby 3.0.2p107 BUNDLED WITH - 2.1.4 + 2.2.27 From fc6a499822d3996e2ee4cdca8951c588bf6b752a Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Sun, 3 Jan 2021 20:39:12 +0100 Subject: [PATCH 0435/1487] Add helper methods file_must_exist, file_wont_exist --- test/helper.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/helper.rb b/test/helper.rb index 1b0c531a72..21c2278f9e 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -37,3 +37,13 @@ def linter_output stdout end + +def file_must_exist(filename) + assert File.exist?(filename), + "Expected file `#{filename}' to exist." +end + +def file_wont_exist(filename) + assert !File.exist?(filename), + "Expected file `#{filename}' to not exist." +end From 40e9c365cf333dd684fd2b0f890eb931d96da2b1 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Sun, 3 Jan 2021 20:52:59 +0100 Subject: [PATCH 0436/1487] Add tests for news archives plugin Provide tests that check the used layouts for news archive pages. This targets issues like e.g. the one related to behavior changed with Jekyll 4.2.0, fixed in f29a3d5f33cbf7fc80a261fcc183682e3485dd1e. --- test/test_plugin_news.rb | 124 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 test/test_plugin_news.rb diff --git a/test/test_plugin_news.rb b/test/test_plugin_news.rb new file mode 100644 index 0000000000..bd961d5780 --- /dev/null +++ b/test/test_plugin_news.rb @@ -0,0 +1,124 @@ +# frozen_string_literal: true + +require "helper" + +require "jekyll" +require_relative "../_plugins/news" + + +describe NewsArchivePlugin do + + before do + chdir_tempdir + + content = <<~CONFIG + CONFIG + + create_file("source/_config.yml", content) + + content = <<~LOCALES + month_names: + - January + - February + + news: + recent_news: Recent News + yearly_archive_title: "%Y Archives" + monthly_archive_title: "%B %Y Archives" + yearly_archive_link: "%Y Archives" + monthly_archive_link: "%B %Y" + LOCALES + + create_file("source/_data/locales/en.yml", content) + + content = <<~LAYOUT + --- + layout: default + --- + NEWS LAYOUT + + {% for post in page.posts %} + {{ post.title }} + {% endfor %} + LAYOUT + + create_file("source/_layouts/news.html", content) + + content = <<~LAYOUT + --- + layout: default + --- + NEWS ARCHIVE YEAR LAYOUT + + {% for post in page.posts %} + {{ post.title }} + {% endfor %} + LAYOUT + + create_file("source/_layouts/news_archive_year.html", content) + + content = <<~LAYOUT + --- + layout: default + --- + NEWS ARCHIVE MONTH LAYOUT + + {% for post in page.posts %} + {{ post.title }} + {% endfor %} + LAYOUT + + create_file("source/_layouts/news_archive_month.html", content) + + content = <<~POST + --- + title: "Post Jan 2020" + author: "stomar" + date: 2020-01-01 12:00:00 +0000 + lang: en + --- + + Content + POST + + create_file("source/en/news/_posts/2020-01-01-post.md", content) + + config = Jekyll.configuration( + source: "source", + destination: "_site", + quiet: true + ) + site = Jekyll::Site.new(config) + + file_wont_exist("_site") + site.process + end + + after do + teardown_tempdir + end + + it "should create news page" do + file_must_exist("_site/en/news/index.html") + end + + it "should use the correct layout for news page" do + _(File.read("_site/en/news/index.html")).must_match "NEWS LAYOUT" + end + + it "should create news/2020 page" do + file_must_exist("_site/en/news/2020/index.html") + end + + it "should use the correct layout for news/2020 page" do + _(File.read("_site/en/news/2020/index.html")).must_match "YEAR LAYOUT" + end + + it "should create news/2020/01 page" do + file_must_exist("_site/en/news/2020/index.html") + end + + it "should use the correct layout for news/2020/01 page" do + _(File.read("_site/en/news/2020/01/index.html")).must_match "MONTH LAYOUT" + end +end From e6821f14bf40cee8c99ebc086080d51fd1026f89 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Mon, 4 Jan 2021 21:15:39 +0100 Subject: [PATCH 0437/1487] Add test task for news archives plugin --- Rakefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Rakefile b/Rakefile index 3547782f1b..420c1180e6 100644 --- a/Rakefile +++ b/Rakefile @@ -136,3 +136,11 @@ Rake::TestTask.new(:"test-linter") do |t| t.test_files = FileList['test/test_linter_*.rb'] t.verbose = true end + +require "rake/testtask" +Rake::TestTask.new(:"test-news-plugin") do |t| + t.description = "Run tests for the news archive plugin" + t.libs = ["test"] + t.test_files = FileList['test/test_plugin_news.rb'] + t.verbose = true +end From 1e3c9213ed01ffbcc4a2ddb06081137123f27d73 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Sun, 21 Feb 2021 17:57:48 +0100 Subject: [PATCH 0438/1487] Always run tests for news archives plugin on CI --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 420c1180e6..e2d9b20cb3 100644 --- a/Rakefile +++ b/Rakefile @@ -14,7 +14,7 @@ CONFIG = "_config.yml" task default: [:build] desc "Run tests (test-linter, lint, build)" -task test: %i[test-linter lint build] +task test: %i[test-news-plugin test-linter lint build] desc "Build the Jekyll site" task :build do From eea7718405c15c22c9076f408c19e7330a8ad2ee Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Fri, 19 Feb 2021 17:25:09 +0100 Subject: [PATCH 0439/1487] Reformat JavaScript files Reformat JavaScript files to match code generated by TypeScript, in preparation for the introduction of TypeScript files. --- javascripts/examples.js | 22 +++++++++------------- javascripts/page.js | 33 +++++++++++++++------------------ 2 files changed, 24 insertions(+), 31 deletions(-) diff --git a/javascripts/examples.js b/javascripts/examples.js index ac3fa25164..e810630024 100644 --- a/javascripts/examples.js +++ b/javascripts/examples.js @@ -1,16 +1,12 @@ var Examples = { - names: ['cities', 'greeter', 'i_love_ruby', 'hello_world'], - - random: function() { - return Examples.names[Math.floor(Math.random() * Examples.names.length)]; - }, - - choose: function() { - var lang = document.location.pathname.split('/')[1]; - var name = Examples.random(); - - $("#code").load('/' + lang + '/examples/' + name + '/'); - } + names: ['cities', 'greeter', 'i_love_ruby', 'hello_world'], + random: function () { + return Examples.names[Math.floor(Math.random() * Examples.names.length)]; + }, + choose: function () { + var lang = document.location.pathname.split('/')[1]; + var name = Examples.random(); + $("#code").load('/' + lang + '/examples/' + name + '/'); + } }; - $(document).ready(Examples.choose); diff --git a/javascripts/page.js b/javascripts/page.js index e33f591ea9..f807e2bf30 100644 --- a/javascripts/page.js +++ b/javascripts/page.js @@ -1,24 +1,21 @@ var Page = { - SiteLinks: { - highlight: function() { - var current_page = location.pathname; - $("#header div.site-links a:not(.home)").each(function(i) { - if (current_page.indexOf($(this).attr('href')) == 0) { - $(this).addClass('selected'); + SiteLinks: { + highlight: function () { + var current_page = location.pathname; + $("#header div.site-links a:not(.home)").each(function (i) { + if (current_page.indexOf($(this).attr('href')) == 0) { + $(this).addClass('selected'); + } + }); + $("#home-page-layout #header div.site-links a.home").addClass('selected'); + }, + menu: function () { + $("#header div.site-links a.menu").on('click touchstart', function (event) { + $(this).closest("div.site-links").toggleClass("open"); + event.preventDefault(); + }); } - }); - - $("#home-page-layout #header div.site-links a.home").addClass('selected'); - }, - - menu: function() { - $("#header div.site-links a.menu").on('click touchstart', function(event) { - $(this).closest("div.site-links").toggleClass("open"); - event.preventDefault(); - }); } - } }; - $(Page.SiteLinks.highlight); $(Page.SiteLinks.menu); From fe098480aa65fdddff92142018207abfd1023627 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Fri, 19 Feb 2021 17:34:15 +0100 Subject: [PATCH 0440/1487] Introduce TypeScript Set up TypeScript (add source directory and config file). The JavaScript files in `javascripts` can now be generated by running `tsc` in the root directory. This might be useful for future changes of the JavaScript. It does not affect the normal build process of the site. --- _config.yml | 1 + _javascripts_src/examples.ts | 16 ++++++++++++++++ _javascripts_src/page.ts | 24 ++++++++++++++++++++++++ tsconfig.json | 9 +++++++++ 4 files changed, 50 insertions(+) create mode 100644 _javascripts_src/examples.ts create mode 100644 _javascripts_src/page.ts create mode 100644 tsconfig.json diff --git a/_config.yml b/_config.yml index ec6719c04e..b1d9d3978f 100644 --- a/_config.yml +++ b/_config.yml @@ -18,6 +18,7 @@ exclude: - lib - test - vendor + - tsconfig.json url: https://www.ruby-lang.org diff --git a/_javascripts_src/examples.ts b/_javascripts_src/examples.ts new file mode 100644 index 0000000000..bc3054af98 --- /dev/null +++ b/_javascripts_src/examples.ts @@ -0,0 +1,16 @@ +var Examples = { + names: ['cities', 'greeter', 'i_love_ruby', 'hello_world'], + + random: function () { + return Examples.names[Math.floor(Math.random() * Examples.names.length)]; + }, + + choose: function () { + var lang = document.location.pathname.split('/')[1]; + var name = Examples.random(); + + $("#code").load('/' + lang + '/examples/' + name + '/'); + } +}; + +$(document).ready(Examples.choose); diff --git a/_javascripts_src/page.ts b/_javascripts_src/page.ts new file mode 100644 index 0000000000..8598ecdbaa --- /dev/null +++ b/_javascripts_src/page.ts @@ -0,0 +1,24 @@ +var Page = { + SiteLinks: { + highlight: function () { + var current_page = location.pathname; + $("#header div.site-links a:not(.home)").each(function (i) { + if (current_page.indexOf($(this).attr('href')) == 0) { + $(this).addClass('selected'); + } + }); + + $("#home-page-layout #header div.site-links a.home").addClass('selected'); + }, + + menu: function () { + $("#header div.site-links a.menu").on('click touchstart', function (event) { + $(this).closest("div.site-links").toggleClass("open"); + event.preventDefault(); + }); + } + } +}; + +$(Page.SiteLinks.highlight); +$(Page.SiteLinks.menu); diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000000..614e3240ff --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "outDir": "./javascripts", + + "target": "es5", + "strict": true + }, + "include": ["./_javascripts_src/**/*"] +} From 3b3c6774bd3b460de4495f465fa66d4a5a70146c Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Fri, 19 Feb 2021 17:36:24 +0100 Subject: [PATCH 0441/1487] Generate JavaScript files Generate JavaScript by running `tsc` in the root directory; used version: TypeScript 4.1.5. --- javascripts/examples.js | 1 + javascripts/page.js | 1 + 2 files changed, 2 insertions(+) diff --git a/javascripts/examples.js b/javascripts/examples.js index e810630024..3479a8c081 100644 --- a/javascripts/examples.js +++ b/javascripts/examples.js @@ -1,3 +1,4 @@ +"use strict"; var Examples = { names: ['cities', 'greeter', 'i_love_ruby', 'hello_world'], random: function () { diff --git a/javascripts/page.js b/javascripts/page.js index f807e2bf30..8aa18a025e 100644 --- a/javascripts/page.js +++ b/javascripts/page.js @@ -1,3 +1,4 @@ +"use strict"; var Page = { SiteLinks: { highlight: function () { From 1f896536a31d5f62eb375a436cd0228e62aaf857 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Fri, 19 Feb 2021 22:39:27 +0100 Subject: [PATCH 0442/1487] Improve JavaScript Avoid an error reported by TypeScript 4.1.5 (`href` might be undefined). _javascripts_src/page.ts:6:34 - error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. 6 if (current_page.indexOf($(this).attr('href')) == 0) { ~~~~~~~~~~~~~~~~~~~~ --- _javascripts_src/page.ts | 3 ++- javascripts/page.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/_javascripts_src/page.ts b/_javascripts_src/page.ts index 8598ecdbaa..5bfbe0ff5b 100644 --- a/_javascripts_src/page.ts +++ b/_javascripts_src/page.ts @@ -3,7 +3,8 @@ var Page = { highlight: function () { var current_page = location.pathname; $("#header div.site-links a:not(.home)").each(function (i) { - if (current_page.indexOf($(this).attr('href')) == 0) { + let element_href = $(this).attr('href'); + if (element_href && current_page.indexOf(element_href) == 0) { $(this).addClass('selected'); } }); diff --git a/javascripts/page.js b/javascripts/page.js index 8aa18a025e..02e22fb64e 100644 --- a/javascripts/page.js +++ b/javascripts/page.js @@ -4,7 +4,8 @@ var Page = { highlight: function () { var current_page = location.pathname; $("#header div.site-links a:not(.home)").each(function (i) { - if (current_page.indexOf($(this).attr('href')) == 0) { + var element_href = $(this).attr('href'); + if (element_href && current_page.indexOf(element_href) == 0) { $(this).addClass('selected'); } }); From 46b7ef909db91c5b6c1b5ba4314abeb20e56df5d Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Fri, 29 Oct 2021 23:37:40 +0200 Subject: [PATCH 0443/1487] Use named link references on user-groups page (en) (#2716) Also use better link name for onruby-github and remove a surplus space. --- en/community/user-groups/index.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/en/community/user-groups/index.md b/en/community/user-groups/index.md index fb346e14d0..cd920d5f1d 100644 --- a/en/community/user-groups/index.md +++ b/en/community/user-groups/index.md @@ -21,16 +21,16 @@ to giving people a chance to write Ruby code). Information about Ruby user groups can be found on various websites: -[Ruby Meetup Groups][1] +[Ruby Meetup Groups][meetup] : A substantial number of Ruby User Groups have chosen to make Meetup their home. Meetup provides a number of tools for user groups, including: private forums, a place for announcements, automated meeting reminders, and a nice RSVP system. -[OnRuby][2] -: A number of user groups can also be found at OnRuby. OnRuby is an +[OnRuby][onruby] +: A number of user groups can also be found at OnRuby. OnRuby is an open source platform written in Ruby that can be used to organize - meetups. It is available on [GitHub][3]. + meetups. It is [available on GitHub][onruby-github]. ### Organizing Your Own Group @@ -39,6 +39,8 @@ there is already a Ruby user group in your area. Larger meetings are usually much more fun, so starting your own group may not be the best option if there is already one nearby. -[1]: https://ruby.meetup.com -[2]: https://www.onruby.eu/ -[3]: https://github.com/phoet/on_ruby + + +[meetup]: https://ruby.meetup.com +[onruby]: https://www.onruby.eu/ +[onruby-github]: https://github.com/phoet/on_ruby From 2a8541a6cee7df2c3e656cdd2049491fbf91bd07 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Sat, 30 Oct 2021 17:34:43 +0200 Subject: [PATCH 0444/1487] Use named link reference on user-groups page (translations) Also use https instead of http. --- bg/community/user-groups/index.md | 4 ++-- de/community/user-groups/index.md | 4 ++-- es/community/user-groups/index.md | 4 ++-- fr/community/user-groups/index.md | 8 ++++---- id/community/user-groups/index.md | 4 ++-- it/community/user-groups/index.md | 4 ++-- ko/community/user-groups/index.md | 4 ++-- pl/community/user-groups/index.md | 4 ++-- pt/community/user-groups/index.md | 4 ++-- ru/community/user-groups/index.md | 4 ++-- tr/community/user-groups/index.md | 4 ++-- vi/community/user-groups/index.md | 4 ++-- zh_cn/community/user-groups/index.md | 4 ++-- zh_tw/community/user-groups/index.md | 4 ++-- 14 files changed, 30 insertions(+), 30 deletions(-) diff --git a/bg/community/user-groups/index.md b/bg/community/user-groups/index.md index 0660251917..dd7256eb15 100644 --- a/bg/community/user-groups/index.md +++ b/bg/community/user-groups/index.md @@ -20,7 +20,7 @@ lang: bg Информация за Ruby потребителски групи можете да намерите на следните сайтове: -[Ruby Meetup Groups][1] +[Ruby Meetup Groups][meetup] : Meetup предоставя: частни форуми, място за съобщения и публикации, напомняне за събирания и RSVP система. @@ -33,4 +33,4 @@ lang: bg -[1]: https://ruby.meetup.com +[meetup]: https://ruby.meetup.com diff --git a/de/community/user-groups/index.md b/de/community/user-groups/index.md index 2471f0c7c3..815caab30b 100644 --- a/de/community/user-groups/index.md +++ b/de/community/user-groups/index.md @@ -30,7 +30,7 @@ Ruby User Groups: : Eine Wikiseite mit bereits vorhandenen deutschsprachigen Ruby User Groups. -[onruby.de][3] +[onruby.de][onruby-de] : Ein Planungsportal für Ruby-Usergruppen in Deutschland. Kontaktinfos auf den jeweiligen Usergroup-Seiten. @@ -48,4 +48,4 @@ Interessierte deine Gruppe finden. [1]: http://maps.google.de/maps/ms?ie=UTF8&t=h&hl=de&msa=0&msid=111007145847842353754.00046e5ff7baba4a38734&ll=50.847573,11.513672&spn=7.534777,18.303223&z=6 [2]: http://wiki.ruby-portal.de/Usergroups -[3]: http://www.onruby.de/ +[onruby-de]: https://www.onruby.de/ diff --git a/es/community/user-groups/index.md b/es/community/user-groups/index.md index e4ac3cfbce..e3654216e1 100644 --- a/es/community/user-groups/index.md +++ b/es/community/user-groups/index.md @@ -32,7 +32,7 @@ Algunos grupos que pueden resultar de tu interés: [RUGUY][3] : Grupo de Usuarios de Ruby del Uruguay. -[Ruby Meetup Groups][4] +[Ruby Meetup Groups][meetup] : Varios grupos de usuarios Ruby han hecho de Meetup su hogar. Meetup provee una cantidad de herramientas para grupos de usuarios, incluyendo: foros privados, un lugar para anuncios, recordatorios @@ -43,4 +43,4 @@ Algunos grupos que pueden resultar de tu interés: [1]: http://rubysur.org/ [2]: http://ruby.com.ar/ [3]: http://ruguy.org/ -[4]: https://ruby.meetup.com +[meetup]: https://ruby.meetup.com diff --git a/fr/community/user-groups/index.md b/fr/community/user-groups/index.md index 272858e538..b55a31ca18 100644 --- a/fr/community/user-groups/index.md +++ b/fr/community/user-groups/index.md @@ -30,7 +30,7 @@ pour le partage des connaissances et, si vous êtes chanceux, des réunions et conférences (la mode étant aux barcamp, rencontres autour d’un verre dans un lieu adapté aux présentations). -[Meetup][2] +[Meetup][meetup] : Un nombre non négligeable de groupes ont choisi de promouvoir leurs évènements chez Meetup. Cet outil propose des services variés concernant la gestion d’un groupe, notamment un forum privé, un @@ -102,8 +102,8 @@ détail [comment organiser un apéro Ruby][19]. -[2]: http://ruby.meetup.com -[3]: http://www.meetup.com/parisrb/ +[meetup]: https://ruby.meetup.com +[3]: https://www.meetup.com/parisrb/ [4]: http://groups.google.com/group/parisrb [5]: http://lyonrb.fr/ [6]: http://rulu.eu/ @@ -118,5 +118,5 @@ détail [comment organiser un apéro Ruby][19]. [15]: http://rivierarb.fr/ [16]: http://www.facebook.com/AperoRubyMontpellier [17]: http://rubybdx.org/ -[18]: http://www.meetup.com/Orleans-rb/ +[18]: https://www.meetup.com/Orleans-rb/ [19]: http://www.camilleroux.com/2011/09/15/comment-organiser-un-apero-ruby/ diff --git a/id/community/user-groups/index.md b/id/community/user-groups/index.md index fe9487280f..ba6d221405 100644 --- a/id/community/user-groups/index.md +++ b/id/community/user-groups/index.md @@ -39,7 +39,7 @@ Kelompok pengguna Ruby dapat ditemukan di situs-situs berikut ini: dan informasi singkat mengenai masing-masing kelompok. Situs ini bersifat seperti wiki dan dapat diedit oleh siapa saja. -[Kelompok Ruby di Meetup][4] +[Kelompok Ruby di Meetup][meetup] : Sejumlah besar kelompok pengguna Ruby bergabung dalam Meetup. Meetup menyediakan banyak fasilitas untuk kelompok pengguna, seperti forum internal, pengumuman, pengingat otomatis, dan sistem RSVP. @@ -61,5 +61,5 @@ Ruby yang Anda ikuti dapat kita sampaikan di sini. [1]: http://tech.groups.yahoo.com/group/id-ruby/ [2]: http://wiki.rubygarden.org/Ruby/page/show/RubyUserGroups [3]: http://www.rubyholic.com/ -[4]: http://ruby.meetup.com +[meetup]: https://ruby.meetup.com [5]: http://groups.google.com/group/Ruby-Brigades diff --git a/it/community/user-groups/index.md b/it/community/user-groups/index.md index 17500788a2..7099f467f2 100644 --- a/it/community/user-groups/index.md +++ b/it/community/user-groups/index.md @@ -24,7 +24,7 @@ scrivere codice Ruby). Informazioni su i gruppi di utilizzatori Ruby possono essere trovate su diversi siti Web: -[Ruby Meetup Groups][1] +[Ruby Meetup Groups][meetup] : Un numero sostanziale di gruppi di utenti Ruby hanno scelto di fare di Meetup la loro dimora. Meetup fornisce un numero di tool per i gruppi di utenti, fra i quali: forum privati, una bacheca per @@ -41,4 +41,4 @@ già uno nella tua area. -[1]: https://ruby.meetup.com +[meetup]: https://ruby.meetup.com diff --git a/ko/community/user-groups/index.md b/ko/community/user-groups/index.md index 6ff50aec85..14be151603 100644 --- a/ko/community/user-groups/index.md +++ b/ko/community/user-groups/index.md @@ -19,7 +19,7 @@ Ruby 유저 그룹은 전적으로 Ruby에만 전념합니다. 일반적으로 Ruby 유저 그룹에 관한 정보는 여러 웹 사이트에서 얻을 수 있습니다. -[Ruby Meetup Groups][1] +[Ruby Meetup Groups][meetup] : Ruby 유저 그룹의 상당수는 Meetup 사이트를 홈페이지로 합니다. Meetup은 유저 그룹을 위한 몇 가지 툴을 제공하고 있습니다. 비공개 포럼, 공지를 위한 장소, 자동 리마인더, 훌륭한 RSVP(참석여부 체크) 시스템 등등이 그것이죠. @@ -32,4 +32,4 @@ Ruby 유저 그룹에 관한 정보는 여러 웹 사이트에서 얻을 수 있 -[1]: https://ruby.meetup.com +[meetup]: https://ruby.meetup.com diff --git a/pl/community/user-groups/index.md b/pl/community/user-groups/index.md index e7fd7cfcf1..cdee5edad9 100644 --- a/pl/community/user-groups/index.md +++ b/pl/community/user-groups/index.md @@ -34,7 +34,7 @@ poniższych stronach: grupy. Ta strona przypomina Wiki, czyli każdy może edytować dowolne informacje znajdujące się na niej. -[Ruby Meetup Groups][3] +[Ruby Meetup Groups][meetup] : Spora liczba grup użytkowników Rubiego zdecydowała sie wykorzystać serwis meetup.com jako swoje miejsce w sieci. Meetup zapewnia zestaw narzędzi dla grup użytkowników m.in.: prywatne fora dyskusyjne, @@ -53,5 +53,5 @@ ludzi, którzy chcą dowiedzieć się co się dzieje w innych grupach. [1]: http://wiki.rubygarden.org/Ruby/page/show/RubyUserGroups [2]: http://www.rubyholic.com/ -[3]: http://ruby.meetup.com +[meetup]: https://ruby.meetup.com [4]: http://groups.google.com/group/Ruby-Brigades diff --git a/pt/community/user-groups/index.md b/pt/community/user-groups/index.md index aad0a0a29c..4ce05a71a3 100644 --- a/pt/community/user-groups/index.md +++ b/pt/community/user-groups/index.md @@ -23,7 +23,7 @@ dedicadas a dar a oportunidade aos membros de escrever código em Ruby). Informações sobre grupos de usuários de Ruby podem ser encontrados pelo menos em vários websites: -[Ruby Meetup Groups][1] +[Ruby Meetup Groups][meetup] : Um número substancial de Grupos de Usuários de Ruby decidiram usar o Meetup como o seu lar. O Meetup oferece um número de ferramentas incluindo: fóruns privados, um local para colocar anúncios, lembretes @@ -38,4 +38,4 @@ não ser a melhor opção se já existir um por perto. -[1]: https://ruby.meetup.com +[meetup]: https://ruby.meetup.com diff --git a/ru/community/user-groups/index.md b/ru/community/user-groups/index.md index 31243f3f84..462793a857 100644 --- a/ru/community/user-groups/index.md +++ b/ru/community/user-groups/index.md @@ -24,7 +24,7 @@ Ruby целиком посвящены Ruby. Обычно они включаю Информацию о группах пользователей Ruby вы можете найти на различных веб-сайтах: -[Ruby Meetup Groups][1] +[Ruby Meetup Groups][meetup] : Некоторые из групп пользователей Ruby выбирают Meetup в качестве места их встреч. Meetup предоставляет набор инструментов для групп пользователей, таких как: приватные форму, место для объявлений, автоматические @@ -39,4 +39,4 @@ Ruby целиком посвящены Ruby. Обычно они включаю -[1]: https://ruby.meetup.com +[meetup]: https://ruby.meetup.com diff --git a/tr/community/user-groups/index.md b/tr/community/user-groups/index.md index 0406b7600a..3cad20c8be 100644 --- a/tr/community/user-groups/index.md +++ b/tr/community/user-groups/index.md @@ -20,7 +20,7 @@ bir websitesi, ve eğer şanslıysanız, sık kod yazma oturumları sağlar. Ruby kullanıcı grupları hakkında bilgiler çeşitli websitelerinde bulunabilir: -[Ruby Meetup Groups][1] +[Ruby Meetup Groups][meetup] : Ruby Kullanıcı Grupları'nın önemli bir kısmı evleri olarak Meetup'ı seçmiştir. Meetup, kullanıcı grupları için bazı araçlar sunar. Bunlardan bazıları şunlardır: özel forumlar, duyurular için bir ortam, otomatik buluşma @@ -35,4 +35,4 @@ bir seçenek olmayabilir. -[1]: https://ruby.meetup.com +[meetup]: https://ruby.meetup.com diff --git a/vi/community/user-groups/index.md b/vi/community/user-groups/index.md index dfd69471af..5ca7729c16 100644 --- a/vi/community/user-groups/index.md +++ b/vi/community/user-groups/index.md @@ -22,7 +22,7 @@ buổi thảo luận này dành cho mọi người cơ hội để viết code R Thông tin về các nhóm người dùng Ruby có thể tìm thấy trên những website khác nhau như: -[Các nhóm Ruby Meetup][1] +[Các nhóm Ruby Meetup][meetup] : Đa số các nhóm người dùng Ruby đều chọn Meetup làm ngôi nhà chung. Meetup cung cấp một số công cụ cho những nhóm người dùng bao gồm: diễn đàn riêng, nơi thông báo cho nhóm, tự động nhắc nhở khi có cuộc thảo luận nhóm nào được tổ @@ -37,4 +37,4 @@ nếu đã có một nhóm trong khu vực đó rồi. -[1]: https://ruby.meetup.com +[meetup]: https://ruby.meetup.com diff --git a/zh_cn/community/user-groups/index.md b/zh_cn/community/user-groups/index.md index 5061041934..d188339ec6 100644 --- a/zh_cn/community/user-groups/index.md +++ b/zh_cn/community/user-groups/index.md @@ -15,7 +15,7 @@ Ruby 的,他们最典型的特征是有月度聚会、邮件列表、 web 站 关于 Ruby 用户组的信息可以在各种网站找到: -[Ruby Meetup Groups][1] +[Ruby Meetup Groups][meetup] : 相当多的 Ruby 用户组在 Meetup 安家,Meetup 为用户组提供了许多工具,包括:私人论坛、 公告栏、自动会议提醒和一个非常棒的 RSVP 系统。 @@ -24,4 +24,4 @@ Ruby 的,他们最典型的特征是有月度聚会、邮件列表、 web 站 如果你对创建自己的用户组感兴趣,一定要看看在你的区域是否已经有一个。通常越大的聚会越有趣,如果在你的附近已经有一个用户组,创建你自己的用户组也许不是一个非常好的选择。 -[1]: https://ruby.meetup.com +[meetup]: https://ruby.meetup.com diff --git a/zh_tw/community/user-groups/index.md b/zh_tw/community/user-groups/index.md index ea58674d42..a47d48df86 100644 --- a/zh_tw/community/user-groups/index.md +++ b/zh_tw/community/user-groups/index.md @@ -13,7 +13,7 @@ lang: zh_tw 關於 Ruby 使用者群組的資訊可以在許多網站找到: -[Ruby Meetup Groups][1] +[Ruby Meetup Groups][meetup] : 許多 Ruby 使用者群組選擇在 Meetup 建立自己的家, Meetup 提供許多群組工具,包含:私密論壇、公佈欄、自動聚會提醒、還有一個很棒的 RSVP 系統。 ### 組織您自己的使用者群組 @@ -22,4 +22,4 @@ lang: zh_tw -[1]: https://ruby.meetup.com +[meetup]: https://ruby.meetup.com From dbeff98b7d4423a2e46a266471e5e33cf96e2468 Mon Sep 17 00:00:00 2001 From: Vlad Bokov Date: Sun, 31 Oct 2021 23:11:04 +0300 Subject: [PATCH 0445/1487] Fix typos after spellchecker (ru) (#2719) --- ru/documentation/ruby-from-other-languages/index.md | 2 +- ru/news/_posts/2013-02-06-rdoc-xss-cve-2013-0256.md | 2 +- ...the-barcelona-ruby-conference-call-for-papers-is-open.md | 4 ++-- ru/news/_posts/2013-02-24-ruby-2-0-0-p0-is-released.md | 6 +++--- ...passing-vulnerability-in-openssl-client-cve-2013-4073.md | 4 ++-- ru/news/_posts/2013-06-27-ruby-1-9-3-p448-is-released.md | 2 +- ru/news/_posts/2013-06-27-ruby-2-0-0-p247-is-released.md | 2 +- ru/news/_posts/2013-06-30-we-retire-1-8-7.md | 2 +- ru/news/_posts/2013-08-06-status-issue.md | 2 +- ru/news/_posts/2013-11-22-ruby-1-9-3-p484-is-released.md | 2 +- ru/news/_posts/2013-11-22-ruby-2-0-0-p353-is-released.md | 2 +- ru/news/_posts/2013-12-17-maintenance-of-1-8-7-and-1-9-2.md | 2 +- ru/news/_posts/2013-12-20-ruby-2-1-0-rc1-is-released.md | 2 +- .../2013-12-21-ruby-version-policy-changes-with-2-1-0.md | 4 ++-- .../2014-03-10-regression-of-hash-reject-in-ruby-2-1-1.md | 2 +- ru/news/_posts/2014-03-15-eurucamp-2014.md | 2 +- .../2014-10-27-changing-default-settings-of-ext-openssl.md | 4 ++-- ru/news/_posts/2016-11-21-ruby-2-3-3-released.md | 2 +- ru/news/_posts/2016-12-25-ruby-2-4-0-released.md | 2 +- ru/news/_posts/2017-12-25-ruby-2-5-0-released.md | 2 +- 20 files changed, 26 insertions(+), 26 deletions(-) diff --git a/ru/documentation/ruby-from-other-languages/index.md b/ru/documentation/ruby-from-other-languages/index.md index a5495bea5b..9121e6b985 100644 --- a/ru/documentation/ruby-from-other-languages/index.md +++ b/ru/documentation/ruby-from-other-languages/index.md @@ -284,7 +284,7 @@ Time.mktime(2006, 01, 01) + 14.hours В Ruby имена методов могут оканчиваться на вопросительный или восклицательный знаки. По соглашению методы, которые отвечают на вопрос, заканчиваются вопросительным знаком (например, `Array#empty?` возвращает **true** если массив пустой). -Некоторые, "потенциально опасные" методы (которые меняют вызывающую сторонy, **self** +Некоторые, "потенциально опасные" методы (которые меняют вызывающую сторону, **self** или параметры) заканчиваются восклицательным знаком (например, `exit!`). Однако не все методы, которые меняют аргументы заканчиваются так, например `Array#replace` заменяет содержимое массива переданным массивом. Просто нет смысла иметь метод, diff --git a/ru/news/_posts/2013-02-06-rdoc-xss-cve-2013-0256.md b/ru/news/_posts/2013-02-06-rdoc-xss-cve-2013-0256.md index 129ec19fb6..6d171b95a8 100644 --- a/ru/news/_posts/2013-02-06-rdoc-xss-cve-2013-0256.md +++ b/ru/news/_posts/2013-02-06-rdoc-xss-cve-2013-0256.md @@ -18,7 +18,7 @@ RDoc. RDoc документация, сгенерированная rdoc 2.3.0 по rdoc 3.12 и пререлизы до rdoc 4.0.0.preview2.1, уязвима к XSS эксплоиту. Эксплоит может -привести к раскрытию кук третьей стороне. +привести к раскрытию cookies третьей стороне. ## Детали diff --git a/ru/news/_posts/2013-02-16-the-barcelona-ruby-conference-call-for-papers-is-open.md b/ru/news/_posts/2013-02-16-the-barcelona-ruby-conference-call-for-papers-is-open.md index 2939f59b3e..fe186572fa 100644 --- a/ru/news/_posts/2013-02-16-the-barcelona-ruby-conference-call-for-papers-is-open.md +++ b/ru/news/_posts/2013-02-16-the-barcelona-ruby-conference-call-for-papers-is-open.md @@ -9,8 +9,8 @@ lang: ru **[Barcelona Ruby Conference][1]** – это конференция, которая проходит в сердце **Каталонии, Испания** 14-15 сентября. Выступают [спикеры мирового -класса][2], такие как **Aaron Patterson** (кортим rails и ruby), -**David Chelimsky** (автор *The RSpec book*, RSpec кортим), +класса][2], такие как **Aaron Patterson** (ключевой разработчик rails и ruby), +**David Chelimsky** (автор *The RSpec book*, ключевой разработчик RSpec), **Charles Nutter** (JRuby ментейнер), **Sandi Metz** (автор *Practical Object-Oriented Design in Ruby*) или **Yukihiro Matz** (создатель языка Ruby ), и многие другие. diff --git a/ru/news/_posts/2013-02-24-ruby-2-0-0-p0-is-released.md b/ru/news/_posts/2013-02-24-ruby-2-0-0-p0-is-released.md index 4e0e6b33ff..61040b249b 100644 --- a/ru/news/_posts/2013-02-24-ruby-2-0-0-p0-is-released.md +++ b/ru/news/_posts/2013-02-24-ruby-2-0-0-p0-is-released.md @@ -70,7 +70,7 @@ Ruby 2.0.0 – это первый стабильный релиз Ruby 2.0 се * Оптимизации виртуальной машины, например, отправки метода * Операции с дробными числами -Можно добавить, что хотя как и эксперемент, но 2.0.0 включает +Можно добавить, что хотя как и эксперимент, но 2.0.0 включает Refinements, который добавляет новый концепт к модульности Ruby. Также, просмотрите новости про другие изменения, улучшения и детали. @@ -166,9 +166,9 @@ Ruby жизнь. Мы добавили фичу под названием Refinements, которая добавляет новый концепт к модульности Ruby. Не смотря на это, пожалуйста, знайте, что -Refinements до сих пор эксперементальная фича: мы можем изменить ее +Refinements до сих пор экспериментальная фича: мы можем изменить ее спецификацию в будущем. Но мы бы хотели, чтобы вы поиграли с ней, -отправлии бы нам свои отзывы, поделились мыслями. +отправили бы нам свои отзывы, поделились мыслями. Ваши отзывы очень помогут доделать эту интересную фичу. diff --git a/ru/news/_posts/2013-06-27-hostname-check-bypassing-vulnerability-in-openssl-client-cve-2013-4073.md b/ru/news/_posts/2013-06-27-hostname-check-bypassing-vulnerability-in-openssl-client-cve-2013-4073.md index e24cfe9e0d..8b526933cf 100644 --- a/ru/news/_posts/2013-06-27-hostname-check-bypassing-vulnerability-in-openssl-client-cve-2013-4073.md +++ b/ru/news/_posts/2013-06-27-hostname-check-bypassing-vulnerability-in-openssl-client-cve-2013-4073.md @@ -9,8 +9,8 @@ lang: ru --- Уязвимость в SSL клиенте Ruby, которая может позволить man-in-the-middle -(человек-посередине) атаки, чтобы обмнауть SSL сервера через -использование валидного сертефиката, выданного доверенным центром +(человек-посередине) атаки, чтобы обмануть SSL сервера через +использование валидного сертификата, выданного доверенным центром сертификации. Этой уязвимости был назначен CVE идентификатор CVE-2013-4073. diff --git a/ru/news/_posts/2013-06-27-ruby-1-9-3-p448-is-released.md b/ru/news/_posts/2013-06-27-ruby-1-9-3-p448-is-released.md index 05f793b05e..f642ccf559 100644 --- a/ru/news/_posts/2013-06-27-ruby-1-9-3-p448-is-released.md +++ b/ru/news/_posts/2013-06-27-ruby-1-9-3-p448-is-released.md @@ -9,7 +9,7 @@ lang: ru Вышел Ruby 1.9.3-p448. -Данный релиз включает исправлениие проблемы безопасности со встроенным +Данный релиз включает исправление проблемы безопасности со встроенным OpenSSL. * [Hostname check bypassing vulnerability in SSL client diff --git a/ru/news/_posts/2013-06-27-ruby-2-0-0-p247-is-released.md b/ru/news/_posts/2013-06-27-ruby-2-0-0-p247-is-released.md index 1ce99c84ec..91583894cb 100644 --- a/ru/news/_posts/2013-06-27-ruby-2-0-0-p247-is-released.md +++ b/ru/news/_posts/2013-06-27-ruby-2-0-0-p247-is-released.md @@ -9,7 +9,7 @@ lang: ru Вышел Ruby 2.0.0-p247. -Данный релиз включает исправлениие проблемы безопасности со встроенным +Данный релиз включает исправление проблемы безопасности со встроенным OpenSSL. * [Hostname check bypassing vulnerability in SSL client diff --git a/ru/news/_posts/2013-06-30-we-retire-1-8-7.md b/ru/news/_posts/2013-06-30-we-retire-1-8-7.md index 7cca8648ac..8e48bdd2b8 100644 --- a/ru/news/_posts/2013-06-30-we-retire-1-8-7.md +++ b/ru/news/_posts/2013-06-30-we-retire-1-8-7.md @@ -45,5 +45,5 @@ Ruby. быть, а может и не быть, поддерживаем кем-либо еще, потому что существуют сторонние организации, которые занимаются поддержкой Ruby 1.8.7. Единственная вещь, которую я могу сказать, это _Я_ не хочу -поддержвить его больше. Так что, если вы используете то, что опубликовал +поддерживать его больше. Так что, если вы используете то, что опубликовал я, смотрите внимательней и ищите решения, подходящие к вашей ситуации. diff --git a/ru/news/_posts/2013-08-06-status-issue.md b/ru/news/_posts/2013-08-06-status-issue.md index 6f2ffb1bfd..bdddcd1671 100644 --- a/ru/news/_posts/2013-08-06-status-issue.md +++ b/ru/news/_posts/2013-08-06-status-issue.md @@ -40,7 +40,7 @@ lang: ru ## Обновление (2013-08-07 05:08 UTC) -Мы подтвердили, что следующие пакеты сломаны. Эти покеты доступны на http://mirrorservice.org/sites/ftp.ruby-lang.org/pub/ruby/ +Мы подтвердили, что следующие пакеты сломаны. Эти пакеты доступны на http://mirrorservice.org/sites/ftp.ruby-lang.org/pub/ruby/
 ruby-1.9.3-p426.tar.bz2
 ruby-1.9.3-p426.tar.gz
diff --git a/ru/news/_posts/2013-11-22-ruby-1-9-3-p484-is-released.md b/ru/news/_posts/2013-11-22-ruby-1-9-3-p484-is-released.md
index 592cae6ea5..49245f27c2 100644
--- a/ru/news/_posts/2013-11-22-ruby-1-9-3-p484-is-released.md
+++ b/ru/news/_posts/2013-11-22-ruby-1-9-3-p484-is-released.md
@@ -9,7 +9,7 @@ lang: ru
 
 Вышел Ruby 1.9.3-p484.
 
-Данный релиз включает исправлениие проблемы безопасности в ядре Ruby:
+Данный релиз включает исправление проблемы безопасности в ядре Ruby:
 
  * [Переполнение кучи при парсинге плавающей запятой (CVE-2013-4164)](/ru/news/2013/11/22/heap-overflow-in-floating-point-parsing-cve-2013-4164/)
 
diff --git a/ru/news/_posts/2013-11-22-ruby-2-0-0-p353-is-released.md b/ru/news/_posts/2013-11-22-ruby-2-0-0-p353-is-released.md
index 18e2899206..4849999fb9 100644
--- a/ru/news/_posts/2013-11-22-ruby-2-0-0-p353-is-released.md
+++ b/ru/news/_posts/2013-11-22-ruby-2-0-0-p353-is-released.md
@@ -9,7 +9,7 @@ lang: ru
 
 Вышел Ruby 2.0.0-p353.
 
-Данный релиз включает исправлениие проблемы безопасности в ядре Ruby:
+Данный релиз включает исправление проблемы безопасности в ядре Ruby:
 
 * [Переполнение кучи при парсинге плавающей запятой (CVE-2013-4164)](/ru/news/2013/11/22/heap-overflow-in-floating-point-parsing-cve-2013-4164/)
 
diff --git a/ru/news/_posts/2013-12-17-maintenance-of-1-8-7-and-1-9-2.md b/ru/news/_posts/2013-12-17-maintenance-of-1-8-7-and-1-9-2.md
index ae6ab37c4f..3631615ab4 100644
--- a/ru/news/_posts/2013-12-17-maintenance-of-1-8-7-and-1-9-2.md
+++ b/ru/news/_posts/2013-12-17-maintenance-of-1-8-7-and-1-9-2.md
@@ -44,7 +44,7 @@ lang: ru
 
 ### Зачем "откапывать" 1.8.7?
 
-Около 6 месяцев назал было объявлено [о закате 1.8.7][sunset-187-ru].
+Около 6 месяцев назад было объявлено [о закате 1.8.7][sunset-187-ru].
 
 В то время как команда ruby-core не собирается более поддерживать 1.8.7 и 1.9.2,
 Terence и Zachary будут поддерживать безопасность этих версий в рамках корпоративного
diff --git a/ru/news/_posts/2013-12-20-ruby-2-1-0-rc1-is-released.md b/ru/news/_posts/2013-12-20-ruby-2-1-0-rc1-is-released.md
index 0b4f845206..4a462636a4 100644
--- a/ru/news/_posts/2013-12-20-ruby-2-1-0-rc1-is-released.md
+++ b/ru/news/_posts/2013-12-20-ruby-2-1-0-rc1-is-released.md
@@ -49,7 +49,7 @@ lang: ru
 * "literal".freeze теперь оптимизирован [#9042](https://bugs.ruby-lang.org/issues/9042)
 * добавлен Exception#cause [#8257](https://bugs.ruby-lang.org/issues/8257)
 * обновлены библиотеки, такие как json, nkf, rake, RubyGems, и RDoc.
-* удалена бибиотека curses. [#8584](https://bugs.ruby-lang.org/issues/8584)
+* удалена библиотека curses. [#8584](https://bugs.ruby-lang.org/issues/8584)
 
 Смотри больше подробностей об изменениях: [NEWS in Ruby repository (WIP)](https://github.com/ruby/ruby/blob/v2_1_0_preview2/NEWS).
 
diff --git a/ru/news/_posts/2013-12-21-ruby-version-policy-changes-with-2-1-0.md b/ru/news/_posts/2013-12-21-ruby-version-policy-changes-with-2-1-0.md
index 70286f4183..8629060534 100644
--- a/ru/news/_posts/2013-12-21-ruby-version-policy-changes-with-2-1-0.md
+++ b/ru/news/_posts/2013-12-21-ruby-version-policy-changes-with-2-1-0.md
@@ -39,8 +39,8 @@ lang: ru
 Следующие характерные изменения будут считаться несовместимыми,
 увеличивая `MINOR` версию:
 
-* yдаление возможностей низкоуровнего С API;
-* oбратно-несовместимые изменения или добавления.
+* удаление возможностей низкоуровнего С API;
+* обратно-несовместимые изменения или добавления.
 
 ### Совместимость ABI
 
diff --git a/ru/news/_posts/2014-03-10-regression-of-hash-reject-in-ruby-2-1-1.md b/ru/news/_posts/2014-03-10-regression-of-hash-reject-in-ruby-2-1-1.md
index d29f6ceccf..b64ff35760 100644
--- a/ru/news/_posts/2014-03-10-regression-of-hash-reject-in-ruby-2-1-1.md
+++ b/ru/news/_posts/2014-03-10-regression-of-hash-reject-in-ruby-2-1-1.md
@@ -9,7 +9,7 @@ lang: ru
 
 В Ruby 2.1.0 и ранее метод `reject` любого класса, отнаследованного от `Hash`,
 возвращал объект этого же класса.
-Однако, в Ruby 2.1.1 это поведение неожиденно изменилось, и метод всегда возвращает
+Однако, в Ruby 2.1.1 это поведение неожиданно изменилось, и метод всегда возвращает
 простой `Hash`, а не унаследованный класс.
 
 {% highlight ruby %}
diff --git a/ru/news/_posts/2014-03-15-eurucamp-2014.md b/ru/news/_posts/2014-03-15-eurucamp-2014.md
index dd4e40d49e..93e1b28c6f 100644
--- a/ru/news/_posts/2014-03-15-eurucamp-2014.md
+++ b/ru/news/_posts/2014-03-15-eurucamp-2014.md
@@ -21,7 +21,7 @@ lang: ru
 
 eurucamp - это летняя конференция с обширными возможностями пообщаться и воплотить свои идеи.
 Вдохновитесь [видео с конференции 2012][5] на нашей [странице Vimeo][6]!
-Также, можно посмотреть на [расписание][7] как пример того, что происхожит на и вне конференции.
+Также, можно посмотреть на [расписание][7] как пример того, что происходит на и вне конференции.
 
 eurucamp строго следует [кодексу проведения][8].
 Мы рады гостям, приезжающим вместе с семьей и детьми, а также людями с физическими ограничениями.
diff --git a/ru/news/_posts/2014-10-27-changing-default-settings-of-ext-openssl.md b/ru/news/_posts/2014-10-27-changing-default-settings-of-ext-openssl.md
index cd2d360457..40e920a8bb 100644
--- a/ru/news/_posts/2014-10-27-changing-default-settings-of-ext-openssl.md
+++ b/ru/news/_posts/2014-10-27-changing-default-settings-of-ext-openssl.md
@@ -17,7 +17,7 @@ lang: ru
 OpenSSL до сих пор реализует протоколы и шифры, исторически признанные небезопасными на сегодняшний день.
 Например, POODLE уязвимость ([CVE-2014-3566](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-3566)).
 Если вы продолжите использовать OpenSSL с подобными небезопасными фичами, возможно, вы не сможете обеспечить безопасность
-сетвых коммуникаций. Так, основываясь на дискуссии в [Bug #9424](https://bugs.ruby-lang.org/issues/9424),
+сетевых коммуникаций. Так, основываясь на дискуссии в [Bug #9424](https://bugs.ruby-lang.org/issues/9424),
 мы решили отключить подобные опции для SSL/TLS по умолчанию.
 Если вам надо отменить эти изменения (показанные ниже), примените обратный патч, чтобы включить эти опции снова.
 
@@ -31,7 +31,7 @@ OpenSSL до сих пор реализует протоколы и шифры,
 : [r48121](https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?revision=48121&view=revision)
 
 В любом случае, если вы отмените эти изменения, есть риск, что вы не сможете гарантировать безопасность сетевых коммуникаций.
-Вы должны понимать последстивя этих изменений, прежде чем отменять их.
+Вы должны понимать последстивия этих изменений, прежде чем отменять их.
 
 ### Встроенные библиотеки Ruby
 
diff --git a/ru/news/_posts/2016-11-21-ruby-2-3-3-released.md b/ru/news/_posts/2016-11-21-ruby-2-3-3-released.md
index 1173512431..b462bc5df5 100644
--- a/ru/news/_posts/2016-11-21-ruby-2-3-3-released.md
+++ b/ru/news/_posts/2016-11-21-ruby-2-3-3-released.md
@@ -10,7 +10,7 @@ lang: ru
 Вышел релиз Ruby 2.3.3.
 
 Этот релиз содержит исправления ошибок с `Refinements` и `Module#prepend`.
-Соместное использование `Module#refine` и `Module#prepend` в рамках одного
+Совместное использование `Module#refine` и `Module#prepend` в рамках одного
 класса могло неожиданно привести к появлению ошибки `NoMethodError`.
 Это является следствием регрессии в последнем релизе Ruby 2.3.2 на предыдущей
 неделе. Подробности доступны по адресу [Bug #12920](https://bugs.ruby-lang.org/issues/12920).
diff --git a/ru/news/_posts/2016-12-25-ruby-2-4-0-released.md b/ru/news/_posts/2016-12-25-ruby-2-4-0-released.md
index a4519fbd5f..d4bc9d7ada 100644
--- a/ru/news/_posts/2016-12-25-ruby-2-4-0-released.md
+++ b/ru/news/_posts/2016-12-25-ruby-2-4-0-released.md
@@ -61,7 +61,7 @@ Ruby 2.4 также реализует следующие улучшения п
 
 ### Прочие улучшения производительности
 
-* [ускорение доступа к переменным экземляров класса](https://bugs.ruby-lang.org/issues/12274)
+* [ускорение доступа к переменным экземпляров класса](https://bugs.ruby-lang.org/issues/12274)
 
 ## Поиск ошибок
 
diff --git a/ru/news/_posts/2017-12-25-ruby-2-5-0-released.md b/ru/news/_posts/2017-12-25-ruby-2-5-0-released.md
index 90b050f599..ce5292f95f 100644
--- a/ru/news/_posts/2017-12-25-ruby-2-5-0-released.md
+++ b/ru/news/_posts/2017-12-25-ruby-2-5-0-released.md
@@ -53,7 +53,7 @@ Ruby 2.5.0 является первой стабильной версией в
   `trace` из всего байт-кода (последовательности инструкций).
   Инструкция `trace` была добавлена для поддержки `TracePoint`,
   Тем не менее, в большинстве случаев `TracePoint` не используется и инструкции
-  `trace` это черезмерные накладные расходы. Вместо этого теперь мы
+  `trace` это чрезмерные накладные расходы. Вместо этого теперь мы
   используем технологию динамического инструментария. Больше информации об этом
   по ссылке [[Feature #14104]](https://bugs.ruby-lang.org/issues/14104).
 * Передача блока по параметру блока (прим. `def foo(&b); bar(&b); end`)

From 6a7a5ab61adef89651e61887b5dc9b56dfbadb70 Mon Sep 17 00:00:00 2001
From: Vlad Bokov 
Date: Sun, 31 Oct 2021 23:12:32 +0300
Subject: [PATCH 0446/1487] Mark Russian site maintained (ru) (#2721)

---
 ru/index.html | 2 --
 1 file changed, 2 deletions(-)

diff --git a/ru/index.html b/ru/index.html
index fd11f2159f..1b2a605214 100644
--- a/ru/index.html
+++ b/ru/index.html
@@ -25,5 +25,3 @@ 

Ruby это...

--- - -{% include unmaintained.html %} From e2e070d129859841d20938e2389ee48bfc8c4724 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Sun, 31 Oct 2021 21:26:36 +0100 Subject: [PATCH 0447/1487] Remove Google Analytics --- _includes/analytics.html | 13 ------------- _layouts/default.html | 2 -- 2 files changed, 15 deletions(-) delete mode 100644 _includes/analytics.html diff --git a/_includes/analytics.html b/_includes/analytics.html deleted file mode 100644 index a7857b1cb9..0000000000 --- a/_includes/analytics.html +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/_layouts/default.html b/_layouts/default.html index 1dcd676b34..e963a7ce7a 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -78,7 +78,5 @@

{{ site.data.locales[page.lang].slogan }}

{% include credits.html %} - - {% include analytics.html %} From 16c3252e6cf2144eafc605d573d76a36740b6a15 Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Tue, 2 Nov 2021 23:17:00 +0300 Subject: [PATCH 0448/1487] Prepare ru locale maintained (ru) - set locale to admin/translation-status page - do redirect to locale from /index.html - see #2721 for more details --- _plugins/translation_status.rb | 2 +- index.html | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/_plugins/translation_status.rb b/_plugins/translation_status.rb index 65732e316b..0e7d1d53d8 100644 --- a/_plugins/translation_status.rb +++ b/_plugins/translation_status.rb @@ -8,7 +8,7 @@ module Jekyll # Outputs HTML. module TranslationStatus - LANGS = %w[en de es id ja ko pt tr zh_cn zh_tw].freeze + LANGS = %w[en de es id ja ko pt ru tr zh_cn zh_tw].freeze START_DATE = "2013-04-01" OK_CHAR = "✓" diff --git a/index.html b/index.html index a3024b2082..ee0dfd348b 100644 --- a/index.html +++ b/index.html @@ -11,6 +11,7 @@ "ja": "ja", "ko": "ko", "pt": "pt", + "ru": "ru", "tr": "tr", "zh-CN": "zh_cn", "zh-TW": "zh_tw" From f5f196e99cf93c820adb4152e876846f9fae240a Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Sat, 30 Oct 2021 19:24:34 +0700 Subject: [PATCH 0449/1487] Translate CVE-2021-31799: A command injection vulnerability in RDoc (id) --- ...2021-05-02-os-command-injection-in-rdoc.md | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 id/news/_posts/2021-05-02-os-command-injection-in-rdoc.md diff --git a/id/news/_posts/2021-05-02-os-command-injection-in-rdoc.md b/id/news/_posts/2021-05-02-os-command-injection-in-rdoc.md new file mode 100644 index 0000000000..1fedaee221 --- /dev/null +++ b/id/news/_posts/2021-05-02-os-command-injection-in-rdoc.md @@ -0,0 +1,54 @@ +--- +layout: news_post +title: "CVE-2021-31799: Sebuah kerentanan command injection pada RDoc" +author: "aycabta" +translator: "meisyal" +date: 2021-05-02 09:00:00 +0000 +tags: security +lang: id +--- + +Ada sebuah kerentanan *Command Injection* pada RDoc yang di-*bundle* dengan +Ruby. Semua pengguna Ruby direkomendasikan untuk memperbarui RDoc ke versi +terbaru untuk memperbaiki kerentanan ini. + +## Detail + +Berikut adalah kerentanan yang telah dilaporkan. + +* [CVE-2021-31799](https://nvd.nist.gov/vuln/detail/CVE-2021-31799) + +RDoc sebelumnya memanggil `Kernel#open` untuk membuat sebuah berkas lokal. Jika +sebuah proyek Ruby memiliki sebuah berkas yang mana nama berkas dimulai dengan +`|` dan diakhiri `tags`, perintah yang mengikuti karater pipa akan dieksekusi. +Sebuah proyek Ruby yang berbahaya bisa saja memanfaatkan ini untuk menjalankan +sebuah perintah yang tidak seharusnya pada seorang pengguna yang mencoba untuk +menjalankan perintah `rdoc`. + +Pengguna Ruby yang terimbas dengan kerentanan ini seharusnya memperbarui RDoc +ke versi terbaru. + +## Versi Terimbas + +* Semua rilis RDoc dari 3.11 sampai 6.3.0 + +## Cara Memperbarui + +Jalankan perintah berikut untuk memperbarui RDoc ke versi terbaru (6.3.1 atau +setelahnya). + +``` +gem install rdoc +``` + +Jika Anda menggunakan *bundler*, mohon tambahkan `gem "rdoc", ">= 6.3.1"` pada +`Gemfile` Anda. + +## Rujukan + +Terima kasih kepada [Alexandr Savca](https://hackerone.com/chinarulezzz) yang +telah melaporkan kerentanan ini. + +## Riwayat + +* Semula dipublikasikan pada 2021-05-02 09:00:00 UTC From b7add26280870083b6eed0d79e18d5ae8da7e5a2 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Sun, 7 Nov 2021 12:51:22 +0900 Subject: [PATCH 0450/1487] CVE-2021-41817: ReDoS of date parsing methods --- ...arsing-method-regexp-dos-cve-2021-41817.md | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md diff --git a/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md b/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md new file mode 100644 index 0000000000..6918d96ff1 --- /dev/null +++ b/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md @@ -0,0 +1,34 @@ +--- +layout: news_post +title: "CVE-2021-41817: Regular Expression Denial of Service Vunlerability of Date Parsing Methods" +author: "mame" +translator: +date: 2021-11-15 12:00:00 +0000 +tags: security +lang: en +--- + +Regular expression denial of service vulnerability of date parsing methods was found. An attacker can exploit this vulnerability to cause an effective denial of service. + +## Details + +Date's parsing methods including `Date.parse` are using Regexps internally, some of which are vulnerable against regular expression denial of service. Applications and libraries that apply such methods to untrusted input may be affected. + +The fix limits the input length up to 128 bytes by default instead of changing the regexps. This is because Date gem uses many Regexps and it is possible that there are still undiscovered vulnerable Regexps. For compatibility, it is allowed to remove the limitation by explicitly passing `limit` keywords as `nil` like `Date.parse(str, limit: nil)`, but note that it may take a long time to parse. + +Please update the date gem to version 3.2.1, 3.1.2, 3.0.2, and 2.0.1, or later. You can use `gem update date` to update it. If you are using bundler, please add `gem "date", ">= 3.2.1"` to your `Gemfile`. + +## Affected versions + +* date gem 2.0.0 or prior (which are bundled versions with Ruby 2.6 series) +* date gem 3.0.1 or prior (which are bundled versions with Ruby 2.7 series) +* date gem 3.1.1 or prior (which are bundled versions with Ruby 3.0 series) +* date gem 3.2.0 or prior + +## Credits + +Thanks to [svalkanov](https://hackerone.com/svalkanov) for discovering this issue. + +## History + +* Originally published at 2021-11-15 12:00:00 (UTC) From ac0344657d370cb1d7d2fad64521ebac11b87e05 Mon Sep 17 00:00:00 2001 From: "NARUSE, Yui" Date: Tue, 9 Nov 2021 18:51:11 +0900 Subject: [PATCH 0451/1487] Ruby 3.1.0 Preview 1 Released (#2726) * Ruby 3.1.0 Preview 1 Released * Apply suggestions from code review Co-authored-by: Koichi ITO Co-authored-by: Koichi ITO --- _data/branches.yml | 5 + _data/downloads.yml | 1 + _data/releases.yml | 26 +++ ...2021-11-09-ruby-3-1-0-preview1-released.md | 218 ++++++++++++++++++ 4 files changed, 250 insertions(+) create mode 100644 en/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md diff --git a/_data/branches.yml b/_data/branches.yml index 76ed04e496..ebd2220b93 100644 --- a/_data/branches.yml +++ b/_data/branches.yml @@ -8,6 +8,11 @@ # date: date of first stable release (YYYY-MM-DD) # eol_date: date of EOL (YYYY-MM-DD) +- name: 3.1 + status: preview + date: + eol_date: + - name: 3.0 status: normal maintenance date: 2020-12-25 diff --git a/_data/downloads.yml b/_data/downloads.yml index f0926cb30d..ff61bd1094 100644 --- a/_data/downloads.yml +++ b/_data/downloads.yml @@ -4,6 +4,7 @@ # optional preview: + - 3.1.0-preview1 stable: diff --git a/_data/releases.yml b/_data/releases.yml index 2a33bc205c..b9517dda24 100644 --- a/_data/releases.yml +++ b/_data/releases.yml @@ -19,6 +19,32 @@ # In order to get the release listed on the downloads page, # you also need to add an entry to `_data/downloads.yml'. +# 3.1 series + +- version: 3.1.0-preview1 + date: 2021-11-09 + post: /en/news/2021/11/09/ruby-3-1-0-preview1-released/ + url: + gz: https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.0-preview1.tar.gz + zip: https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.0-preview1.zip + xz: https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.0-preview1.tar.xz + size: + gz: 20821221 + zip: 25019629 + xz: 15742844 + sha1: + gz: 40dfd3db076a49fab9a0eee51e89d9b3d16a4e23 + zip: ef5fa22890e55935db4b96b3089a8aea1335bd85 + xz: 22aa861b17031cd1b163b7443f5f2f5897c5895e + sha256: + gz: 540f49f4c3aceb1a5d7fb0b8522a04dd96bc4a22f9660a6b59629886c8e010d4 + zip: 4e8d118b2365164873148ac545a8fa36c098b846a9b19ebb9037f8ee9adb4414 + xz: 86a836ad42f6a7a469fce71ffec48fd3184af55bf79e488b568a4f64adee551d + sha512: + gz: 63f528f20905827d03649ed9804e4a4e5c15078f9c6c8efcfb306baa7baafa17a406eb09a2c08b42e151e14af33b1aadbd9fb1cc84f9353d070b54bbf1ff950d + zip: 917803aac0848e00871614a09740b5c9cca26f200d68580dde61666633f1b7fee506e25ea4ed0c38eb20149417bf9f1ed449a4d2aec5b726de670e7177e5c07a + xz: bdbd7c624197ca478658280d84123a8c12ae72425bc566dcc75989c5b5ef114dd57e64efc09e2413ed615d9b47621a70ace0f3612e8ca7ba853822ad9e88c0b0 + # 3.0 series - version: 3.0.2 diff --git a/en/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md b/en/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md new file mode 100644 index 0000000000..4011a2da87 --- /dev/null +++ b/en/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md @@ -0,0 +1,218 @@ +--- +layout: news_post +title: "Ruby 3.1.0 Preview 1 Released" +author: "naruse" +translator: +date: 2021-11-09 00:00:00 +0000 +lang: en +--- + +We are pleased to announce the release of Ruby {{ release.version }}. + +{% assign release = site.data.releases | where: "version", "3.1.0-preview1" | first %} + + +## YJIT: New experimental in-process JIT compiler + + +Ruby 3.1 merges YJIT, a new in-process JIT compiler developed by Shopify. + +Since [Ruby 2.6 introduced MJIT in 2018](https://www.ruby-lang.org/en/news/2018/12/25/ruby-2-6-0-released/), its performance greatly improved, and finally [we achieved Ruby3x3 last year](https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/). But even though Optcarrot has shown impressive speedups, the JIT hasn't benefited real world business applications. + +Recently Shopify contributed many Ruby improvements to speed up their Rails application. YJIT is an important contribution, and aims to improve the performance of Rails applications. + +Though MJIT is a method-based JIT compiler and uses an external C compiler, YJIT uses Basic Block Versioning and includes JIT compiler inside it. With Lazy Basic Block Versioning (LBBV) it first compiles the beginning of a method, and incrementally compiles the rest when the type of arguments and variables are dynamically determined. See [YJIT: a basic block versioning JIT compiler for CRuby](https://dl.acm.org/doi/10.1145/3486606.3486781) for a detailed introduction. + +With this technology, YJIT achieves both fast warmup time and performance improvements on most real-world software, up to 22% on railsbench, 39% on liquid-render. + + + +YJIT is still an experimental feature, and as such, it is disabled by default. If you want to use this, specify the `--yjit` command-line option to enable YJIT. It is also limited to macOS & Linux on x86-64 platforms for now. + +* https://bugs.ruby-lang.org/issues/18229 +* https://shopify.engineering/yjit-just-in-time-compiler-cruby +* https://www.youtube.com/watch?v=PBVLf3yfMs8 + +## debug gem: A new debugger + +A new debugger [debug.gem](https://github.com/ruby/debug) is bundled. debug.gem is fast debugger implementation and it provides many features like remote debugging, colorful REPL, IDE (VSCode) integration and more. It replaces `lib/debug.rb` standard library. + +## error_highlight: Fine-grained error location in backtrace + +A built-in gem, error_highlight, has been introduced. It includes fine-grained error location in backtrace: + +``` +$ ruby test.rb +test.rb:1:in `
': undefined method `time' for 1:Integer (NoMethodError) + +1.time {} + ^^^^^ +Did you mean? times +``` + +This gem is enabled by default. You can disable it by using a command-line option `--disable-error_highlight`. See [the repository](https://github.com/ruby/error_highlight) in detail. + +## Irb improvement + +To be described in next preview. + +## Other Notable New Features + +### Language + +* Values in Hash literals and keyword arguments can be omitted. [Feature #14579] + * `{x:, y:}` is a syntax sugar of `{x: x, y: y}`. + * `foo(x:, y:)` is a syntax sugar of `foo(x: x, y: y)`. + +* Pin operator in pattern matching now takes an expression. [Feature #17411] + +```ruby +Prime.each_cons(2).lazy.find_all{_1 in [n, ^(n + 2)]}.take(3).to_a +#=> [[3, 5], [5, 7], [11, 13]] +``` + + +### RBS + +RBS is a language to describe the structure of Ruby programs. See [the repository](https://github.com/ruby/rbs) for detail. + +Updates since Ruby 3.0.0: + +* `rbs collection` has been introduced to manage gems' RBSs. [doc](https://github.com/ruby/rbs/blob/master/docs/collection.md) +* Many signatures for built-in and standard libraries have been added/updated. +* It includes many bug fixes and performance improvements too. + +See [the CHANGELOG.md](https://github.com/ruby/rbs/blob/master/CHANGELOG.md) for more information. + +### TypeProf + +TypeProf is a static type analyzer for Ruby. It generates a prototype of RBS from non-type-annotated Ruby code. See [the document](https://github.com/ruby/typeprof/blob/master/doc/doc.md) for detail. + +Updates since Ruby 3.0.0: + +* [Experimental IDE support](https://github.com/ruby/typeprof/blob/master/doc/ide.md) has been implemented. +* Many bug fixes and performance improvements. + +## Performance improvements + +* MJIT + * For workloads like Rails, the default `--jit-max-cache` is changed from 100 to 10000. + The JIT compiler no longer skips compilation of methods longer than 1000 instructions. + * To support Zeitwerk of Rails, JIT-ed code is no longer cancelled + when a TracePoint for class events is enabled. + +## Other notable changes since 3.0 + +* One-line pattern matching, e.g., `ary => [x, y, z]`, is no longer experimental. +* Multiple assignment evaluation order has been changed slightly. [Bug #4443]] + * `foo[0], bar[0] = baz, qux` was evaluated in order `baz`, `qux`, `foo`, and then `bar` in Ruby 3.0. In Ruby 3.1, it is evaluated in order `foo`, `bar`, `baz`, and then `qux`. +* Variable Width Allocation: Strings (experimental) [[Bug #18239]](https://bugs.ruby-lang.org/issues/18239) + +### Standard libraries updates + +* Some standard libraries are updated. + * RubyGems + * Bundler + * RDoc 6.4.0 + * ReLine + * JSON 2.6.0 + * Psych 4.0.2 + * FileUtils 1.6.0 + * Fiddle + * StringIO 3.0.1 + * IO::Console 0.5.9 + * IO::Wait 0.2.0 + * CSV + * Etc 1.3.0 + * Date 3.2.0 + * Zlib 2.1.1 + * StringScanner + * IpAddr + * Logger 1.4.4 + * OStruct 0.5.0 + * Irb + * Racc 1.6.0 + * Delegate 0.2.0 + * Benchmark 0.2.0 + * CGI 0.3.0 + * Readline(C-ext) 0.1.3 + * Timeout 0.2.0 + * YAML 0.2.0 + * URI 0.11.0 + * OpenSSL + * DidYouMean + * Weakref 0.1.1 + * Tempfile 0.1.2 + * TmpDir 0.1.2 + * English 0.7.1 + * Net::Protocol 0.1.2 + * Net::Http 0.2.0 + * BigDecimal + * OptionParser 0.2.0 + * Set + * Find 0.1.1 + * Rinda 0.1.1 + * Erb + * NKF 0.1.1 + * Base64 0.1.1 + * OpenUri 0.2.0 + * SecureRandom 0.1.1 + * Resolv 0.2.1 + * Resolv::Replace 0.1.0 + * Time 0.2.0 + * PP 0.2.1 + * Prettyprint 0.1.1 + * Drb 2.1.0 + * Pathname 0.2.0 + * Digest 3.1.0.pre2 + * Un 0.2.0 +* The following bundled gems are updated. + * minitest 5.14.4 + * power_assert 2.0.1 + * rake 13.0.6 + * test-unit 3.5.0 + * rbs 1.6.2 + * typeprof 0.20.0 +* The following default gems are now bundled gems. + * net-ftp + * net-imap + * net-pop + * net-smtp + * matrix + * prime + +See [NEWS](https://github.com/ruby/ruby/blob/{{ release.tag }}/NEWS.md) +or [commit logs](https://github.com/ruby/ruby/compare/v3_0_0...{{ release.tag }}) +for more details. + +With those changes, [{{ release.stats.files_changed }} files changed, {{ release.stats.insertions }} insertions(+), {{ release.stats.deletions }} deletions(-)](https://github.com/ruby/ruby/compare/v3_0_0...{{ release.tag }}#file_bucket) +since Ruby 3.0.0! + +## Download + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## What is Ruby + +Ruby was first developed by Matz (Yukihiro Matsumoto) in 1993, +and is now developed as Open Source. It runs on multiple platforms +and is used all over the world especially for web development. From 55cacc1594da88f81d3d2c753dbb102d67676fc3 Mon Sep 17 00:00:00 2001 From: "NARUSE, Yui" Date: Tue, 9 Nov 2021 19:15:52 +0900 Subject: [PATCH 0452/1487] fix _data/releases.yml (#2727) --- _data/releases.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/_data/releases.yml b/_data/releases.yml index b9517dda24..1495ba54d1 100644 --- a/_data/releases.yml +++ b/_data/releases.yml @@ -24,6 +24,11 @@ - version: 3.1.0-preview1 date: 2021-11-09 post: /en/news/2021/11/09/ruby-3-1-0-preview1-released/ + tag: ruby_3_1_0_preview1 + stats: + files_changed: 2963 + insertions: 529321 + deletions: 92305 url: gz: https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.0-preview1.tar.gz zip: https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.0-preview1.zip From 0e3dc53ed5ce5d2051d4ce2183b640e0e2afaf5b Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Sat, 6 Nov 2021 18:34:26 +0700 Subject: [PATCH 0453/1487] Fix title and link to translated posts (id) --- id/news/_posts/2021-04-05-ruby-2-5-9-released.md | 2 +- id/news/_posts/2021-04-05-ruby-2-6-7-released.md | 4 ++-- id/news/_posts/2021-04-05-ruby-2-7-3-released.md | 2 +- id/news/_posts/2021-04-05-ruby-3-0-1-released.md | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/id/news/_posts/2021-04-05-ruby-2-5-9-released.md b/id/news/_posts/2021-04-05-ruby-2-5-9-released.md index 6b2b4412da..8fa7d895df 100644 --- a/id/news/_posts/2021-04-05-ruby-2-5-9-released.md +++ b/id/news/_posts/2021-04-05-ruby-2-5-9-released.md @@ -13,7 +13,7 @@ Rilis ini mencakup beberapa perbaikan keamanan. Mohon cek topik-topik di bawah ini untuk lebih detail. * [CVE-2020-25613: Potensi Kerentanan HTTP Request Smuggling pada WEBrick]({%link id/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md %}) -* [CVE-2021-28965: XML round-trip vulnerability in REXML]({% link en/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md %}) +* [CVE-2021-28965: Kerentanan XML round-trip pada REXML]({% link id/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md %}) Lihat [commit logs](https://github.com/ruby/ruby/compare/v2_5_8...v2_5_9) untuk detail. diff --git a/id/news/_posts/2021-04-05-ruby-2-6-7-released.md b/id/news/_posts/2021-04-05-ruby-2-6-7-released.md index 9eb9e5ef3f..82a0edb22d 100644 --- a/id/news/_posts/2021-04-05-ruby-2-6-7-released.md +++ b/id/news/_posts/2021-04-05-ruby-2-6-7-released.md @@ -13,7 +13,7 @@ Rilis ini memuat perbaikan keamanan. Mohon cek topik-topik di bawah ini untuk lebih detail. * [CVE-2020-25613: Potensi Kerentanan HTTP Request Smuggling pada WEBrick]({%link id/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md %}) -* [CVE-2021-28965: XML round-trip vulnerability in REXML]({% link id/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md %}) +* [CVE-2021-28965: Kerentanan XML round-trip pada REXML]({% link id/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md %}) Lihat [commit logs](https://github.com/ruby/ruby/compare/v2_6_6...v2_6_7) untuk detail. @@ -66,4 +66,4 @@ Banyak *committer*, pengembang, dan pengguna yang telah menyediakan laporan *bug* membantu kami membuat rilis ini. Terima kasih atas kontribusinya. Perawatan Ruby 2.6, termasuk rilis ini, didasarkan pada "Agreement for the Ruby -stable version" dari Ruby Associaction. +stable version" dari Ruby Association. diff --git a/id/news/_posts/2021-04-05-ruby-2-7-3-released.md b/id/news/_posts/2021-04-05-ruby-2-7-3-released.md index 72ab593135..b8f766b376 100644 --- a/id/news/_posts/2021-04-05-ruby-2-7-3-released.md +++ b/id/news/_posts/2021-04-05-ruby-2-7-3-released.md @@ -13,7 +13,7 @@ Rilis ini mencakup perbaikan keamanan. Mohon cek topik-topik di bawah ini untuk lebih detail. * [CVE-2021-28965: Kerentanan XML round-trip pada REXML]({% link id/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md %}) -* [CVE-2021-28966: Path traversal in Tempfile on Windows]({% link en/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md %}) +* [CVE-2021-28966: Path traversal pada Tempfile di Windows]({% link id/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md %}) Cek [commit logs](https://github.com/ruby/ruby/compare/v2_7_2...v2_7_3) untuk detail. diff --git a/id/news/_posts/2021-04-05-ruby-3-0-1-released.md b/id/news/_posts/2021-04-05-ruby-3-0-1-released.md index 282f9a5822..b18565ffdb 100644 --- a/id/news/_posts/2021-04-05-ruby-3-0-1-released.md +++ b/id/news/_posts/2021-04-05-ruby-3-0-1-released.md @@ -13,7 +13,7 @@ Rilis ini memuat perbaikan keamanan. Mohon cek topik-topik di bawah ini untuk lebih detail. * [CVE-2021-28965: Kerentanan XML round-trip pada REXML]({% link id/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md %}) -* [CVE-2021-28966: Path traversal in Tempfile on Windows]({% link en/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md %}) +* [CVE-2021-28966: Path traversal pada Tempfile di Windows]({% link id/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md %}) Lihat [commit logs](https://github.com/ruby/ruby/compare/v3_0_0...v3_0_1) untuk detail. From c0dc4a3aaad9815263d0aea8304d9d7091336024 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Thu, 11 Nov 2021 15:20:36 -0500 Subject: [PATCH 0454/1487] Fix tag name for Ruby 3.1.0-preview1 Links are broken in the release page because the release tag is `v3_1_0_preview1` and not `ruby_3_1_0_preview1`. --- _data/releases.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_data/releases.yml b/_data/releases.yml index 1495ba54d1..15878152b8 100644 --- a/_data/releases.yml +++ b/_data/releases.yml @@ -24,7 +24,7 @@ - version: 3.1.0-preview1 date: 2021-11-09 post: /en/news/2021/11/09/ruby-3-1-0-preview1-released/ - tag: ruby_3_1_0_preview1 + tag: v3_1_0_preview1 stats: files_changed: 2963 insertions: 529321 From 2ce5cd6c8a72592c8e36340ced264ed66e9acc3b Mon Sep 17 00:00:00 2001 From: vurtn Date: Thu, 11 Nov 2021 21:28:10 +0100 Subject: [PATCH 0455/1487] translation of ruby 3.1.0 preview1 (fr) --- ...2021-11-09-ruby-3-1-0-preview1-released.md | 215 ++++++++++++++++++ 1 file changed, 215 insertions(+) create mode 100644 fr/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md diff --git a/fr/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md b/fr/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md new file mode 100644 index 0000000000..d80e6c8737 --- /dev/null +++ b/fr/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md @@ -0,0 +1,215 @@ +--- +layout: news_post +title: "Ruby 3.1.0 Preview 1 est disponible" +author: "naruse" +translator: "Kevin Rosaz" +date: 2021-11-09 00:00:00 +0000 +lang: fr +--- +{% assign release = site.data.releases | where: "version", "3.1.0-preview1" | first %} + +Nous avons le plaisir de vous annoncer la sortie de Ruby {{ release.version }}. + + +## YJIT: un nouveau compilateur JIT en cours de développement + + +Ruby 3.1 fusionne YJIT, un nouveau compilateur JIT développé par Shopify. + +Depuis que [Ruby 2.6 a introduit MJIT en 2018](https://www.ruby-lang.org/en/news/2018/12/25/ruby-2-6-0-released/), ses performances se sont grandement améliorées et [nous sommes parvenus à Ruby3x3 l'année dernière](https://www.ruby-lang.org/fr/news/2020/12/25/ruby-3-0-0-released/). Même si Optcarrot a montré des accélérations impressionnantes, le JIT n'a pas profité aux applications du monde professionnel. + +Récemment, Shopify a apporté de nombreuses améliorations à Ruby pour accélérer son application Rails. YJIT est une contribution importante et vise à améliorer les performances des applications Rails. + +Bien que MJIT soit un compilateur JIT basé sur des méthodes et qu'il utilise un compilateur C externe, YJIT utilise le Basic Block Versioning et inclut le compilateur JIT à l'intérieur. Avec Lazy Basic Block Versioning (LBBV), cela compile d'abord le début d'une méthode et compile progressivement le reste lorsque le type des arguments et des variables est déterminé dynamiquement. Voir [YJIT: a basic block versioning JIT compiler for CRuby](https://dl.acm.org/doi/10.1145/3486606.3486781) pour une introduction détaillée. + +Avec cette technologie, YJIT permet d'avoir à la fois un temps de démarrage rapide et des améliorations de performance sur la plupart des logiciels, jusqu'à 22% sur railsbench et 39% sur le rendu liquid. + + + +YJIT est toujours une fonctionnalité expérimentale. En tant que telle, elle est désactivée par défaut. Si vous souhaitez l'utiliser, spécifiez l'option en ligne de commande `--yjit` pour activer YJIT. L'utilisation est pour le moment limitée à macOS et Linux sur les plateformes x86-64. + +* https://bugs.ruby-lang.org/issues/18229 +* https://shopify.engineering/yjit-just-in-time-compiler-cruby +* https://www.youtube.com/watch?v=PBVLf3yfMs8 + +## debug gem: un nouveau débogueur + +Un nouveau débogueur [debug.gem](https://github.com/ruby/debug) est inclu. debug.gem est une implémentation rapide du débogueur et fournit de nombreuses fonctionnalités telles que le débogage à distance, un REPL coloré, une intégration dans un IDE (VSCode) et bien plus encore. Cela remplace `lib/debug.rb` de la bibliothèque standard. + +## error_highlight: localisation des erreurs plus précise + +La gemme error_highlight a été ajoutée. Elle permet d'obtenir la localisation d'une erreur de manière plus précise dans la trace : + +``` +$ ruby test.rb +test.rb:1:in `
': undefined method `time' for 1:Integer (NoMethodError) + +1.time {} + ^^^^^ +Did you mean? times +``` + +Cette gemme est activée par défaut. Vous pouvez la désactiver en utilisant l'option en ligne de commande `--disable-error_highlight`. Voir [le dépôt](https://github.com/ruby/error_highlight) pour de plus amples informations. + +## Amélioration d'IRB + +À décrire dans le prochain aperçu. + +## Autres nouvelles fonctionnalités notables + +### Language + +* Les valeurs dans les littéraux de hachage peuvent être omis. [Feature #14579] + * `{x:, y:}` est un sucre syntaxique de `{x: x, y: y}`. + * `foo(x:, y:)` est un sucre syntaxique de `foo(x: x, y: y)`. + +* L'opérateur pin dans le filtrage par motif prend désormais une expression. [Feature #17411] + +```ruby +Prime.each_cons(2).lazy.find_all{_1 in [n, ^(n + 2)]}.take(3).to_a +#=> [[3, 5], [5, 7], [11, 13]] +``` + + +### RBS + +RBS est un langage pour décrire la structure des programmes Ruby. Voir [le dépôt](https://github.com/ruby/rbs) pour de plus amples informations. + +Mises à jour depuis Ruby 3.0.0: + +* `rbs collection` a été introduite pour gérer les RBS des gemmes. [doc](https://github.com/ruby/rbs/blob/master/docs/collection.md) +* Plusieurs signatures pour des bibliothèques intégrées et standards ont été ajoutées/mises à jour. +* Il y a également de nombreuses corrections de bogues et d'améliorations de performance. + +Voir [le CHANGELOG.md](https://github.com/ruby/rbs/blob/master/CHANGELOG.md) pour de plus amples informations. + +### TypeProf + +TypeProf est un analyseur de type statique pour Ruby. Il génère un prototype de RBS à partir de code Ruby non annoté de type. Voir [le document](https://github.com/ruby/typeprof/blob/master/doc/doc.md) pour de plus amples informations. + +Mises à jour depuis Ruby 3.0.0 : + +* [Le support expérimental pour IDE](https://github.com/ruby/typeprof/blob/master/doc/ide.md) a été implémenté. +* Il y a également de nombreuses corrections de bogues et d'améliorations de performance. + +## Amélioration de performance + +* MJIT + * Pour les charges de travail telles que Rails, la valeur par défaut `--jit-max-cache` passe de 100 à 10000. + Le compilateur JIT ne saute plus la compilation des méthodes de plus de 1000 instructions. + * Pour prendre en charge Zeitwerk de Rails, le code généré par le compilateur JIT n'est plus annulé + lorsqu'un TracePoint est activé pour les évènements de classe. + +## Autres changements notables depuis la version 3.0 + +* Le filtrage par motif en une ligne, e.g., `ary => [x, y, z]`, n'est plus au stade expérimental. +* L'ordre d'évaluation des affectations multiples a été légèrement modifié. [[Bug #4443]](https://bugs.ruby-lang.org/issues/4443) + * `foo[0], bar[0] = baz, qux` était évalué dans l'ordre `baz`, `qux`, `foo` puis `bar` dans Ruby 3.0. Dans Ruby 3.1, l'évaluation est dans l'ordre `foo`, `bar`, `baz` puis `qux`. +* Allocation de la taille d'une variable: Strings (expérimental) [[Bug #18239]](https://bugs.ruby-lang.org/issues/18239) + +### Mises à jour des bibliothèques standards + +* Plusieurs bibliothèques standards ont été mises à jour. + * RubyGems + * Bundler + * RDoc 6.4.0 + * ReLine + * JSON 2.6.0 + * Psych 4.0.2 + * FileUtils 1.6.0 + * Fiddle + * StringIO 3.0.1 + * IO::Console 0.5.9 + * IO::Wait 0.2.0 + * CSV + * Etc 1.3.0 + * Date 3.2.0 + * Zlib 2.1.1 + * StringScanner + * IpAddr + * Logger 1.4.4 + * OStruct 0.5.0 + * Irb + * Racc 1.6.0 + * Delegate 0.2.0 + * Benchmark 0.2.0 + * CGI 0.3.0 + * Readline(C-ext) 0.1.3 + * Timeout 0.2.0 + * YAML 0.2.0 + * URI 0.11.0 + * OpenSSL + * DidYouMean + * Weakref 0.1.1 + * Tempfile 0.1.2 + * TmpDir 0.1.2 + * English 0.7.1 + * Net::Protocol 0.1.2 + * Net::Http 0.2.0 + * BigDecimal + * OptionParser 0.2.0 + * Set + * Find 0.1.1 + * Rinda 0.1.1 + * Erb + * NKF 0.1.1 + * Base64 0.1.1 + * OpenUri 0.2.0 + * SecureRandom 0.1.1 + * Resolv 0.2.1 + * Resolv::Replace 0.1.0 + * Time 0.2.0 + * PP 0.2.1 + * Prettyprint 0.1.1 + * Drb 2.1.0 + * Pathname 0.2.0 + * Digest 3.1.0.pre2 + * Un 0.2.0 +* Les gemmes incluses suivantes ont été mises à jour. + * minitest 5.14.4 + * power_assert 2.0.1 + * rake 13.0.6 + * test-unit 3.5.0 + * rbs 1.6.2 + * typeprof 0.20.0 +* Les gemmes par défaut suivantes sont désormais incluses. + * net-ftp + * net-imap + * net-pop + * net-smtp + * matrix + * prime + +Voir [NEWS](https://github.com/ruby/ruby/blob/{{ release.tag }}/NEWS.md) +ou les [logs de commit](https://github.com/ruby/ruby/compare/v3_0_0...{{ release.tag }}) +pour de plus amples informations. + +Avec ces changements, [{{ release.stats.files_changed }} fichiers changés, {{ release.stats.insertions }} insertions(+), {{ release.stats.deletions }} suppressions(-)](https://github.com/ruby/ruby/compare/v3_0_0...{{ release.tag }}#file_bucket) +depuis Ruby 3.0.0! + +## Téléchargement + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Ruby, c'est quoi ? + +Ruby a été initialement développé par Matz (Yukihiro Matsumoto) en 1993 puis est devenu open source. Il fonctionne sur de nombreuses plateformes et est utilisé partout dans le monde, en particulier pour le développement web. From d4d072d9f9afce6ab4018ceaab0f4b6a05eb2562 Mon Sep 17 00:00:00 2001 From: vurtn Date: Thu, 11 Nov 2021 21:33:28 +0100 Subject: [PATCH 0456/1487] Add link to bug#4443 --- en/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md b/en/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md index 4011a2da87..7904833062 100644 --- a/en/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md +++ b/en/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md @@ -104,7 +104,7 @@ Updates since Ruby 3.0.0: ## Other notable changes since 3.0 * One-line pattern matching, e.g., `ary => [x, y, z]`, is no longer experimental. -* Multiple assignment evaluation order has been changed slightly. [Bug #4443]] +* Multiple assignment evaluation order has been changed slightly. [[Bug #4443]](https://bugs.ruby-lang.org/issues/4443) * `foo[0], bar[0] = baz, qux` was evaluated in order `baz`, `qux`, `foo`, and then `bar` in Ruby 3.0. In Ruby 3.1, it is evaluated in order `foo`, `bar`, `baz`, and then `qux`. * Variable Width Allocation: Strings (experimental) [[Bug #18239]](https://bugs.ruby-lang.org/issues/18239) From 4ba077e10411c2a2a1daa5f34c832012bf21d19a Mon Sep 17 00:00:00 2001 From: Jacob Herrington Date: Fri, 12 Nov 2021 18:22:26 +0000 Subject: [PATCH 0457/1487] Add Remote Ruby podcasts After 154 episodes released, I think it is safe to include Remote Ruby in this list. There is a ton of great Ruby-based content being created on the podcast and they were even included in the podcast panel at RubyConf 2021. --- en/community/podcasts/index.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/en/community/podcasts/index.md b/en/community/podcasts/index.md index ae67b44f8c..0f533be95b 100644 --- a/en/community/podcasts/index.md +++ b/en/community/podcasts/index.md @@ -14,6 +14,10 @@ Listen to news, interviews, and discussions about Ruby and its community. : The Ruby on Rails Podcast, a weekly conversation about Ruby on Rails, open source software, and the programming profession. +[Remote Ruby][remote_ruby] +: Virtual meetup turned podcast, Remote Ruby celebrates and highlights + the Ruby community in an informal setting. + ### Getting Involved Podcast hosts are always looking for guests. If you have some Ruby @@ -21,5 +25,6 @@ wisdom to share, get in touch with the creators of these shows. You can also start your own Ruby podcast and get added to this list! +[remote_ruby]: https://remoteruby.transistor.fm/ [rorpodcast]: http://5by5.tv/rubyonrails [rogues]: https://devchat.tv/ruby-rogues From 4828a3839ad6e008884c2832efced9c1032beef7 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Mon, 15 Nov 2021 15:35:11 +0900 Subject: [PATCH 0458/1487] Fix the URL to the bug founder --- .../2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md b/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md index 6918d96ff1..68210bd080 100644 --- a/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md +++ b/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md @@ -27,7 +27,7 @@ Please update the date gem to version 3.2.1, 3.1.2, 3.0.2, and 2.0.1, or later. ## Credits -Thanks to [svalkanov](https://hackerone.com/svalkanov) for discovering this issue. +Thanks to [svalkanov](https://github.com/SValkanov/) for discovering this issue. ## History From 10676a0103540b93b4cf4d0fb6108da54156e226 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Mon, 15 Nov 2021 17:28:29 +0900 Subject: [PATCH 0459/1487] Update the release time --- ...021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md b/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md index 68210bd080..c60ae5f22b 100644 --- a/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md +++ b/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md @@ -3,7 +3,7 @@ layout: news_post title: "CVE-2021-41817: Regular Expression Denial of Service Vunlerability of Date Parsing Methods" author: "mame" translator: -date: 2021-11-15 12:00:00 +0000 +date: 2021-11-15 08:00:00 +0000 tags: security lang: en --- @@ -31,4 +31,4 @@ Thanks to [svalkanov](https://github.com/SValkanov/) for discovering this issue. ## History -* Originally published at 2021-11-15 12:00:00 (UTC) +* Originally published at 2021-11-15 08:00:00 (UTC) From b4785b44bb64686b56ee995243322b080ffcb491 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Mon, 15 Nov 2021 17:35:03 +0900 Subject: [PATCH 0460/1487] Improve English Co-authored-by: Sorah Fukumori --- .../2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md b/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md index c60ae5f22b..69ff12a426 100644 --- a/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md +++ b/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md @@ -8,7 +8,7 @@ tags: security lang: en --- -Regular expression denial of service vulnerability of date parsing methods was found. An attacker can exploit this vulnerability to cause an effective denial of service. +We have released date gem version 3.2.1, 3.1.2, 3.0.2, and 2.0.1 that include a security fix for a regular expression denial of service vulnerability (ReDoS) on date parsing methods. An attacker can exploit this vulnerability to cause an effective DoS attack. ## Details From 3ccb7c53d187fd0a6bbf6106f15dd174dd65c01d Mon Sep 17 00:00:00 2001 From: "Joseph D. Cohen" Date: Mon, 15 Nov 2021 06:10:31 -0800 Subject: [PATCH 0461/1487] Update 2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md Fix typo in headline --- .../2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md b/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md index 69ff12a426..9306b21675 100644 --- a/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md +++ b/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md @@ -1,6 +1,6 @@ --- layout: news_post -title: "CVE-2021-41817: Regular Expression Denial of Service Vunlerability of Date Parsing Methods" +title: "CVE-2021-41817: Regular Expression Denial of Service Vulnerability of Date Parsing Methods" author: "mame" translator: date: 2021-11-15 08:00:00 +0000 From d5843f78080620394364f9f58d20290a249fd162 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 16 Nov 2021 13:29:32 +0900 Subject: [PATCH 0462/1487] Fixes #2151 --- _data/locales/ja.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_data/locales/ja.yml b/_data/locales/ja.yml index d671aa0878..54543eef87 100644 --- a/_data/locales/ja.yml +++ b/_data/locales/ja.yml @@ -65,10 +65,10 @@ sidebar: text: 日本Rubyの会 url: http://ruby-no-kai.org/ description: Rubyの利用者/開発者の支援を目的としたグループです。 - weblogs: - text: 更新順リンク - url: http://www.rubyist.net/~kazu/samidare/ - description: Ruby関連のサイトのリンクを更新順に並べたものです。 + # weblogs: + # text: 更新順リンク + # url: http://www.rubyist.net/~kazu/samidare/ + # description: Ruby関連のサイトのリンクを更新順に並べたものです。 # ruby_core: # text: Ruby Core # url: /ja/community/ruby-core/ From fca1542763449250261863927fe1e455e7ca63c1 Mon Sep 17 00:00:00 2001 From: ytjmt <46666464+ytjmt@users.noreply.github.com> Date: Wed, 17 Nov 2021 00:21:45 +0900 Subject: [PATCH 0463/1487] Translate "CVE-2021-41817: Regular Expression Denial of Service Vulnerability of Date Parsing Methods" (ja) --- ...arsing-method-regexp-dos-cve-2021-41817.md | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 ja/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md diff --git a/ja/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md b/ja/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md new file mode 100644 index 0000000000..87f5fd3cfa --- /dev/null +++ b/ja/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md @@ -0,0 +1,34 @@ +--- +layout: news_post +title: "CVE-2021-41817: 日付をパースするメソッドにおける正規表現 Denial of Service の脆弱性について" +author: "mame" +translator: "ytjmt" +date: 2021-11-15 08:00:00 +0000 +tags: security +lang: ja +--- + +日付をパースするメソッドにおける正規表現 Denial of Service(ReDoS)脆弱性の修正を含む、date gem 3.2.1、3.1.2、3.0.2、2.0.1 をリリースしました。攻撃者はこの脆弱性を悪用し、効果的な DoS 攻撃を引き起こすことができます。 + +## 詳細 + +`Date.parse` を含む、日付をパースするメソッドの内部では正規表現を利用しており、これらには ReDoS 攻撃に対して脆弱なものがあります。信頼できない入力値に対してこれらのメソッドを適用しているアプリケーションおよびライブラリはこの脆弱性の影響を受ける可能性があります。 + +この修正では、正規表現を変更するのではなく、入力値をデフォルトで 128 バイトまでに制限するようにしています。date gem は多くの正規表現を利用しており、脆弱性のある正規表現が他にも潜んでいる可能性があるためです。互換性のため、`Date.parse(str, limit: nil)` のように、`limit` に `nil` を明示的に渡すことでこの制限を除外することができますが、パースに時間がかかる可能性があることに留意してください。 + +date gem を 3.2.1、3.1.2、3.0.2、2.0.1 かそれ以降のバージョンにアップデートしてください。`gem update date` でアップデートできます。もし bundler を使っている場合は、`Gemfile` に `gem "date", ">= 3.2.1"` を追加してください。 + +## 影響を受けるバージョン + +* date gem 2.0.0 およびそれ以前のバージョン(Ruby 2.6 系列にバンドルされているバージョン) +* date gem 3.0.1 およびそれ以前のバージョン(Ruby 2.7 系列にバンドルされているバージョン) +* date gem 3.1.1 およびそれ以前のバージョン(Ruby 3.0 系列にバンドルされているバージョン) +* date gem 3.2.0 およびそれ以前のバージョン + +## クレジット + +この脆弱性情報は、[svalkanov](https://github.com/SValkanov/) 氏によって報告されました。 + +## 更新履歴 + +* 2021-11-15 17:00:00 (JST) 初版 From e873b532af40e4aee365e897d2b0137a5d68fb34 Mon Sep 17 00:00:00 2001 From: Alexander Ilyin Date: Thu, 18 Nov 2021 14:04:20 +0300 Subject: [PATCH 0464/1487] Update link to es/community/ruby-core (es) (#2724) The following issue is completely resolved with #2708. close #2530 --- _data/locales/es.yml | 4 ++-- es/community/index.md | 2 +- es/community/ruby-core/writing-patches/index.md | 5 ++++- es/downloads/index.md | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/_data/locales/es.yml b/_data/locales/es.yml index e193c328f9..78e3defea1 100644 --- a/_data/locales/es.yml +++ b/_data/locales/es.yml @@ -67,8 +67,8 @@ sidebar: url: /en/community/weblogs/ description: Entérate de lo que está sucediendo en la comunidad. ruby_core: - text: Ruby Core (en inglés) - url: /en/community/ruby-core/ + text: Ruby Core + url: /es/community/ruby-core/ description: Ayuda a mejorar el futuro de Ruby. issue_tracking: text: Reportes de errores diff --git a/es/community/index.md b/es/community/index.md index 6519d5a42a..f7ddb68944 100644 --- a/es/community/index.md +++ b/es/community/index.md @@ -29,7 +29,7 @@ donde empezar: : El canal IRC The Ruby Language es un buen lugar para chatear con otros compañeros Rubyistas. -[El Core de Ruby](/en/community/ruby-core/) (en inglés) +[El Core de Ruby](/es/community/ruby-core/) : Con Ruby 2.0 en camino, ahora es un buen momento para seguir cómo va su desarrollo. Si estás interesado en ayudar con Ruby, comienza por aquí. diff --git a/es/community/ruby-core/writing-patches/index.md b/es/community/ruby-core/writing-patches/index.md index 4652a7aa21..e25b2acdd6 100644 --- a/es/community/ruby-core/writing-patches/index.md +++ b/es/community/ruby-core/writing-patches/index.md @@ -42,6 +42,9 @@ en la lista de distribución de Ruby-Core: Un parche que proporciona casos de prueba (preferiblemente un parche para `test/*/test_*.rb`) nos ayudaría a comprender el parche y su intención. -Podríamos pasar a un flujo de trabajo push/pull estilo Git en el futuro.. +Podríamos pasar a un flujo de trabajo push/pull estilo Git en el futuro. Pero hasta entonces, seguir las pautas anteriores te ayudaría a evitar una frustración. + + +[ruby-core-post]: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/25139 diff --git a/es/downloads/index.md b/es/downloads/index.md index 80eec23e09..f5fdf3886a 100644 --- a/es/downloads/index.md +++ b/es/downloads/index.md @@ -63,7 +63,7 @@ antes mencionadas. Pueden servirte de ayuda. Puede contener errores, ¡úsalo bajo tu responsabilidad! Para información sobre los repositorios de Subversion y Git, consulta -nuestra página [Ruby core](/en/community/ruby-core/) (en inglés). +nuestra página [Ruby Core](/es/community/ruby-core/). El código fuente de Ruby está disponible desde un conjunto de [sitios espejo][mirrors] a lo largo del mundo. From d68292788396b07e3bc124d1f7a8a253c2ce835e Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 24 Nov 2021 10:26:32 +0900 Subject: [PATCH 0465/1487] update bundles --- Gemfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ebfc7e5301..a1468eaa52 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -6,14 +6,14 @@ GEM colorator (1.1.0) concurrent-ruby (1.1.9) crass (1.0.6) - em-websocket (0.5.2) + em-websocket (0.5.3) eventmachine (>= 0.12.9) - http_parser.rb (~> 0.6.0) + http_parser.rb (~> 0) eventmachine (1.2.7) ffi (1.15.4) forwardable-extended (2.6.0) - http_parser.rb (0.6.0) - i18n (1.8.10) + http_parser.rb (0.8.0) + i18n (1.8.11) concurrent-ruby (~> 1.0) jekyll (4.2.1) addressable (~> 2.4) @@ -122,4 +122,4 @@ RUBY VERSION ruby 3.0.2p107 BUNDLED WITH - 2.2.27 + 2.2.31 From 70f838f342d14b61c1b44b79c946594de485d053 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Tue, 16 Nov 2021 17:48:36 +0900 Subject: [PATCH 0466/1487] Add draft release announcements Two CVEs about cgi gem are included CVE-2021-41816: Buffer Overrun in CGI.escape_html CVE-2021-41819: Cookie Prefix Spoofing in CGI::Cookie.parse --- ...errun-in-cgi-escape_html-cve-2021-41816.md | 36 +++++++++++ ...fing-in-cgi-cookie-parse-cve-2021-41819.md | 47 +++++++++++++++ .../_posts/2021-11-24-ruby-2-6-9-released.md | 59 +++++++++++++++++++ .../_posts/2021-11-24-ruby-2-7-5-released.md | 58 ++++++++++++++++++ .../_posts/2021-11-24-ruby-3-0-3-released.md | 49 +++++++++++++++ 5 files changed, 249 insertions(+) create mode 100644 en/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md create mode 100644 en/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md create mode 100644 en/news/_posts/2021-11-24-ruby-2-6-9-released.md create mode 100644 en/news/_posts/2021-11-24-ruby-2-7-5-released.md create mode 100644 en/news/_posts/2021-11-24-ruby-3-0-3-released.md diff --git a/en/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md b/en/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md new file mode 100644 index 0000000000..295402c7bb --- /dev/null +++ b/en/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md @@ -0,0 +1,36 @@ +--- +layout: news_post +title: "CVE-2021-41816: Buffer Overrun in CGI.escape_html +author: "mame" +translator: +date: 2021-11-24 12:00:00 +0000 +tags: security +lang: en +--- + +A buffer overrun vulnerability was discovered in CGI.escape_html. +This vulnerability has been assigned the CVE identifier [CVE-2021-41816](https://nvd.nist.gov/vuln/detail/CVE-2021-41816). +We strongly recommend upgrading Ruby. + +## Details + +A security vulnerability that causes buffer overflow when you pass a very large string (> 700 MB) to `CGI.escape_html` on a platform where `long` type takes 4 bytes, typically, Windows. + +Please update the cgi gem to version 0.3.1, 0.2,1, and 0.1,1 or later. You can use `gem update cgi` to update it. If you are using bundler, please add `gem "cgi", ">= 0.3.1"` to your `Gemfile`. +Alternatively, please update Ruby to 2.7.5 or 3.0.3. + +This issue has been introduced since Ruby 2.7, so the cgi version bundled with Ruby 2.6 is not vulnerable. + +## Affected versions + +* cgi gem 0.1.0 or prior (which are bundled versions with Ruby 2.7 series) +* cgi gem 0.2.0 or prior (which are bundled versions with Ruby 3.0 series) +* cgi gem 0.3.0 or prior + +## Credits + +Thanks to [chamal](https://hackerone.com/chamal) for discovering this issue. + +## History + +* Originally published at 2021-11-24 12:00:00 (UTC) diff --git a/en/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md b/en/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md new file mode 100644 index 0000000000..819535495c --- /dev/null +++ b/en/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md @@ -0,0 +1,47 @@ +--- +layout: news_post +title: "CVE-2021-41819: Cookie Prefix Spoofing in CGI::Cookie.parse" +author: "mame" +translator: +date: 2021-11-24 12:00:00 +0000 +tags: security +lang: en +--- + +A cookie prefix spoofing vulnerability was discovered in CGI::Cookie.parse. +This vulnerability has been assigned the CVE identifier [CVE-2021-41819](https://nvd.nist.gov/vuln/detail/CVE-2021-41819). +We strongly recommend upgrading Ruby. + +## Details + +The old versions of `CGI::Cookie.parse` applied URL decoding to cookie names. +An attacker could exploit this vulnerability to spoof security prefixes in cookie names, which may be able to trick a vulnerable application. + +By this fix, `CGI::Cookie.parse` no longer decodes cookie names. +Note that this is an incompatibility if cookie names that you are using include non-alphanumeric characters that are URL-encoded. + +This is the same issue of [CVE-2020-8184](https://nvd.nist.gov/vuln/detail/CVE-2020-8184). + +If you are using Ruby 2.7 or 3.0: + +* Please update the cgi gem to version 0.3.1, 0.2,1, and 0.1,1 or later. You can use `gem update cgi` to update it. If you are using bundler, please add `gem "cgi", ">= 0.3.1"` to your `Gemfile`. +* Alternatively, please update Ruby to 2.7.5 or 3.0.3. + +If you are using Ruby 2.6: + +* Please update Ruby to 2.6.9. *You cannot use `gem update cgi` for Ruby 2.6 or prior.* + +## Affected versions + +* ruby 2.6.8 or prior (You can *not* use `gem update cgi` for this version.) +* cgi gem 0.1.0 or prior (which are bundled versions with Ruby 2.7 series) +* cgi gem 0.2.0 or prior (which are bundled versions with Ruby 3.0 series) +* cgi gem 0.3.0 or prior + +## Credits + +Thanks to [ooooooo_q](https://hackerone.com/ooooooo_q) for discovering this issue. + +## History + +* Originally published at 2021-11-24 12:00:00 (UTC) diff --git a/en/news/_posts/2021-11-24-ruby-2-6-9-released.md b/en/news/_posts/2021-11-24-ruby-2-6-9-released.md new file mode 100644 index 0000000000..c77b23e7ed --- /dev/null +++ b/en/news/_posts/2021-11-24-ruby-2-6-9-released.md @@ -0,0 +1,59 @@ +--- +layout: news_post +title: "Ruby 2.6.9 Released" +author: "usa" +translator: +date: 2021-11-24 12:00:00 +0000 +lang: en +--- + +Ruby 2.6.9 has been released. + +This release includes security fixes. +Please check the topics below for details. + +* [CVE-2021-41817: Regular Expression Denial of Service Vulnerability of Date Parsing Methods]({%link 2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md %}) +* [CVE-2021-41819: Cookie Prefix Spoofing in CGI::Cookie.parse]({%link 2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md %}) + +See the [commit logs](https://github.com/ruby/ruby/compare/v2_6_8...v2_6_9) for details. + +Ruby 2.6 is now under the state of the security maintenance phase, until the end of March of 2022. +After that date, maintenance of Ruby 2.6 will be ended. +We recommend you start planning the migration to newer versions of Ruby, such as 3.0 or 2.7. + +## Download + +{% assign release = site.data.releases | where: "version", "2.6.9" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Release Comment + +Many committers, developers, and users who provided bug reports helped us make this release. +Thanks for their contributions. diff --git a/en/news/_posts/2021-11-24-ruby-2-7-5-released.md b/en/news/_posts/2021-11-24-ruby-2-7-5-released.md new file mode 100644 index 0000000000..f1ec0cfee1 --- /dev/null +++ b/en/news/_posts/2021-11-24-ruby-2-7-5-released.md @@ -0,0 +1,58 @@ +--- +layout: news_post +title: "Ruby 2.7.5 Released" +author: "usa" +translator: +date: 2021-11-24 12:00:00 +0000 +lang: en +--- + +Ruby 2.7.5 has been released. + +This release includes security fixes. +Please check the topics below for details. + +* [CVE-2021-41817: Regular Expression Denial of Service Vulnerability of Date Parsing Methods]({%link 2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md %}) +* [CVE-2021-41816: Buffer Overrun in CGI.escape_html]({%link 2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md %}) +* [CVE-2021-41819: Cookie Prefix Spoofing in CGI::Cookie.parse]({%link 2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md %}) + +See the [commit logs](https://github.com/ruby/ruby/compare/v2_7_4...v2_7_5) for details. + +## Download + +{% assign release = site.data.releases | where: "version", "2.7.5" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Release Comment + +Many committers, developers, and users who provided bug reports helped us make this release. +Thanks for their contributions. + +The maintenance of Ruby 2.7, including this release, is based on the "Agreement for the Ruby stable version" of the Ruby Association. diff --git a/en/news/_posts/2021-11-24-ruby-3-0-3-released.md b/en/news/_posts/2021-11-24-ruby-3-0-3-released.md new file mode 100644 index 0000000000..cbfe661807 --- /dev/null +++ b/en/news/_posts/2021-11-24-ruby-3-0-3-released.md @@ -0,0 +1,49 @@ +--- +layout: news_post +title: "Ruby 3.0.3 Released" +author: "nagachika" +translator: +date: 2021-11-24 12:00:00 +0000 +lang: en +--- + +Ruby 3.0.3 has been released. + +This release includes security fixes. +Please check the topics below for details. + +* [CVE-2021-41817: Regular Expression Denial of Service Vulnerability of Date Parsing Methods]({%link 2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md %}) +* [CVE-2021-41816: Buffer Overrun in CGI.escape_html]({%link 2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md %}) +* [CVE-2021-41819: Cookie Prefix Spoofing in CGI::Cookie.parse]({%link 2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md %}) + +See the [commit logs](https://github.com/ruby/ruby/compare/v3_0_2...v3_0_3) for details. + +## Download + +{% assign release = site.data.releases | where: "version", "3.0.3" | first %} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Release Comment + +Many committers, developers, and users who provided bug reports helped us make this release. +Thanks for their contributions. From e0e0676c982108ac81c910bb6aba630bcd91430c Mon Sep 17 00:00:00 2001 From: nagachika Date: Wed, 24 Nov 2021 21:49:49 +0900 Subject: [PATCH 0467/1487] Update _data/downloads.yml and _data/releases.yml --- _data/downloads.yml | 6 ++-- _data/releases.yml | 82 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+), 3 deletions(-) diff --git a/_data/downloads.yml b/_data/downloads.yml index ff61bd1094..54a2601a06 100644 --- a/_data/downloads.yml +++ b/_data/downloads.yml @@ -8,13 +8,13 @@ preview: stable: - - 3.0.2 - - 2.7.4 + - 3.0.3 + - 2.7.5 # optional security_maintenance: - - 2.6.8 + - 2.6.9 # optional eol: diff --git a/_data/releases.yml b/_data/releases.yml index 15878152b8..82ff598065 100644 --- a/_data/releases.yml +++ b/_data/releases.yml @@ -52,6 +52,30 @@ # 3.0 series +- version: 3.0.3 + date: '2021-11-24' + post: "/en/news/2021/11/24/ruby-3-0-3-released/" + url: + gz: https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.3.tar.gz + xz: https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.3.tar.xz + zip: https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.3.zip + size: + gz: 20242729 + xz: 14991880 + zip: 24627744 + sha1: + gz: '049317b7c6246d6ea86564c3f73a629b766ff634' + xz: c1e6dac2b8c08afbbee39e25e325c84e1cab7c17 + zip: 5341ed1602a3289c4857560ead53191895e5c586 + sha256: + gz: 3586861cb2df56970287f0fd83f274bd92058872d830d15570b36def7f1a92ac + xz: 88cc7f0f021f15c4cd62b1f922e3a401697f7943551fe45b1fdf4f2417a17a9c + zip: 0b8370e404550bf736f46307a14eb9306a7868fb8d54e1418ecdaccbaa8ac06f + sha512: + gz: 39dab51a0d784a38302372b99f96205817d466245202586d22123745761e9cb39db128ec2b984ebc3919b9faf2adf828d19c97d3fb1e56d44be0a81dc5d11b87 + xz: bb9ea426278d5a7ac46595296f03b82d43df8b7db41045cdf85611e05e26c703c53f700494cd7cf5d4c27fa953bdc5c144317d7720812db0a6e3b6f4bc4d2e00 + zip: 24c2a4f455f90e54f85d9565e392519833b36aefce32dc707e6693994d175c82e84ee6c37ed4a9ddf8840479e7cdfaae714c12bc6923368bb00346d4edd434d8 + - version: 3.0.2 date: '2021-07-07' post: "/en/news/2021/07/07/ruby-3-0-2-released/" @@ -220,6 +244,35 @@ # 2.7 series +- version: 2.7.5 + date: '2021-11-24' + post: "/en/news/2021/11/24/ruby-2-7-5-released/" + url: + bz2: https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.5.tar.bz2 + gz: https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.5.tar.gz + xz: https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.5.tar.xz + zip: https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.5.zip + size: + bz2: 14805180 + gz: 16923709 + xz: 12072980 + zip: 20702176 + sha1: + bz2: 2a179b601f45172b1cb38e8f157c4e6ce272c22c + gz: c2d0f6c793f9e673f9fb22276d32f8c395ec5581 + xz: 1d04fbf24150eaa1297a7ef4c7057ec0a9dca527 + zip: 541b34fa5e7e55b6269a2bfa67e2a06ad0dcb571 + sha256: + bz2: d6b444341a5e06fcd6eaf1feb83a1c0c2da4705dbe4f275ee851761b185f4bd1 + gz: 2755b900a21235b443bb16dadd9032f784d4a88f143d852bc5d154f22b8781f1 + xz: d216d95190eaacf3bf165303747b02ff13f10b6cfab67a9031b502a49512b516 + zip: 3793d764ec8da68203eba1a7fe338fae9bafa8226cce911c8648c1b7c32ba9c2 + sha512: + bz2: 0aa2ac44bc22859a39c43d08b7c7f457df05c2dc36b2574fd70ca399143ef1000dc5e496212db9eb055bc4258523d47d26db3c57a1a5a5d63cf1b3de9f81645a + gz: '09e029b5cc15b6e4e37bcf15adb28213eaedec3ea22106d63095b37ea6b2a2b68e82e74e6b50746c87dd77e5185795d014e0db118bf0f45ffa0b0a307f5f65da' + xz: 21c8a713e3ce115fc4c405113ac691ddcefc3419f528b93ca1ac59e7052c1b6e9e241da0e570e291e567f28f3d840824dbcc5967b216cbe7d6ca7a05580fa311 + zip: fe9a706f8139e59a40ab205dc88cdc613c9c69186cb2daeb5adc80bdf45290a523fa7e3fd0866fa12325039ba413ff1e1f4233073d352da08079dc903063b31a + - version: 2.7.4 date: '2021-07-07' post: "/en/news/2021/07/07/ruby-2-7-4-released/" @@ -495,6 +548,35 @@ # 2.6 series +- version: 2.6.9 + date: '2021-11-24' + post: "/en/news/2021/11/24/ruby-2-6-9-released/" + url: + bz2: https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.9.tar.bz2 + gz: https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.9.tar.gz + xz: https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.9.tar.xz + zip: https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.9.zip + size: + bz2: 14137792 + gz: 16202802 + xz: 11590064 + zip: 19869379 + sha1: + bz2: a482c36645e7ff4596c6aca2cf96d15481fcfc5e + gz: 00e69747e7e2b87155c65b4003470313e4403b0a + xz: fc67ca162010aac4af49d73a8c48be5cb2fb5907 + zip: 41a60c783306f4b47b867bd19d16688b546b8e3a + sha256: + bz2: a0639060c4519572e51828eb742f09dd40f154c820f6007246de7a2090e3ee45 + gz: eb7bae7aac64bf9eb2153710a4cafae450ccbb62ae6f63d573e1786178b0efbb + xz: 6a041d82ae6e0f02ccb1465e620d94a7196489d8a13d6018a160da42ebc1eece + zip: 2480dbdc72d3dc832d8254e938e4861ca54a5337edd6f358e5202fd2a5339eec + sha512: + bz2: ff067ebc059094c0a9a0debf54a37aad2c85f7ed47be59299041c9c03a7701529f5063ff32a1b8c56d48ee8585015acba63602ed0176b2797d263d43d67aa241 + gz: 24bd6c8f528907349bcf392ed75a2d767b93a35a9f4c839267873d1dde862d3292d1682e0edc56c078a2690de76a045ef866f54eab8a330a18771f0b234c5993 + xz: f60aa89e685cea324185eb0d13e6b44caef4e4f761cbf9ea1386ae70e39faf3866ac01e4bb5354574f2583e74290b8c80eaf63d126040d52368be6c771476451 + zip: 9073e0fc5040434f15158f24c6a551286bc5f1c4c1cb54d6e3debb4ac039187a4f274a217bdb5c8489c72360c65d708f89eb0f2472a1f9232fcfee8e296dec57 + - version: 2.6.8 date: '2021-07-07' post: "/en/news/2021/07/07/ruby-2-6-8-released/" From 4bf4abd033de802876e8427560c3815160d81969 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Wed, 24 Nov 2021 21:55:29 +0900 Subject: [PATCH 0468/1487] Fix paths to security announcements --- ...1-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md | 2 +- en/news/_posts/2021-11-24-ruby-2-6-9-released.md | 4 ++-- en/news/_posts/2021-11-24-ruby-2-7-5-released.md | 6 +++--- en/news/_posts/2021-11-24-ruby-3-0-3-released.md | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/en/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md b/en/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md index 295402c7bb..d4d131f3e7 100644 --- a/en/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md +++ b/en/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md @@ -1,6 +1,6 @@ --- layout: news_post -title: "CVE-2021-41816: Buffer Overrun in CGI.escape_html +title: "CVE-2021-41816: Buffer Overrun in CGI.escape_html" author: "mame" translator: date: 2021-11-24 12:00:00 +0000 diff --git a/en/news/_posts/2021-11-24-ruby-2-6-9-released.md b/en/news/_posts/2021-11-24-ruby-2-6-9-released.md index c77b23e7ed..d331c95b12 100644 --- a/en/news/_posts/2021-11-24-ruby-2-6-9-released.md +++ b/en/news/_posts/2021-11-24-ruby-2-6-9-released.md @@ -12,8 +12,8 @@ Ruby 2.6.9 has been released. This release includes security fixes. Please check the topics below for details. -* [CVE-2021-41817: Regular Expression Denial of Service Vulnerability of Date Parsing Methods]({%link 2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md %}) -* [CVE-2021-41819: Cookie Prefix Spoofing in CGI::Cookie.parse]({%link 2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md %}) +* [CVE-2021-41817: Regular Expression Denial of Service Vulnerability of Date Parsing Methods]({%link en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md %}) +* [CVE-2021-41819: Cookie Prefix Spoofing in CGI::Cookie.parse]({%link en/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md %}) See the [commit logs](https://github.com/ruby/ruby/compare/v2_6_8...v2_6_9) for details. diff --git a/en/news/_posts/2021-11-24-ruby-2-7-5-released.md b/en/news/_posts/2021-11-24-ruby-2-7-5-released.md index f1ec0cfee1..12148db025 100644 --- a/en/news/_posts/2021-11-24-ruby-2-7-5-released.md +++ b/en/news/_posts/2021-11-24-ruby-2-7-5-released.md @@ -12,9 +12,9 @@ Ruby 2.7.5 has been released. This release includes security fixes. Please check the topics below for details. -* [CVE-2021-41817: Regular Expression Denial of Service Vulnerability of Date Parsing Methods]({%link 2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md %}) -* [CVE-2021-41816: Buffer Overrun in CGI.escape_html]({%link 2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md %}) -* [CVE-2021-41819: Cookie Prefix Spoofing in CGI::Cookie.parse]({%link 2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md %}) +* [CVE-2021-41817: Regular Expression Denial of Service Vulnerability of Date Parsing Methods]({%link en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md %}) +* [CVE-2021-41816: Buffer Overrun in CGI.escape_html]({%link en/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md %}) +* [CVE-2021-41819: Cookie Prefix Spoofing in CGI::Cookie.parse]({%link en/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md %}) See the [commit logs](https://github.com/ruby/ruby/compare/v2_7_4...v2_7_5) for details. diff --git a/en/news/_posts/2021-11-24-ruby-3-0-3-released.md b/en/news/_posts/2021-11-24-ruby-3-0-3-released.md index cbfe661807..6f98e03b33 100644 --- a/en/news/_posts/2021-11-24-ruby-3-0-3-released.md +++ b/en/news/_posts/2021-11-24-ruby-3-0-3-released.md @@ -12,9 +12,9 @@ Ruby 3.0.3 has been released. This release includes security fixes. Please check the topics below for details. -* [CVE-2021-41817: Regular Expression Denial of Service Vulnerability of Date Parsing Methods]({%link 2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md %}) -* [CVE-2021-41816: Buffer Overrun in CGI.escape_html]({%link 2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md %}) -* [CVE-2021-41819: Cookie Prefix Spoofing in CGI::Cookie.parse]({%link 2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md %}) +* [CVE-2021-41817: Regular Expression Denial of Service Vulnerability of Date Parsing Methods]({%link en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md %}) +* [CVE-2021-41816: Buffer Overrun in CGI.escape_html]({%link en/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md %}) +* [CVE-2021-41819: Cookie Prefix Spoofing in CGI::Cookie.parse]({%link en/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md %}) See the [commit logs](https://github.com/ruby/ruby/compare/v3_0_2...v3_0_3) for details. From 1bc1ca7aa3a699d4aaafaa21455b05b9e62edcee Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Wed, 24 Nov 2021 22:09:28 +0900 Subject: [PATCH 0469/1487] CVE-2021-41817: Mention CVE number --- .../2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md | 1 + 1 file changed, 1 insertion(+) diff --git a/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md b/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md index 9306b21675..ba7f5d48c8 100644 --- a/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md +++ b/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md @@ -9,6 +9,7 @@ lang: en --- We have released date gem version 3.2.1, 3.1.2, 3.0.2, and 2.0.1 that include a security fix for a regular expression denial of service vulnerability (ReDoS) on date parsing methods. An attacker can exploit this vulnerability to cause an effective DoS attack. +This vulnerability has been assigned the CVE identifier [CVE-2021-41817](https://nvd.nist.gov/vuln/detail/CVE-2021-41817). ## Details From 02a8c620346bc773df34d4c8ef4ed2593b326afe Mon Sep 17 00:00:00 2001 From: "U.Nakamura" Date: Wed, 24 Nov 2021 22:25:14 +0900 Subject: [PATCH 0470/1487] Mention about newer Ruby releases --- ...11-15-date-parsing-method-regexp-dos-cve-2021-41817.md | 8 +++++--- ...24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md | 4 ++-- ...-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md b/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md index ba7f5d48c8..a67e911725 100644 --- a/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md +++ b/en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md @@ -18,12 +18,13 @@ Date's parsing methods including `Date.parse` are using Regexps internally, some The fix limits the input length up to 128 bytes by default instead of changing the regexps. This is because Date gem uses many Regexps and it is possible that there are still undiscovered vulnerable Regexps. For compatibility, it is allowed to remove the limitation by explicitly passing `limit` keywords as `nil` like `Date.parse(str, limit: nil)`, but note that it may take a long time to parse. Please update the date gem to version 3.2.1, 3.1.2, 3.0.2, and 2.0.1, or later. You can use `gem update date` to update it. If you are using bundler, please add `gem "date", ">= 3.2.1"` to your `Gemfile`. +Alternatively, you can update Ruby to 3.0.3, 2.7.5, 2.6.9 or later. ## Affected versions -* date gem 2.0.0 or prior (which are bundled versions with Ruby 2.6 series) -* date gem 3.0.1 or prior (which are bundled versions with Ruby 2.7 series) -* date gem 3.1.1 or prior (which are bundled versions with Ruby 3.0 series) +* date gem 2.0.0 or prior (which are bundled versions with Ruby 2.6 series prior to Ruby 2.6.9) +* date gem 3.0.1 or prior (which are bundled versions with Ruby 2.7 series prior to Ruby 2.7.5) +* date gem 3.1.1 or prior (which are bundled versions with Ruby 3.0 series prior to Ruby 3.0.3) * date gem 3.2.0 or prior ## Credits @@ -33,3 +34,4 @@ Thanks to [svalkanov](https://github.com/SValkanov/) for discovering this issue. ## History * Originally published at 2021-11-15 08:00:00 (UTC) +* Mention about new Ruby releases at 2021-11-24 13:20:00 (UTC) diff --git a/en/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md b/en/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md index d4d131f3e7..01fe66fc93 100644 --- a/en/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md +++ b/en/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md @@ -23,8 +23,8 @@ This issue has been introduced since Ruby 2.7, so the cgi version bundled with R ## Affected versions -* cgi gem 0.1.0 or prior (which are bundled versions with Ruby 2.7 series) -* cgi gem 0.2.0 or prior (which are bundled versions with Ruby 3.0 series) +* cgi gem 0.1.0 or prior (which are bundled versions with Ruby 2.7 series prior to Ruby 2.7.5) +* cgi gem 0.2.0 or prior (which are bundled versions with Ruby 3.0 series prior to Ruby 3.0.3) * cgi gem 0.3.0 or prior ## Credits diff --git a/en/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md b/en/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md index 819535495c..7db6824007 100644 --- a/en/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md +++ b/en/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md @@ -34,8 +34,8 @@ If you are using Ruby 2.6: ## Affected versions * ruby 2.6.8 or prior (You can *not* use `gem update cgi` for this version.) -* cgi gem 0.1.0 or prior (which are bundled versions with Ruby 2.7 series) -* cgi gem 0.2.0 or prior (which are bundled versions with Ruby 3.0 series) +* cgi gem 0.1.0 or prior (which are bundled versions with Ruby 2.7 series prior to Ruby 2.7.5) +* cgi gem 0.2.0 or prior (which are bundled versions with Ruby 3.0 series prior to Ruby 3.0.3) * cgi gem 0.3.0 or prior ## Credits From ce20e7f9ae6a7ceae9b54843b283727645da338a Mon Sep 17 00:00:00 2001 From: "U.Nakamura" Date: Wed, 24 Nov 2021 22:33:42 +0900 Subject: [PATCH 0471/1487] Japanese translations of Ruby releases --- .../_posts/2021-11-24-ruby-2-6-9-released.md | 59 +++++++++++++++++++ .../_posts/2021-11-24-ruby-2-7-5-released.md | 57 ++++++++++++++++++ .../_posts/2021-11-24-ruby-3-0-3-released.md | 48 +++++++++++++++ 3 files changed, 164 insertions(+) create mode 100644 ja/news/_posts/2021-11-24-ruby-2-6-9-released.md create mode 100644 ja/news/_posts/2021-11-24-ruby-2-7-5-released.md create mode 100644 ja/news/_posts/2021-11-24-ruby-3-0-3-released.md diff --git a/ja/news/_posts/2021-11-24-ruby-2-6-9-released.md b/ja/news/_posts/2021-11-24-ruby-2-6-9-released.md new file mode 100644 index 0000000000..54370aec78 --- /dev/null +++ b/ja/news/_posts/2021-11-24-ruby-2-6-9-released.md @@ -0,0 +1,59 @@ +--- +layout: news_post +title: "Ruby 2.6.9 リリース" +author: "usa" +translator: +date: 2021-11-24 12:00:00 +0000 +lang: ja +--- + +Ruby 2.6.9 がリリースされました。 + +このリリースでは以下の脆弱性修正が含まれています。 +詳しくは以下の記事などを参照してください。 + +* [CVE-2021-41817: Regular Expression Denial of Service Vulnerability of Date Parsing Methods]({%link en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md %}) +* [CVE-2021-41819: Cookie Prefix Spoofing in CGI::Cookie.parse]({%link en/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md %}) + +詳しくは [commit log](https://github.com/ruby/ruby/compare/v2_6_8...v2_6_9) を参照してください。 + +Ruby 2.6 系列は、現在、セキュリティメンテナンスフェーズにあります。 +このフェーズ中は、重大なセキュリティ上の問題への対応のみが行われます。 +現在の予定では、2022 年 3 月末頃を目処に、2.6 系列のセキュリティメンテナンスならびに公式サポートは終了する見込みです。 +現在、2.6 系列を利用しているユーザーの皆さんは、なるべく早く、3.0 系列等のより新しいバージョン系列の Ruby への移行を検討されるよう、お勧めします。 + +## ダウンロード + +{% assign release = site.data.releases | where: "version", "2.6.9" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## リリースコメント + +このリリースに協力してくださった皆様、特に、脆弱性を報告してくださった方々に深く感謝します。 diff --git a/ja/news/_posts/2021-11-24-ruby-2-7-5-released.md b/ja/news/_posts/2021-11-24-ruby-2-7-5-released.md new file mode 100644 index 0000000000..79f7898c56 --- /dev/null +++ b/ja/news/_posts/2021-11-24-ruby-2-7-5-released.md @@ -0,0 +1,57 @@ +--- +layout: news_post +title: "Ruby 2.7.5 リリース" +author: "usa" +translator: +date: 2021-11-24 12:00:00 +0000 +lang: ja +--- + +Ruby 2.7.5 がリリースされました。 + +このリリースでは以下の脆弱性修正が含まれています。 +詳しくは以下の記事などを参照してください。 + +* [CVE-2021-41817: Regular Expression Denial of Service Vulnerability of Date Parsing Methods]({%link en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md %}) +* [CVE-2021-41816: Buffer Overrun in CGI.escape_html]({%link en/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md %}) +* [CVE-2021-41819: Cookie Prefix Spoofing in CGI::Cookie.parse]({%link en/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md %}) + +その他の変更については [commit log](https://github.com/ruby/ruby/compare/v2_7_4...v2_7_5) を参照してください。 + +## ダウンロード + +{% assign release = site.data.releases | where: "version", "2.7.5" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## リリースコメント + +Ruby 開発者の皆様、バグや脆弱性を報告してくれたユーザーの皆様のご協力により本リリースは行われています。 皆様のご協力に感謝します。 + +本リリースを含む Ruby 2.7 のメンテナンスは Ruby アソシエーションの「Ruby 安定版保守事業」に基づき行われています。 diff --git a/ja/news/_posts/2021-11-24-ruby-3-0-3-released.md b/ja/news/_posts/2021-11-24-ruby-3-0-3-released.md new file mode 100644 index 0000000000..54e009a6aa --- /dev/null +++ b/ja/news/_posts/2021-11-24-ruby-3-0-3-released.md @@ -0,0 +1,48 @@ +--- +layout: news_post +title: "Ruby 3.0.3 リリース" +author: "nagachika" +translator: "usa" +date: 2021-11-24 12:00:00 +0000 +lang: ja +--- + +Ruby 3.0.3 がリリースされました。 + +このリリースでは以下の脆弱性修正が含まれています。 +詳しくは以下の記事などを参照してください。 + +* [CVE-2021-41817: Regular Expression Denial of Service Vulnerability of Date Parsing Methods]({%link en/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md %}) +* [CVE-2021-41816: Buffer Overrun in CGI.escape_html]({%link en/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md %}) +* [CVE-2021-41819: Cookie Prefix Spoofing in CGI::Cookie.parse]({%link en/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md %}) + +その他の変更については [commit log](https://github.com/ruby/ruby/compare/v3_0_2...v3_0_3) を参照してください。 + +## ダウンロード + +{% assign release = site.data.releases | where: "version", "3.0.3" | first %} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## リリースコメント + +このリリースにあたり、多くのコミッター、開発者、バグ報告をしてくれたユーザーの皆様に感謝を申し上げます。 From b81a58d0a54adf0c00e6b46a1ab32ceeb274ef89 Mon Sep 17 00:00:00 2001 From: jinroq <2787780+jinroq@users.noreply.github.com> Date: Thu, 25 Nov 2021 17:05:38 +0900 Subject: [PATCH 0472/1487] Japanese translation of "CVE-2021-41819: Cookie Prefix Spoofing in CGI::Cookie.parse" Translate [https://github.com/ruby/www.ruby-lang.org/blob/master/en/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md](https://github.com/ruby/www.ruby-lang.org/blob/master/en/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md) to ja. --- ...fing-in-cgi-cookie-parse-cve-2021-41819.md | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 ja/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md diff --git a/ja/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md b/ja/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md new file mode 100644 index 0000000000..5296d1d12f --- /dev/null +++ b/ja/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md @@ -0,0 +1,47 @@ +--- +layout: news_post +title: "CVE-2021-41819: CGI::Cookie.parse 内の Cookie プレフィックスの偽装" +author: "mame" +translator: "jinroq" +date: 2021-11-24 12:00:00 +0000 +tags: security +lang: ja +--- + +CGI :: Cookie.parse 内で Cookie プレフィックスを偽装する脆弱性が発見されました。 +この脆弱性は、[CVE-2021-41819](https://nvd.nist.gov/vuln/detail/CVE-2021-41819) として登録されています。 +Ruby をアップグレードすることを強く推奨します。 + +## 詳細 + +古いバージョンの `CGI :: Cookie.parse` は、Cookie 名 に URL デコード を適用していました。 +ところが、悪意を持った攻撃者はこの脆弱性を利用して Cookie 名のセキュリティプレフィックスを偽装し、脆弱なアプリケーションをだます可能性があります。 + +この修正により、 `CGI :: Cookie.parse` は Cookie 名をデコードしなくなりました。 +使用している Cookie 名に、URL エンコードされた英数字以外の文字が含まれている場合、これは非互換であることに注意してください。 + +これは [CVE-2020-8184](https://nvd.nist.gov/vuln/detail/CVE-2020-8184) と同じ問題です。 + +Ruby 2.7 もしくは 3.0 を使用している場合: + +* cgi gem をバージョン 0.3.1, 0.2.1, 0.1.1 もしくはこれら以上のバージョンに更新してください。 `gem update cgi` を使用して更新できます。bundler を使用している場合は、 `Gemfile` に `gem "cgi", "> = 0.3.1"` を追加してください。 +* または、Ruby を 2.7.5 または 3.0.3 に更新してください。 + +Ruby 2.6 を使用している場合: + +* Rubyを 2.6.9 に更新してください。 *Ruby 2.6 以前では `gem update cgi` は使用できません。* + +## 影響を受けるバージョン + +* ruby​​ 2.6.8 以前(このバージョンでは `gem update cgi` を *使用できません*。) +* cgi gem 0.1.0 以前(Ruby 2.7.5 より前にバンドルされている Ruby 2.7 系列) +* cgi gem 0.2.0 以前(Ruby 3.0.3 より前にバンドルされている Ruby3.0 系列) +* cgi gem 0.3.0 以前 + +## クレジット + +この脆弱性情報は、[ooooooo_q](https://hackerone.com/ooooooo_q) 氏によって報告されました。 + +## 更新履歴 + +* 2021-11-24 21:00:00 (JST) 初版 From 9c7a4efab47960ddbbf17df91090b941f4fd2214 Mon Sep 17 00:00:00 2001 From: jinroq <2787780+jinroq@users.noreply.github.com> Date: Fri, 26 Nov 2021 16:10:04 +0900 Subject: [PATCH 0473/1487] Fixed a command `gem upgrade rexml` -> `gem update rexml` --- ...4-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md b/en/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md index f4b0a0acf7..b6225aa9cc 100644 --- a/en/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md +++ b/en/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md @@ -29,7 +29,7 @@ If you are using Ruby 2.5.8 or prior: ## Affected versions -* Ruby 2.5.8 or prior (You can NOT use `gem upgrade rexml` for this version.) +* Ruby 2.5.8 or prior (You can NOT use `gem update rexml` for this version.) * Ruby 2.6.6 or prior * Ruby 2.7.2 or prior * Ruby 3.0.0 From af0e7e8562e60de55cd8fb9c3862a0f99d2e0f8c Mon Sep 17 00:00:00 2001 From: jinroq <2787780+jinroq@users.noreply.github.com> Date: Fri, 26 Nov 2021 21:21:41 +0900 Subject: [PATCH 0474/1487] Fixed a bug. Fixed a bug that disturbed XXX from being displayed. --- en/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/en/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md b/en/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md index 7904833062..3afcf4a576 100644 --- a/en/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md +++ b/en/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md @@ -7,10 +7,9 @@ date: 2021-11-09 00:00:00 +0000 lang: en --- -We are pleased to announce the release of Ruby {{ release.version }}. - {% assign release = site.data.releases | where: "version", "3.1.0-preview1" | first %} +We are pleased to announce the release of Ruby {{ release.version }}. ## YJIT: New experimental in-process JIT compiler From 879ed2088c32fa8d6cd69712d99993124bb168bf Mon Sep 17 00:00:00 2001 From: jinroq <2787780+jinroq@users.noreply.github.com> Date: Sat, 27 Nov 2021 00:48:28 +0900 Subject: [PATCH 0475/1487] Revised the points pointed out in the review. --- ...ional-and-keyword-arguments-in-ruby-3-0.md | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md index b9aec21a12..38c2aea1c9 100644 --- a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md +++ b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -11,7 +11,9 @@ lang: ja ## 概要 -Ruby 3.0では、位置引数とキーワード引数が分離されます。Ruby 3.0で変更される振る舞いはRuby 2.7でwarningを表示します。以下のいずれかのwarningが表示される場合は、コードのアップデートが必要です。 +この文書では便宜上、必須引数、オプション引数、rest引数、後置引数(つまり、キーワード引数とブロック引数以外の引数)をまとめて「位置引数」と呼びます。 + +Ruby 3.0では、位置引数とキーワード引数が分離されます。Ruby 3.0で変更される振る舞いはRuby 2.7で警告を表示します。以下のいずれかの警告が表示される場合は、コードのアップデートが必要です。 * `Using the last argument as keyword parameters is deprecated` * `Passing the keyword argument as the last hash parameter is deprecated` @@ -100,13 +102,13 @@ foo(k: 1) #=> {:k=>1} ## Q: 自分のコードはRuby 2.7で動かなくなりますか? -手短かに言うと「壊れない可能性はあります」。 +A: たぶん動きます。 -Ruby 2.7におけるこの変更は、3.0への移行パスとして設計されています。あくまで原則としてですが、Ruby 2.7ではRuby 3.0で変更される振る舞いについてwarningを出すにとどめており、warningの中には私たちが微細とみなしている変更点も若干含まれます。詳しくは後述の「その他の微細な変更点」をご覧ください。 +Ruby 2.7では、原則として、Ruby 3.0で変更される振る舞いについて警告を出すにとどめています。しかし、私たちが軽微とみなした非互換も少しだけ入っています。詳しくは後述の「その他の軽微な変更点」をご覧ください。 -Ruby 2.7では、warningが表示される点と微細な変更点以外を除いてRuby 2.6との互換性を保とうとしています。つまり、あなたのコードはRuby 2.7でもおそらく動作しますが、warningが表示される可能性はあります。あなたのコードをRuby 2.7で実行すれば、Ruby 3.0の準備ができているかどうかをチェックできます。 +Ruby 2.7では、警告が表示される点と軽微な変更点以外を除いてRuby 2.6との互換性を保とうとしています。つまり、あなたのコードはRuby 2.7でもおそらく動作しますが、警告が表示される可能性はあります。あなたのコードをRuby 2.7で実行すれば、Ruby 3.0の準備ができているかどうかをチェックできます。 -非推奨のwarningを無効にしたい場合は、コマンドライン引数`-W:no-deprecated`を使うか、コードに`Warning[:deprecated] = false`を追加します。 +非推奨の警告を無効にしたい場合は、コマンドライン引数`-W:no-deprecated`を使うか、コードに`Warning[:deprecated] = false`を追加します。 ## 引数の委譲の扱いについて @@ -162,7 +164,7 @@ ruby2_keywords def foo(*args, &block) end {% endhighlight %} -残念ながら、Ruby 2.6以前では新しい委譲スタイルを正しく扱えないため、旧来の委譲スタイル(`**kwargs`を使わないなど)を使う必要があります。これは、キーワード引数を分離した理由のひとつでもあります(詳しくは本記事末尾をご覧ください)。`ruby2_keywords`を用いれば、Ruby 2.7や3.0でも旧来の委譲スタイルを引き続き利用できます。2.6以前のRubyでは`ruby2_keywords`が定義されていないので、[ruby2_keywords](https://rubygems.org/gems/ruby2_keywords) gemを使うか、以下を手動で定義します。 +残念ながら、Ruby 2.6以前では新しい委譲スタイルを正しく扱えないため、旧来の委譲スタイル(つまり、**kwargsを受け渡ししないスタイル)を使う必要があります。これは、キーワード引数を分離した理由のひとつでもあります(詳しくは本記事末尾をご覧ください)。`ruby2_keywords`を用いれば、Ruby 2.7や3.0でも旧来の委譲スタイルを引き続き利用できます。2.6以前のRubyでは`ruby2_keywords`が定義されていないので、[ruby2_keywords](https://rubygems.org/gems/ruby2_keywords) gemを使うか、以下を手動で定義します。 {% highlight ruby %} def ruby2_keywords(*) @@ -186,15 +188,15 @@ foo({}) #=> Ruby 2.7: [] ({}を含んでいない) foo({}, **{}) #=> Ruby 2.7: [{}] ({}を渡せば、キーワード引数が「ない」ことを明示できる) {% endhighlight %} -上のコードでは、空のHash引数が自動的に変換されて`**kwargs`に吸い込まれ、この空のキーワードハッシュは委譲の呼び出しで削除されます。このため、`targe`には引数がまったく渡されなくなります。私たちが把握している範囲では、これが唯一のエッジケースです。 +上のコードでは、空のHash引数が自動的に変換されて`**kwargs`に吸い込まれ、この空のキーワードハッシュは委譲の呼び出しで削除されます。このため、`target`には引数がまったく渡されなくなります。私たちが把握している範囲では、これが唯一のエッジケースです。 上のコードの最下部に書いたように、`**{}`を渡すことでこの問題を回避できます。 -移植性がどうしても不安な場合は`ruby2_keywords`をお使いください(Ruby 2.6以前ではキーワード引数周りで膨大なエッジケースが存在していることを知っておいてください)。`ruby2_keywords`は、今後Ruby 2.6が役目を終えたときに削除される可能性があります。現時点で私たちがおすすめできるのは、キーワード引数を明示的に委譲することです(上述のRuby 3向けのコードを参照)。 +移植性がどうしても不安な場合は`ruby2_keywords`をお使いください(Ruby 2.6以前ではキーワード引数周りで膨大なエッジケースが存在していることを知っておいてください)。`ruby2_keywords`は、今後Ruby 2.6がサポート切れになったあとで削除される可能性があります。そのときになったら、キーワード引数を明示的に委譲することをおすすめします(上述のRuby 3向けのコードを参照)。 -## その他の微細な変更点 +## その他の軽微な変更点 -Ruby 2.7のキーワード引数では、この他に以下の3つのマイナーチェンジが行われています。 +Ruby 2.7のキーワード引数では、この他に以下の3つの軽微な変更が行われています。 ### 1\. キーワード引数で非シンボルキーを利用できるようになった @@ -256,7 +258,7 @@ foo(**empty_hash) なお、`foo(**{})`はRuby 2.6以前とRuby 2.7のどちらの場合も引数を渡さず、`**{}`がパーサーによって削除される点にご注意ください。また、Ruby 2.7以降ではどちらも`**empty_hash`として同じに扱われるので、メソッドにキーワード引数を渡さないようにする指定が楽に行なえます。 -Ruby 2.7では、あるメソッド呼び出しで必須とされる位置引数の個数が不足している場合、Ruby 2.6との互換性を保つために`foo(**empty_hash)`は空のハッシュを渡してwarningを表示します。この振る舞いはRuby 3.0で廃止されます。 +Ruby 2.7では、あるメソッド呼び出しで必須とされる位置引数の個数が不足している場合、Ruby 2.6との互換性を保つために`foo(**empty_hash)`は空のハッシュを渡して警告を表示します。この振る舞いはRuby 3.0で廃止されます。 {% highlight ruby %} def foo(x) @@ -273,7 +275,7 @@ foo(**empty_hash) ### 3\. キーワード引数を受け取らないことを表す構文(`**nil`)が導入される -メソッド定義で`**nil`を用いることで、そのメソッドがキーワード引数を受け取らないことを明示的に示せるようになります。このメソッドを呼び出すときにキーワード引数を渡すと`ArgumentError`が表示されます(これは非互換性ではなく、事実上新機能です)。 +メソッド定義で`**nil`を用いることで、そのメソッドがキーワード引数を受け取らないことを明示的に示せるようになります。このメソッドを呼び出すときにキーワード引数を渡すと`ArgumentError`が表示されます(これは非互換性ではなく、新機能です)。 {% highlight ruby %} def foo(*args, **nil) @@ -283,7 +285,7 @@ foo(k: 1) #=> Ruby 2.7以降: no keywords accepted (ArgumentError) {% endhighlight %} -この新構文は、メソッドがキーワード引数を受け取らないことを明示的に指定するのに有用です。これを使わない場合、キーワード引数は上述の例の他の引数に吸い込まれます。メソッドを拡張してキーワード引数を受け取るようにする場合、以下のような非互換性が発生する可能性があります。 +この新構文は、メソッドがキーワード引数を受け取らないことを明示的に指定するのに有用です。これを使わない場合、キーワード引数は上述の例のrest引数に吸い込まれます。メソッドを拡張してキーワード引数を受け取るようにする場合、以下のような非互換性が発生する可能性があります。 {% highlight ruby %} # メソッドは残りの引数を受け取るが、`**nil`はない状態 @@ -307,7 +309,7 @@ foo(k: 1) #=> ArgumentError: unknown keyword k 当初、自動変換はうまいアイデアに思われていて、多くの場合問題なく機能していました。しかし、エッジケースがあまりにも多く、これまでこの振る舞いに関するバグレポートを山のように受け取りました。 -自動変換は、オプションの位置引数とキーワード引数をどちらも受け取るメソッドではうまく動きません。末尾のHashオブジェクトを位置引数として扱うことを期待する人々もいれば、末尾のHashオブジェクトをキーワード引数として扱うことを期待する人々もいました。 +自動変換は、オプション引数とキーワード引数をどちらも受け取るメソッドではうまく動きません。末尾のHashオブジェクトを位置引数として扱うことを期待する人々もいれば、末尾のHashオブジェクトをキーワード引数として扱うことを期待する人々もいました。 最も混乱を呼ぶケースのひとつを以下に示します。 @@ -345,7 +347,7 @@ foo() #=> Ruby 2.6以前: [{}] #=> Ruby 2.7以降: [] {% endhighlight %} -`foo()`には引数がありませんが、Ruby 2.6では空のハッシュ引数が`target`に渡されます。理由は、メソッド`foo`が明示的にキーワード(`**kwargs`)を委譲しているためです。`foo()`が呼び出されると、`args`は空のArrayになり、`kwargs`は空のHashになります。そして`target(*args, **kwargs, &block)`は空のHashを引数として1つ渡します。理由は、`**kwargs`が自動的にHash位置引数に変換されるためです。 +`foo()`には引数がありませんが、Ruby 2.6では空のハッシュ引数が`target`に渡されます。理由は、メソッド`foo`が明示的にキーワード(`**kwargs`)を委譲しているためです。`foo()`が呼び出されると、`args`は空のArrayになり、`kwargs`は空のHashになり、blockはnilになります。。そして`target(*args, **kwargs, &block)`は空のHashを引数として1つ渡します。理由は、`**kwargs`が自動的にHash位置引数に変換されるためです。 自動変換は開発者を混乱させるのみならず、メソッドの拡張性も弱めてしまいます。振る舞いが変更された理由や、特定の実装が選択された理由について詳しくは[Feature #14183](https://bugs.ruby-lang.org/issues/14183)をご覧ください。 @@ -355,4 +357,4 @@ foo() #=> Ruby 2.6以前: [{}] ## 更新履歴 -* 更新 2019-12-25: 2.7.0-rc2でwarningメッセージが若干変更され、warning抑制APIが追加された。 +* 更新 2019-12-25: 2.7.0-rc2で警告メッセージが若干変更され、警告抑制APIが追加された。 From 6d63b42335fa7eb881aa16c65d0b5f1756f0e269 Mon Sep 17 00:00:00 2001 From: hachi8833 Date: Wed, 22 Jan 2020 12:35:17 +0900 Subject: [PATCH 0476/1487] Add en doc --- ...ional-and-keyword-arguments-in-ruby-3-0.md | 355 ++++++++++++++++++ 1 file changed, 355 insertions(+) create mode 100644 ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md diff --git a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md new file mode 100644 index 0000000000..44cd874cc1 --- /dev/null +++ b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -0,0 +1,355 @@ +--- +layout: news_post +title: "Separation of positional and keyword arguments in Ruby 3.0" +author: "mame" +translator: +date: 2019-12-12 12:00:00 +0000 +lang: en +--- + +This article explains the planned incompatibility of keyword arguments in Ruby 3.0 + +## tl;dr + +In Ruby 3.0, positional arguments and keyword arguments will be separated. Ruby 2.7 will warn for behaviors that will change in Ruby 3.0. If you see the following warnings, you need to update your code: + +* `Using the last argument as keyword parameters is deprecated`, or +* `Passing the keyword argument as the last hash parameter is deprecated`, or +* `Splitting the last argument into positional and keyword parameters is deprecated` + +In most cases, you can avoid the incompatibility by adding the _double splat_ operator. It explicitly specifies passing keyword arguments instead of a `Hash` object. Likewise, you may add braces `{}` to explicitly pass a `Hash` object, instead of keyword arguments. Read the section "Typical cases" below for more details. + +In Ruby 3, a method delegating all arguments must explicitly delegate keyword arguments in addition to positional arguments. If you want to keep the delegation behavior found in Ruby 2.7 and earlier, use `ruby2_keywords`. See the "Handling argument delegation" section below for more details. + +## Typical cases + +Here is the most typical case. You can use double splat operator (`**`) to pass keywords instead of a Hash. + +{% highlight ruby %} +# This method accepts only a keyword argument +def foo(k: 1) + p k +end + +h = { k: 42 } + +# This method call passes a positional Hash argument +# In Ruby 2.7: The Hash is automatically converted to a keyword argument +# In Ruby 3.0: This call raises an ArgumentError +foo(h) + # => demo.rb:11: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call + # demo.rb:2: warning: The called method `foo' is defined here + # 42 + +# If you want to keep the behavior in Ruby 3.0, use double splat +foo(**h) #=> 42 +{% endhighlight %} + +Here is another case. You can use braces (`{}`) to pass a Hash instead of keywords explicitly. + +{% highlight ruby %} +# This method accepts one positional argument and a keyword rest argument +def bar(h, **kwargs) + p h +end + +# This call passes only a keyword argument and no positional arguments +# In Ruby 2.7: The keyword is converted to a positional Hash argument +# In Ruby 3.0: This call raises an ArgumentError +bar(k: 42) + # => demo2.rb:9: warning: Passing the keyword argument as the last hash parameter is deprecated + # demo2.rb:2: warning: The called method `bar' is defined here + # {:k=>42} + +# If you want to keep the behavior in Ruby 3.0, write braces to make it an +# explicit Hash +bar({ k: 42 }) # => {:k=>42} +{% endhighlight %} + +## What is deprecated? + +In Ruby 2, keyword arguments can be treated as the last positional Hash argument and a last positional Hash argument can be treated as keyword arguments. + +Because the automatic conversion is sometimes too complex and troublesome as described in the final section. So it's now deprecated in Ruby 2.7 and will be removed in Ruby 3. In other words, keyword arguments will be completely separated from positional one in Ruby 3. So when you want to pass keyword arguments, you should always use `foo(k: expr)` or `foo(**expr)`. If you want to accept keyword arguments, in principle you should always use `def foo(k: default)` or `def foo(k:)` or `def foo(**kwargs)`. + +Note that Ruby 3.0 doesn't behave differently when calling a method which doesn't accept keyword arguments with keyword arguments. For instance, the following case is not going to be deprecated and will keep working in Ruby 3.0. The keyword arguments are still treated as a positional Hash argument. + +{% highlight ruby %} +def foo(kwargs = {}) + kwargs +end + +foo(k: 1) #=> {:k=>1} +{% endhighlight %} + +This is because this style is used very frequently, and there is no ambiguity in how the argument should be treated. Prohibiting this conversion would result in additional incompatibility for little benefit. + +However, this style is not recommended in new code, unless you are often passing a Hash as a positional argument, and are also using keyword arguments. Otherwise, use double splat: + +{% highlight ruby %} +def foo(**kwargs) + kwargs +end + +foo(k: 1) #=> {:k=>1} +{% endhighlight %} + +## Will my code break on Ruby 2.7? + +A short answer is "maybe not". + +The changes in Ruby 2.7 are designed as a migration path towards 3.0. While in principle, Ruby 2.7 only warns against behaviors that will change in Ruby 3, it includes some incompatible changes we consider to be minor. See the "Other minor changes" section for details. + +Except for the warnings and minor changes, Ruby 2.7 attempts to keep the compatibility with Ruby 2.6. So, your code will probably work on Ruby 2.7, though it may emit warnings. And by running it on Ruby 2.7, you can check if your code is ready for Ruby 3.0. + +If you want to disable the deprecation warnings, please use a command-line argument `-W:no-deprecated` or add `Warning[:deprecated] = false` to your code. + +## Handling argument delegation + +### Ruby 2.6 or prior + +In Ruby 2, you can write a delegation method by accepting a `*rest` argument and a `&block` argument, and passing the two to the target method. In this behavior, the keyword arguments are also implicitly handled by the automatic conversion between positional and keyword arguments. + +{% highlight ruby %} +def foo(*args, &block) + target(*args, &block) +end +{% endhighlight %} + +### Ruby 3 + +You need to explicitly delegate keyword arguments. + +{% highlight ruby %} +def foo(*args, **kwargs, &block) + target(*args, **kwargs, &block) +end +{% endhighlight %} + +Alternatively, if you do not need compatibility with Ruby 2.6 or prior and you don't alter any arguments, you can use the new delegation syntax (`...`) that is introduced in Ruby 2.7. + +{% highlight ruby %} +def foo(...) + target(...) +end +{% endhighlight %} + +### Ruby 2.7 + +In short: use `Module#ruby2_keywords` and delegate `*args, &block`. + +{% highlight ruby %} +ruby2_keywords def foo(*args, &block) + target(*args, &block) +end +{% endhighlight %} + +`ruby2_keywords` accepts keyword arguments as the last Hash argument, and passes it as keyword arguments when calling the other method. + +In fact, Ruby 2.7 allows the new style of delegation in many cases. However, there is a known corner case. See the next section. + +### A compatible delegation that works on Ruby 2.6, 2.7 and Ruby 3 + +In short: use `Module#ruby2_keywords` again. + +{% highlight ruby %} +ruby2_keywords def foo(*args, &block) + target(*args, &block) +end +{% endhighlight %} + +Unfortunately, we need to use the old-style delegation (i.e., no `**kwargs`) because Ruby 2.6 or prior does not handle the new delegation style correctly. This is one of the reasons of the keyword argument separation; the details are described in the final section. And `ruby2_keywords` allows you to run the old style even in Ruby 2.7 and 3.0. As there is no `ruby2_keywords` defined in 2.6 or prior, please use the [ruby2_keywords gem](https://rubygems.org/gems/ruby2_keywords) or define it yourself: + +{% highlight ruby %} +def ruby2_keywords(*) +end if RUBY_VERSION < "2.7" +{% endhighlight %} + +--- + +If your code doesn't have to run on Ruby 2.6 or older, you may try the new style in Ruby 2.7. In almost all cases, it works. Note that, however, there are unfortunate corner cases as follows: + +{% highlight ruby %} +def target(*args) + p args +end + +def foo(*args, **kwargs, &block) + target(*args, **kwargs, &block) +end + +foo({}) #=> Ruby 2.7: [] ({} is dropped) +foo({}, **{}) #=> Ruby 2.7: [{}] (You can pass {} by explicitly passing "no" keywords) +{% endhighlight %} + +An empty Hash argument is automatically converted and absorbed into `**kwargs`, and the delegation call removes the empty keyword hash, so no argument is passed to `target`. As far as we know, this is the only corner case. + +As noted in the last line, you can work around this issue by using `**{}`. + +If you really worry about the portability, use `ruby2_keywords`. (Acknowledge that Ruby 2.6 or before themselves have tons of corner cases in keyword arguments. :-) +`ruby2_keywords` might be removed in the future after Ruby 2.6 reaches end-of-life. At that point, we recommend to explicitly delegate keyword arguments (see Ruby 3 code above). + +## Other minor changes + +There are three minor changes about keyword arguments in Ruby 2.7. + +### 1. Non-Symbol keys are allowed in keyword arguments + +In Ruby 2.6 or before, only Symbol keys were allowed in keyword arguments. In Ruby 2.7, keyword arguments can use non-Symbol keys. + +{% highlight ruby %} +def foo(**kwargs) + kwargs +end +foo("key" => 42) + #=> Ruby 2.6 or before: ArgumentError: wrong number of arguments + #=> Ruby 2.7 or later: {"key"=>42} +{% endhighlight %} + +If a method accepts both optional and keyword arguments, the Hash object that has both Symbol keys and non-Symbol keys was split in two in Ruby 2.6. In Ruby 2.7, both are accepted as keywords because non-Symbol keys are allowed. + +{% highlight ruby %} +def bar(x=1, **kwargs) + p [x, kwargs] +end + +bar("key" => 42, :sym => 43) + #=> Ruby 2.6: [{"key"=>42}, {:sym=>43}] + #=> Ruby 2.7: [1, {"key"=>42, :sym=>43}] + +# Use braces to keep the behavior +bar({"key" => 42}, :sym => 43) + #=> Ruby 2.6 and 2.7: [{"key"=>42}, {:sym=>43}] +{% endhighlight %} + +Ruby 2.7 still splits hashes with a warning if passing a Hash or keyword arguments with both Symbol and non-Symbol keys to a method that accepts explicit keywords but no keyword rest argument (`**kwargs`). This behavior will be removed in Ruby 3, and an `ArgumentError` will be raised. + +{% highlight ruby %} +def bar(x=1, sym: nil) + p [x, sym] +end + +bar("key" => 42, :sym => 43) +# Ruby 2.6 and 2.7: => [{"key"=>42}, 43] +# Ruby 2.7: warning: Splitting the last argument into positional and keyword parameters is deprecated +# warning: The called method `bar' is defined here +# Ruby 3.0: ArgumentError +{% endhighlight %} + +### 2. Double splat with an empty hash (`**{}`) passes no arguments + +In Ruby 2.6 or before, passing `**empty_hash` passes an empty Hash as a positional argument. In Ruby 2.7 or later, it passes no arguments. + +{% highlight ruby %} +def foo(*args) + args +end + +empty_hash = {} +foo(**empty_hash) + #=> Ruby 2.6 or before: [{}] + #=> Ruby 2.7 or later: [] +{% endhighlight %} + +Note that `foo(**{})` passes nothing in both Ruby 2.6 and 2.7. In Ruby 2.6 and before, `**{}` is removed by the parser, and in Ruby 2.7 and above, it is treated the same as `**empty_hash`, allowing for an easy way to pass no keyword arguments to a method. + +In Ruby 2.7, when calling a method with an insufficient number of required positional arguments, `foo(**empty_hash)` passes an empty hash with a warning emitted, for compatibility with Ruby 2.6. This behavior will be removed in 3.0. + +{% highlight ruby %} +def foo(x) + x +end + +empty_hash = {} +foo(**empty_hash) + #=> Ruby 2.6 or before: {} + #=> Ruby 2.7: warning: Passing the keyword argument as the last hash parameter is deprecated + # warning: The called method `foo' is defined here + #=> Ruby 3.0: ArgumentError: wrong number of arguments +{% endhighlight %} + +### 3. The no-keyword-arguments syntax (`**nil`) is introduced + +You can use `**nil` in a method definition to explicitly mark the method accepts no keyword arguments. Calling such methods with keyword arguments will result in an `ArgumentError`. (This is actually a new feature, not an incompatibility) + +{% highlight ruby %} +def foo(*args, **nil) +end + +foo(k: 1) + #=> Ruby 2.7 or later: no keywords accepted (ArgumentError) +{% endhighlight %} + +This is useful to make it explicit that the method does not accept keyword arguments. Otherwise, the keywords are absorbed in the rest argument in the above example. If you extend a method to accept keyword arguments, the method may have incompatibility as follows: + +{% highlight ruby %} +# If a method accepts rest argument and no `**nil` +def foo(*args) + p args +end + +# Passing keywords are converted to a Hash object (even in Ruby 3.0) +foo(k: 1) #=> [{:k=>1}] + +# If the method is extended to accept a keyword +def foo(*args, mode: false) + p args +end + +# The existing call may break +foo(k: 1) #=> ArgumentError: unknown keyword k +{% endhighlight %} + +## Why we're deprecating the automatic conversion + +The automatic conversion initially appeared to be a good idea, and worked well in many cases. However, it had too many corner cases, and we have received many bug reports about the behavior. + +Automatic conversion does not work well when a method accepts optional positional arguments and keyword arguments. Some people expect the last Hash object to be treated as a positional argument, and others expect it to be converted to keyword arguments. + +Here is one of the most confusing cases: + +{% highlight ruby %} +def foo(x, **kwargs) + p [x, kwargs] +end + +def bar(x=1, **kwargs) + p [x, kwargs] +end + +foo({}) => [{}, {}] +bar({}) => [1, {}] + +bar({}, **{}) => expected: [{}, {}], actual: [1, {}] +{% endhighlight %} + +In Ruby 2, `foo({})` passes an empty hash as a normal argument (i.e., `{}` is assigned to `x`), while `bar({})` passes a keyword argument (i.e, `{}` is assigned to `kwargs`). So `any_method({})` is very ambiguous. + +You may think of `bar({}, **{})` to pass the empty hash to `x` explicitly. Surprisingly, it does not work as you expected; it still prints `[1, {}]` in Ruby 2.6. This is because `**{}` is ignored by the parser in Ruby 2.6, and the first argument `{}` is automatically converted to keywords (`**kwargs`). In this case, you need to call `bar({}, {})`, which is very weird. + +The same issues also apply to methods that accept rest and keyword arguments. This makes explicit delegation of keyword arguments not work. + +{% highlight ruby %} +def target(*args) + p args +end + +def foo(*args, **kwargs, &block) + target(*args, **kwargs, &block) +end + +foo() #=> Ruby 2.6 or before: [{}] + #=> Ruby 2.7 or later: [] +{% endhighlight %} + +`foo()` passes no arguments, but `target` receives an empty hash argument in Ruby 2.6. This is because the method `foo` delegates keywords (`**kwargs`) explicitly. When `foo()` is called, `args` is an empty Array, `kwargs` is an empty Hash, and `block` is `nil`. And then `target(*args, **kwargs, &block)` passes an empty Hash as an argument because `**kwargs` is automatically converted to a positional Hash argument. + +The automatic conversion not only confuses people but also makes the method less extensible. See [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) for more details about the reasons for the change in behavior, and why certain implementation choices were made. + +## Acknowledgment + +This article was kindly reviewed (or even co-authored) by Jeremy Evans and Benoit Daloze. + +## History + +* Updated 2019-12-25: In 2.7.0-rc2, the warning message was slightly changed, and an API to suppress the warnings was added. From f93cd654bd38b0e17b278ddd81087a1f1ba65a72 Mon Sep 17 00:00:00 2001 From: hachi8833 Date: Wed, 22 Jan 2020 12:35:47 +0900 Subject: [PATCH 0477/1487] Translate "Separation of positional and keyword arguments in Ruby 3.0" --- ...ional-and-keyword-arguments-in-ruby-3-0.md | 195 +++++++++--------- 1 file changed, 99 insertions(+), 96 deletions(-) diff --git a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md index 44cd874cc1..5e80e231d5 100644 --- a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md +++ b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -2,77 +2,81 @@ layout: news_post title: "Separation of positional and keyword arguments in Ruby 3.0" author: "mame" -translator: +translator: "hachi8833" date: 2019-12-12 12:00:00 +0000 -lang: en +lang: ja --- -This article explains the planned incompatibility of keyword arguments in Ruby 3.0 +本記事では、Ruby 3.0で予定されているキーワード引数の非互換性について解説します。 -## tl;dr +## 概要 -In Ruby 3.0, positional arguments and keyword arguments will be separated. Ruby 2.7 will warn for behaviors that will change in Ruby 3.0. If you see the following warnings, you need to update your code: +Ruby 3.0では、位置引数とキーワード引数が分離されます。Ruby 3.0で変更される振る舞いはRuby 2.7でwarningを表示します。以下のいずれかのwarningが表示される場合は、コードのアップデートが必要です。 * `Using the last argument as keyword parameters is deprecated`, or * `Passing the keyword argument as the last hash parameter is deprecated`, or * `Splitting the last argument into positional and keyword parameters is deprecated` -In most cases, you can avoid the incompatibility by adding the _double splat_ operator. It explicitly specifies passing keyword arguments instead of a `Hash` object. Likewise, you may add braces `{}` to explicitly pass a `Hash` object, instead of keyword arguments. Read the section "Typical cases" below for more details. +この非互換性は、double splat演算子(`**`)を追加することでほぼ回避できます。これにより、`Hash`オブジェクトではなくキーワード引数を渡すことが明示的に指定されます。同様に、キーワード引数ではなく`Hash`オブジェクトを明示的に渡したい場合は中かっこ(`{}`)を追加できます。詳しくは後述の「典型的なケース」をご覧ください。 -In Ruby 3, a method delegating all arguments must explicitly delegate keyword arguments in addition to positional arguments. If you want to keep the delegation behavior found in Ruby 2.7 and earlier, use `ruby2_keywords`. See the "Handling argument delegation" section below for more details. +Ruby 3では、すべての引数を委譲するメソッドで、位置引数の他に必ずキーワード引数も明示的に委譲しなければなりません。Ruby 2.7以前の委譲の振る舞いを変えたくない場合は、`ruby2_keywords`をお使いください。詳しくは後述の「引数の委譲の扱いについて」をご覧ください。 -## Typical cases +## よくあるケース -Here is the most typical case. You can use double splat operator (`**`) to pass keywords instead of a Hash. +以下はもっともよくあるケースです。Hashではなくキーワードを渡すのにdouble splat演算子(`**`)を使えます。 {% highlight ruby %} -# This method accepts only a keyword argument +# このメソッドはキーワード引数のみを受け取る def foo(k: 1) p k end h = { k: 42 } -# This method call passes a positional Hash argument -# In Ruby 2.7: The Hash is automatically converted to a keyword argument -# In Ruby 3.0: This call raises an ArgumentError +# このメソッド呼び出しは位置引数としてHashを渡している +# Ruby 2.7: このHashは自動でキーワード引数に変換される +# Ruby 3.0: この呼び出しはArgumentErrorになる foo(h) # => demo.rb:11: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call # demo.rb:2: warning: The called method `foo' is defined here # 42 -# If you want to keep the behavior in Ruby 3.0, use double splat +# この振る舞いをRuby 3.0で変えたくない場合はdouble splatを用いる foo(**h) #=> 42 {% endhighlight %} -Here is another case. You can use braces (`{}`) to pass a Hash instead of keywords explicitly. +別の例: キーワード引数ではなくHashを明示的に渡す場合は中かっこ(`{}`)を使います。 {% highlight ruby %} -# This method accepts one positional argument and a keyword rest argument +# このメソッドは位置引数を1個、残りはキーワード引数を受け取る def bar(h, **kwargs) p h end -# This call passes only a keyword argument and no positional arguments -# In Ruby 2.7: The keyword is converted to a positional Hash argument -# In Ruby 3.0: This call raises an ArgumentError +# この呼び出しではキーワード引数のみが渡され、位置引数は渡されない +# Ruby 2.7: このキーワード引数は自動でHash引数に変換される +# Ruby 3.0: この呼び出しはArgumentErrorになる bar(k: 42) # => demo2.rb:9: warning: Passing the keyword argument as the last hash parameter is deprecated # demo2.rb:2: warning: The called method `bar' is defined here # {:k=>42} -# If you want to keep the behavior in Ruby 3.0, write braces to make it an -# explicit Hash +# この振る舞いをRuby 3.0で変えたくない場合は +# 中かっこで明示的にHashにする bar({ k: 42 }) # => {:k=>42} {% endhighlight %} -## What is deprecated? +## どの動作が非推奨になるか -In Ruby 2, keyword arguments can be treated as the last positional Hash argument and a last positional Hash argument can be treated as keyword arguments. +Ruby 2では、キーワード引数が末尾のハッシュ位置引数として扱われることがあります。また、末尾のハッシュ引数がキーワード引数として扱われることもあります。 -Because the automatic conversion is sometimes too complex and troublesome as described in the final section. So it's now deprecated in Ruby 2.7 and will be removed in Ruby 3. In other words, keyword arguments will be completely separated from positional one in Ruby 3. So when you want to pass keyword arguments, you should always use `foo(k: expr)` or `foo(**expr)`. If you want to accept keyword arguments, in principle you should always use `def foo(k: default)` or `def foo(k:)` or `def foo(**kwargs)`. +この自動変換は場合によっては複雑になりすぎてしまい、本記事末尾で後述するようにトラブルの原因になることがあります。そのため、この自動変換をRuby 2.7で非推奨とし、Ruby 3.0で廃止する予定です。言い換えると、Ruby 3.0のキーワード引数は位置引数と完全に分離されることになります。つまり、キーワード引数を渡したい場合は、常に`foo(k: expr)`または`foo(**expr)`の形にすべきです。(メソッド定義で)キーワード引数を受け取りたい場合は、原則として常に以下のいずれかの形にすべきです。 -Note that Ruby 3.0 doesn't behave differently when calling a method which doesn't accept keyword arguments with keyword arguments. For instance, the following case is not going to be deprecated and will keep working in Ruby 3.0. The keyword arguments are still treated as a positional Hash argument. +* `def foo(k: default)` +* `def foo(k:)` +* `def foo(**kwargs)` + +なお、キーワード引数を受け取らないメソッドを呼び出すときにキーワード引数を渡した場合の振る舞いは、Ruby 3.0でも変わらない点にご注意ください。たとえば、以下のケースは非推奨にはならず、Ruby 3.0でも引き続き動作します(このキーワード引数は引き続きHash位置引数として扱われます)。 {% highlight ruby %} def foo(kwargs = {}) @@ -82,9 +86,9 @@ end foo(k: 1) #=> {:k=>1} {% endhighlight %} -This is because this style is used very frequently, and there is no ambiguity in how the argument should be treated. Prohibiting this conversion would result in additional incompatibility for little benefit. +変わらない理由は、このスタイルが非常によく用いられていることと、この呼び出し方法では引数の扱いに曖昧な点がないためです。この振る舞いまで禁止してしまうと、得られるメリットが少ないうえに非互換性がさらに増えてしまいます。 -However, this style is not recommended in new code, unless you are often passing a Hash as a positional argument, and are also using keyword arguments. Otherwise, use double splat: +ただし今後新しいコードを書く場合、このスタイルはおすすめできません(Hashを位置引数として渡す頻度が高く、かつキーワード引数も使う場合を除く)。代わりに、次のようにdouble splat(`**`)をお使いください。 {% highlight ruby %} def foo(**kwargs) @@ -94,21 +98,21 @@ end foo(k: 1) #=> {:k=>1} {% endhighlight %} -## Will my code break on Ruby 2.7? +## Q: 自分のコードはRuby 2.7で動かなくなりますか? -A short answer is "maybe not". +手短かに言うと「壊れない可能性はあります」。 -The changes in Ruby 2.7 are designed as a migration path towards 3.0. While in principle, Ruby 2.7 only warns against behaviors that will change in Ruby 3, it includes some incompatible changes we consider to be minor. See the "Other minor changes" section for details. +Ruby 2.7におけるこの変更は、3.0への移行パスとして設計されています。あくまで原則としてですが、Ruby 2.7ではRuby 3.0で変更される振る舞いについてwarningを出すにとどめており、warningの中には私たちが微細とみなしている変更点も若干含まれます。詳しくは後述の「その他の微細な変更点」をご覧ください。 -Except for the warnings and minor changes, Ruby 2.7 attempts to keep the compatibility with Ruby 2.6. So, your code will probably work on Ruby 2.7, though it may emit warnings. And by running it on Ruby 2.7, you can check if your code is ready for Ruby 3.0. +Ruby 2.7では、warningが表示される点と微細な変更点以外を除いてRuby 2.6との互換性を保とうとしています。つまり、あなたのコードはRuby 2.7でもおそらく動作しますが、warningが表示される可能性はあります。あなたのコードをRuby 2.7で実行すれば、Ruby 3.0の準備ができているかどうかをチェックできます。 -If you want to disable the deprecation warnings, please use a command-line argument `-W:no-deprecated` or add `Warning[:deprecated] = false` to your code. +非推奨のwarningを無効にしたい場合は、コマンドライン引数`-W:no-deprecated`を使うか、コードに`Warning[:deprecated] = false`を追加します。 -## Handling argument delegation +## 引数の委譲の扱いについて -### Ruby 2.6 or prior +### Ruby 2.6以前の場合 -In Ruby 2, you can write a delegation method by accepting a `*rest` argument and a `&block` argument, and passing the two to the target method. In this behavior, the keyword arguments are also implicitly handled by the automatic conversion between positional and keyword arguments. +Ruby 2では、以下のように1個の`*rest`引数と1個の`&block`引数を受け付けて、この2つの引数を委譲先メソッド(以下の`target`)に渡すことで委譲メソッドを書けます。この振る舞いでは、(1つ以上の)キーワード引数も「位置引数<=>キーワード引数の自動変換」によって暗黙的に扱われます。 {% highlight ruby %} def foo(*args, &block) @@ -116,9 +120,9 @@ def foo(*args, &block) end {% endhighlight %} -### Ruby 3 +### Ruby 3の場合 -You need to explicitly delegate keyword arguments. +以下のようにキーワード引数を明示的に委譲する必要があります。 {% highlight ruby %} def foo(*args, **kwargs, &block) @@ -126,7 +130,7 @@ def foo(*args, **kwargs, &block) end {% endhighlight %} -Alternatively, if you do not need compatibility with Ruby 2.6 or prior and you don't alter any arguments, you can use the new delegation syntax (`...`) that is introduced in Ruby 2.7. +別の方法として、Ruby 2.6以前との互換性を考慮する必要がなく、かつ引数を一切改変しないのであれば、以下のようにRuby 2.7で新しく導入される委譲構文(`...`)を利用できます。 {% highlight ruby %} def foo(...) @@ -134,9 +138,9 @@ def foo(...) end {% endhighlight %} -### Ruby 2.7 +### Ruby 2.7の場合 -In short: use `Module#ruby2_keywords` and delegate `*args, &block`. +手短かに言うと、以下のように`Module#ruby2_keywords`を用い、`*args, &block`を委譲します。 {% highlight ruby %} ruby2_keywords def foo(*args, &block) @@ -144,13 +148,13 @@ ruby2_keywords def foo(*args, &block) end {% endhighlight %} -`ruby2_keywords` accepts keyword arguments as the last Hash argument, and passes it as keyword arguments when calling the other method. +`ruby2_keywords`を指定すると、キーワード引数を末尾のHash引数として受け取れるようになり、他のメソッドを呼び出すときにそれをキーワード引数として渡せます。 -In fact, Ruby 2.7 allows the new style of delegation in many cases. However, there is a known corner case. See the next section. +実際、Ruby 2.7では多くの場面でこの新しい委譲のスタイルを利用できます。ただし1つ既知のエッジケースがあります。次をご覧ください。 -### A compatible delegation that works on Ruby 2.6, 2.7 and Ruby 3 +### Ruby 2.6 / 2.7 / 3で互換性のある委譲スタイル -In short: use `Module#ruby2_keywords` again. +手短かに言うと、ここも「`Module#ruby2_keywords`を使う」となります。 {% highlight ruby %} ruby2_keywords def foo(*args, &block) @@ -158,16 +162,16 @@ ruby2_keywords def foo(*args, &block) end {% endhighlight %} -Unfortunately, we need to use the old-style delegation (i.e., no `**kwargs`) because Ruby 2.6 or prior does not handle the new delegation style correctly. This is one of the reasons of the keyword argument separation; the details are described in the final section. And `ruby2_keywords` allows you to run the old style even in Ruby 2.7 and 3.0. As there is no `ruby2_keywords` defined in 2.6 or prior, please use the [ruby2_keywords gem](https://rubygems.org/gems/ruby2_keywords) or define it yourself: +残念ながら、Ruby 2.6以前では新しい委譲スタイルを正しく扱えないため、旧来の委譲スタイル(`**kwargs`を使わないなど)を使う必要があります。これは、キーワード引数を分離した理由のひとつでもあります(詳しくは本記事末尾をご覧ください)。`ruby2_keywords`を用いれば、Ruby 2.7や3.0でも旧来の委譲スタイルを引き続き利用できます。2.6以前のRubyでは`ruby2_keywords`が定義されていないので、[ruby2_keywords](https://rubygems.org/gems/ruby2_keywords) gemを使うか、以下を手動で定義します。 {% highlight ruby %} def ruby2_keywords(*) end if RUBY_VERSION < "2.7" {% endhighlight %} ---- +* * * * * -If your code doesn't have to run on Ruby 2.6 or older, you may try the new style in Ruby 2.7. In almost all cases, it works. Note that, however, there are unfortunate corner cases as follows: +自分のコードがRuby 2.6以前で動かなくても構わないのであれば、Ruby 2.7で新しいスタイルを試してもよいでしょう。ほぼほぼ間違いなく動作しますが、以下のようなエッジケースを運悪く踏むこともあります。 {% highlight ruby %} def target(*args) @@ -178,35 +182,34 @@ def foo(*args, **kwargs, &block) target(*args, **kwargs, &block) end -foo({}) #=> Ruby 2.7: [] ({} is dropped) -foo({}, **{}) #=> Ruby 2.7: [{}] (You can pass {} by explicitly passing "no" keywords) +foo({}) #=> Ruby 2.7: [] ({}を含んでいない) +foo({}, **{}) #=> Ruby 2.7: [{}] ({}を渡せば、キーワード引数が「ない」ことを明示できる) {% endhighlight %} -An empty Hash argument is automatically converted and absorbed into `**kwargs`, and the delegation call removes the empty keyword hash, so no argument is passed to `target`. As far as we know, this is the only corner case. +上のコードでは、空のHash引数が自動的に変換されて`**kwargs`に吸い込まれ、この空のキーワードハッシュは委譲の呼び出しで削除されます。このため、`targe`には引数がまったく渡されなくなります。私たちが把握している範囲では、これが唯一のエッジケースです。 -As noted in the last line, you can work around this issue by using `**{}`. +上のコードの最下部に書いたように、`**{}`を渡すことでこの問題を回避できます。 -If you really worry about the portability, use `ruby2_keywords`. (Acknowledge that Ruby 2.6 or before themselves have tons of corner cases in keyword arguments. :-) -`ruby2_keywords` might be removed in the future after Ruby 2.6 reaches end-of-life. At that point, we recommend to explicitly delegate keyword arguments (see Ruby 3 code above). +移植性がどうしても不安な場合は`ruby2_keywords`をお使いください(Ruby 2.6以前ではキーワード引数周りで膨大なエッジケースが存在していることを知っておいてください)。`ruby2_keywords`は、今後Ruby 2.6が役目を終えたときに削除される可能性があります。現時点で私たちがおすすめできるのは、キーワード引数を明示的に委譲することです(上述のRuby 3向けのコードを参照)。 -## Other minor changes +## その他の微細な変更点 -There are three minor changes about keyword arguments in Ruby 2.7. +Ruby 2.7のキーワード引数では、この他に以下の3つのマイナーチェンジが行われています。 -### 1. Non-Symbol keys are allowed in keyword arguments +### 1\. キーワード引数で非シンボルキーを利用できるようになった -In Ruby 2.6 or before, only Symbol keys were allowed in keyword arguments. In Ruby 2.7, keyword arguments can use non-Symbol keys. +Ruby 2.6以前のキーワード引数では、シンボル形式のキーしか利用できませんでした。Ruby 2.7のキーワード引数では、以下のようにシンボル形式でないキーを利用できるようになります。 {% highlight ruby %} def foo(**kwargs) kwargs end foo("key" => 42) - #=> Ruby 2.6 or before: ArgumentError: wrong number of arguments - #=> Ruby 2.7 or later: {"key"=>42} + #=> Ruby 2.6以前: ArgumentError: wrong number of arguments + #=> Ruby 2.7以降: {"key"=>42} {% endhighlight %} -If a method accepts both optional and keyword arguments, the Hash object that has both Symbol keys and non-Symbol keys was split in two in Ruby 2.6. In Ruby 2.7, both are accepted as keywords because non-Symbol keys are allowed. +あるメソッドがオプション引数とキーワード引数を両方とも受け付ける場合、Ruby 2.6では以下のようにシンボル形式のキーと非シンボルキーを両方持つHashオブジェクトが2つに分割されていました。Ruby 2.7では非シンボルキーを利用できるので、どちらも受け取れます。 {% highlight ruby %} def bar(x=1, **kwargs) @@ -217,12 +220,12 @@ bar("key" => 42, :sym => 43) #=> Ruby 2.6: [{"key"=>42}, {:sym=>43}] #=> Ruby 2.7: [1, {"key"=>42, :sym=>43}] -# Use braces to keep the behavior +# 振る舞いを変えたくない場合は中かっこ{}を使う bar({"key" => 42}, :sym => 43) #=> Ruby 2.6 and 2.7: [{"key"=>42}, {:sym=>43}] {% endhighlight %} -Ruby 2.7 still splits hashes with a warning if passing a Hash or keyword arguments with both Symbol and non-Symbol keys to a method that accepts explicit keywords but no keyword rest argument (`**kwargs`). This behavior will be removed in Ruby 3, and an `ArgumentError` will be raised. +Ruby 2.7では、キーワード引数を明示的に受け付けるがキーワードrest引数(`**kwargs`)を受け取らないメソッドに対して、シンボル形式のキーと非シンボルキーが両方混じったHashやキーワード引数を渡すと、引き続きハッシュを分割して警告を表示します。この振る舞いはRuby 3で廃止されて`ArgumentError`にする予定です。 {% highlight ruby %} def bar(x=1, sym: nil) @@ -230,15 +233,15 @@ def bar(x=1, sym: nil) end bar("key" => 42, :sym => 43) -# Ruby 2.6 and 2.7: => [{"key"=>42}, 43] +# Ruby 2.6と2.7: => [{"key"=>42}, 43] # Ruby 2.7: warning: Splitting the last argument into positional and keyword parameters is deprecated # warning: The called method `bar' is defined here # Ruby 3.0: ArgumentError {% endhighlight %} -### 2. Double splat with an empty hash (`**{}`) passes no arguments +### 2\. double splatを付けた空ハッシュ(`**{}`)で引数を渡さないようになった -In Ruby 2.6 or before, passing `**empty_hash` passes an empty Hash as a positional argument. In Ruby 2.7 or later, it passes no arguments. +Ruby 2.6以前は、`**empty_hash`を渡すと位置引数に空のハッシュが渡されました(`[{}]`)。Ruby 2.7以降では引数を渡さなくなります。 {% highlight ruby %} def foo(*args) @@ -247,13 +250,13 @@ end empty_hash = {} foo(**empty_hash) - #=> Ruby 2.6 or before: [{}] - #=> Ruby 2.7 or later: [] + #=> Ruby 2.6以前: [{}] + #=> Ruby 2.7以降: [] {% endhighlight %} -Note that `foo(**{})` passes nothing in both Ruby 2.6 and 2.7. In Ruby 2.6 and before, `**{}` is removed by the parser, and in Ruby 2.7 and above, it is treated the same as `**empty_hash`, allowing for an easy way to pass no keyword arguments to a method. +なお、`foo(**{})`はRuby 2.6以前とRuby 2.7のどちらの場合も引数を渡さず、`**{}`がパーサーによって削除される点にご注意ください。また、Ruby 2.7以降ではどちらも`**empty_hash`として同じに扱われるので、メソッドにキーワード引数を渡さないようにする指定が楽に行なえます。 -In Ruby 2.7, when calling a method with an insufficient number of required positional arguments, `foo(**empty_hash)` passes an empty hash with a warning emitted, for compatibility with Ruby 2.6. This behavior will be removed in 3.0. +Ruby 2.7では、あるメソッド呼び出しで必須とされる位置引数の個数が不足している場合、Ruby 2.6との互換性を保つために`foo(**empty_hash)`は空のハッシュを渡してwarningを表示します。この振る舞いはRuby 3.0で廃止されます。 {% highlight ruby %} def foo(x) @@ -262,51 +265,51 @@ end empty_hash = {} foo(**empty_hash) - #=> Ruby 2.6 or before: {} + #=> Ruby 2.6以前: {} #=> Ruby 2.7: warning: Passing the keyword argument as the last hash parameter is deprecated # warning: The called method `foo' is defined here #=> Ruby 3.0: ArgumentError: wrong number of arguments {% endhighlight %} -### 3. The no-keyword-arguments syntax (`**nil`) is introduced +### 3\. キーワード引数を受け取らないことを表す構文(`**nil`)が導入される -You can use `**nil` in a method definition to explicitly mark the method accepts no keyword arguments. Calling such methods with keyword arguments will result in an `ArgumentError`. (This is actually a new feature, not an incompatibility) +メソッド定義で`**nil`を用いることで、そのメソッドがキーワード引数を受け取らないことを明示的に示せるようになります。このメソッドを呼び出すときにキーワード引数を渡すと`ArgumentError`が表示されます(これは非互換性ではなく、事実上新機能です)。 {% highlight ruby %} def foo(*args, **nil) end foo(k: 1) - #=> Ruby 2.7 or later: no keywords accepted (ArgumentError) + #=> Ruby 2.7以降: no keywords accepted (ArgumentError) {% endhighlight %} -This is useful to make it explicit that the method does not accept keyword arguments. Otherwise, the keywords are absorbed in the rest argument in the above example. If you extend a method to accept keyword arguments, the method may have incompatibility as follows: +この新構文は、メソッドがキーワード引数を受け取らないことを明示的に指定するのに有用です。これを使わない場合、キーワード引数は上述の例の他の引数に吸い込まれます。メソッドを拡張してキーワード引数を受け取るようにする場合、以下のような非互換性が発生する可能性があります。 {% highlight ruby %} -# If a method accepts rest argument and no `**nil` +# メソッドは残りの引数を受け取るが、`**nil`はない状態 def foo(*args) p args end -# Passing keywords are converted to a Hash object (even in Ruby 3.0) +# キーワード引数はHashオブジェクトに変換される(Ruby 3.0でも同じ) foo(k: 1) #=> [{:k=>1}] -# If the method is extended to accept a keyword +# メソッドがキーワード引数を受け取るよう拡張した場合 def foo(*args, mode: false) p args end -# The existing call may break +# 以下の呼び出しが壊れる可能性がある foo(k: 1) #=> ArgumentError: unknown keyword k {% endhighlight %} -## Why we're deprecating the automatic conversion +## 自動変換を非推奨に変える理由 -The automatic conversion initially appeared to be a good idea, and worked well in many cases. However, it had too many corner cases, and we have received many bug reports about the behavior. +当初、自動変換はうまいアイデアに思われていて、多くの場合問題なく機能していました。しかし、エッジケースがあまりにも多く、これまでこの振る舞いに関するバグレポートを山のように受け取りました。 -Automatic conversion does not work well when a method accepts optional positional arguments and keyword arguments. Some people expect the last Hash object to be treated as a positional argument, and others expect it to be converted to keyword arguments. +自動変換は、オプションの位置引数とキーワード引数をどちらも受け取るメソッドではうまく動きません。末尾のHashオブジェクトを位置引数として扱うことを期待する人々もいれば、末尾のHashオブジェクトをキーワード引数として扱うことを期待する人々もいました。 -Here is one of the most confusing cases: +最も混乱を呼ぶケースのひとつを以下に示します。 {% highlight ruby %} def foo(x, **kwargs) @@ -317,17 +320,17 @@ def bar(x=1, **kwargs) p [x, kwargs] end -foo({}) => [{}, {}] -bar({}) => [1, {}] +foo({}) #=> [{}, {}] +bar({}) #=> [1, {}] -bar({}, **{}) => expected: [{}, {}], actual: [1, {}] +bar({}, **{}) #=> 期待は: [{}, {}]だが実際はl: [1, {}] {% endhighlight %} -In Ruby 2, `foo({})` passes an empty hash as a normal argument (i.e., `{}` is assigned to `x`), while `bar({})` passes a keyword argument (i.e, `{}` is assigned to `kwargs`). So `any_method({})` is very ambiguous. +Ruby 2の場合、`foo({})`は空のハッシュを通常の引数として1つ渡しますが(`x`に`{}`が代入されるなど)、`bar({})`はキーワード引数を1つ渡します(`kwargs`に`{}`が代入されるなど)。つまり、`any_method({})`は極めてあいまいになります。 -You may think of `bar({}, **{})` to pass the empty hash to `x` explicitly. Surprisingly, it does not work as you expected; it still prints `[1, {}]` in Ruby 2.6. This is because `**{}` is ignored by the parser in Ruby 2.6, and the first argument `{}` is automatically converted to keywords (`**kwargs`). In this case, you need to call `bar({}, {})`, which is very weird. +「`bar({}, **{})`は`x`に明示的に空のハッシュを渡すのでは?」と考える人もいるかもしれませんが、驚いたことに、この期待は裏切られます。Ruby 2.6では`[1, {}]`が出力されるのです。理由は、`**{}`がRuby 2.6のパーサーで無視されるのと、1番目の引数`{}`が自動的にキーワード引数(`**kwargs`)に変換されるためです。この場合`bar({}, {})`という形で呼び出す必要がありますが、これではあまりに見苦しくなります。 -The same issues also apply to methods that accept rest and keyword arguments. This makes explicit delegation of keyword arguments not work. +同じ問題は、残りの引数とキーワード引数を受け取るメソッドにも当てはまります。そのせいで、以下のようなキーワード引数の明示的な委譲は動作しません。 {% highlight ruby %} def target(*args) @@ -338,18 +341,18 @@ def foo(*args, **kwargs, &block) target(*args, **kwargs, &block) end -foo() #=> Ruby 2.6 or before: [{}] - #=> Ruby 2.7 or later: [] +foo() #=> Ruby 2.6以前: [{}] + #=> Ruby 2.7以降: [] {% endhighlight %} -`foo()` passes no arguments, but `target` receives an empty hash argument in Ruby 2.6. This is because the method `foo` delegates keywords (`**kwargs`) explicitly. When `foo()` is called, `args` is an empty Array, `kwargs` is an empty Hash, and `block` is `nil`. And then `target(*args, **kwargs, &block)` passes an empty Hash as an argument because `**kwargs` is automatically converted to a positional Hash argument. +`foo()`には引数がありませんが、Ruby 2.6では空のハッシュ引数が`target`に渡されます。理由は、メソッド`foo`が明示的にキーワード(`**kwargs`)を委譲しているためです。`foo()`が呼び出されると、`args`は空のArrayになり、`kwargs`は空のHashになります。そして`target(*args, **kwargs, &block)`は空のHashを引数として1つ渡します。理由は、`**kwargs`が自動的にHash位置引数に変換されるためです。 -The automatic conversion not only confuses people but also makes the method less extensible. See [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) for more details about the reasons for the change in behavior, and why certain implementation choices were made. +自動変換は開発者を混乱させるのみならず、メソッドの拡張性も弱めてしまいます。振る舞いが変更された理由や、特定の実装が選択された理由について詳しくは[Feature #14183](https://bugs.ruby-lang.org/issues/14183)をご覧ください。 -## Acknowledgment +## 謝辞 -This article was kindly reviewed (or even co-authored) by Jeremy Evans and Benoit Daloze. +本記事はJeremy EvansとBenoit Dalozeによる丁寧なレビュー(共著と言ってもよいくらいです)をいただきました。 -## History +## 更新履歴 -* Updated 2019-12-25: In 2.7.0-rc2, the warning message was slightly changed, and an API to suppress the warnings was added. +* 更新 2019-12-25: 2.7.0-rc2でwarningメッセージが若干変更され、warning抑制APIが追加された。 From 36c88c2bb991242f7ee04d51666df23d6b2c3d6d Mon Sep 17 00:00:00 2001 From: hachi8833 Date: Thu, 30 Jan 2020 16:49:40 +0900 Subject: [PATCH 0478/1487] Fix untranslated lines --- ...ation-of-positional-and-keyword-arguments-in-ruby-3-0.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md index 5e80e231d5..b9aec21a12 100644 --- a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md +++ b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -1,6 +1,6 @@ --- layout: news_post -title: "Separation of positional and keyword arguments in Ruby 3.0" +title: "Ruby 3.0における位置引数とキーワード引数の分離について" author: "mame" translator: "hachi8833" date: 2019-12-12 12:00:00 +0000 @@ -13,8 +13,8 @@ lang: ja Ruby 3.0では、位置引数とキーワード引数が分離されます。Ruby 3.0で変更される振る舞いはRuby 2.7でwarningを表示します。以下のいずれかのwarningが表示される場合は、コードのアップデートが必要です。 -* `Using the last argument as keyword parameters is deprecated`, or -* `Passing the keyword argument as the last hash parameter is deprecated`, or +* `Using the last argument as keyword parameters is deprecated` +* `Passing the keyword argument as the last hash parameter is deprecated` * `Splitting the last argument into positional and keyword parameters is deprecated` この非互換性は、double splat演算子(`**`)を追加することでほぼ回避できます。これにより、`Hash`オブジェクトではなくキーワード引数を渡すことが明示的に指定されます。同様に、キーワード引数ではなく`Hash`オブジェクトを明示的に渡したい場合は中かっこ(`{}`)を追加できます。詳しくは後述の「典型的なケース」をご覧ください。 From 416344e14125e0d3394aa7c45bdc70fc9bb9b734 Mon Sep 17 00:00:00 2001 From: jinroq <2787780+jinroq@users.noreply.github.com> Date: Sat, 27 Nov 2021 00:48:28 +0900 Subject: [PATCH 0479/1487] Revised the points pointed out in the review. --- ...ional-and-keyword-arguments-in-ruby-3-0.md | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md index b9aec21a12..38c2aea1c9 100644 --- a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md +++ b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -11,7 +11,9 @@ lang: ja ## 概要 -Ruby 3.0では、位置引数とキーワード引数が分離されます。Ruby 3.0で変更される振る舞いはRuby 2.7でwarningを表示します。以下のいずれかのwarningが表示される場合は、コードのアップデートが必要です。 +この文書では便宜上、必須引数、オプション引数、rest引数、後置引数(つまり、キーワード引数とブロック引数以外の引数)をまとめて「位置引数」と呼びます。 + +Ruby 3.0では、位置引数とキーワード引数が分離されます。Ruby 3.0で変更される振る舞いはRuby 2.7で警告を表示します。以下のいずれかの警告が表示される場合は、コードのアップデートが必要です。 * `Using the last argument as keyword parameters is deprecated` * `Passing the keyword argument as the last hash parameter is deprecated` @@ -100,13 +102,13 @@ foo(k: 1) #=> {:k=>1} ## Q: 自分のコードはRuby 2.7で動かなくなりますか? -手短かに言うと「壊れない可能性はあります」。 +A: たぶん動きます。 -Ruby 2.7におけるこの変更は、3.0への移行パスとして設計されています。あくまで原則としてですが、Ruby 2.7ではRuby 3.0で変更される振る舞いについてwarningを出すにとどめており、warningの中には私たちが微細とみなしている変更点も若干含まれます。詳しくは後述の「その他の微細な変更点」をご覧ください。 +Ruby 2.7では、原則として、Ruby 3.0で変更される振る舞いについて警告を出すにとどめています。しかし、私たちが軽微とみなした非互換も少しだけ入っています。詳しくは後述の「その他の軽微な変更点」をご覧ください。 -Ruby 2.7では、warningが表示される点と微細な変更点以外を除いてRuby 2.6との互換性を保とうとしています。つまり、あなたのコードはRuby 2.7でもおそらく動作しますが、warningが表示される可能性はあります。あなたのコードをRuby 2.7で実行すれば、Ruby 3.0の準備ができているかどうかをチェックできます。 +Ruby 2.7では、警告が表示される点と軽微な変更点以外を除いてRuby 2.6との互換性を保とうとしています。つまり、あなたのコードはRuby 2.7でもおそらく動作しますが、警告が表示される可能性はあります。あなたのコードをRuby 2.7で実行すれば、Ruby 3.0の準備ができているかどうかをチェックできます。 -非推奨のwarningを無効にしたい場合は、コマンドライン引数`-W:no-deprecated`を使うか、コードに`Warning[:deprecated] = false`を追加します。 +非推奨の警告を無効にしたい場合は、コマンドライン引数`-W:no-deprecated`を使うか、コードに`Warning[:deprecated] = false`を追加します。 ## 引数の委譲の扱いについて @@ -162,7 +164,7 @@ ruby2_keywords def foo(*args, &block) end {% endhighlight %} -残念ながら、Ruby 2.6以前では新しい委譲スタイルを正しく扱えないため、旧来の委譲スタイル(`**kwargs`を使わないなど)を使う必要があります。これは、キーワード引数を分離した理由のひとつでもあります(詳しくは本記事末尾をご覧ください)。`ruby2_keywords`を用いれば、Ruby 2.7や3.0でも旧来の委譲スタイルを引き続き利用できます。2.6以前のRubyでは`ruby2_keywords`が定義されていないので、[ruby2_keywords](https://rubygems.org/gems/ruby2_keywords) gemを使うか、以下を手動で定義します。 +残念ながら、Ruby 2.6以前では新しい委譲スタイルを正しく扱えないため、旧来の委譲スタイル(つまり、**kwargsを受け渡ししないスタイル)を使う必要があります。これは、キーワード引数を分離した理由のひとつでもあります(詳しくは本記事末尾をご覧ください)。`ruby2_keywords`を用いれば、Ruby 2.7や3.0でも旧来の委譲スタイルを引き続き利用できます。2.6以前のRubyでは`ruby2_keywords`が定義されていないので、[ruby2_keywords](https://rubygems.org/gems/ruby2_keywords) gemを使うか、以下を手動で定義します。 {% highlight ruby %} def ruby2_keywords(*) @@ -186,15 +188,15 @@ foo({}) #=> Ruby 2.7: [] ({}を含んでいない) foo({}, **{}) #=> Ruby 2.7: [{}] ({}を渡せば、キーワード引数が「ない」ことを明示できる) {% endhighlight %} -上のコードでは、空のHash引数が自動的に変換されて`**kwargs`に吸い込まれ、この空のキーワードハッシュは委譲の呼び出しで削除されます。このため、`targe`には引数がまったく渡されなくなります。私たちが把握している範囲では、これが唯一のエッジケースです。 +上のコードでは、空のHash引数が自動的に変換されて`**kwargs`に吸い込まれ、この空のキーワードハッシュは委譲の呼び出しで削除されます。このため、`target`には引数がまったく渡されなくなります。私たちが把握している範囲では、これが唯一のエッジケースです。 上のコードの最下部に書いたように、`**{}`を渡すことでこの問題を回避できます。 -移植性がどうしても不安な場合は`ruby2_keywords`をお使いください(Ruby 2.6以前ではキーワード引数周りで膨大なエッジケースが存在していることを知っておいてください)。`ruby2_keywords`は、今後Ruby 2.6が役目を終えたときに削除される可能性があります。現時点で私たちがおすすめできるのは、キーワード引数を明示的に委譲することです(上述のRuby 3向けのコードを参照)。 +移植性がどうしても不安な場合は`ruby2_keywords`をお使いください(Ruby 2.6以前ではキーワード引数周りで膨大なエッジケースが存在していることを知っておいてください)。`ruby2_keywords`は、今後Ruby 2.6がサポート切れになったあとで削除される可能性があります。そのときになったら、キーワード引数を明示的に委譲することをおすすめします(上述のRuby 3向けのコードを参照)。 -## その他の微細な変更点 +## その他の軽微な変更点 -Ruby 2.7のキーワード引数では、この他に以下の3つのマイナーチェンジが行われています。 +Ruby 2.7のキーワード引数では、この他に以下の3つの軽微な変更が行われています。 ### 1\. キーワード引数で非シンボルキーを利用できるようになった @@ -256,7 +258,7 @@ foo(**empty_hash) なお、`foo(**{})`はRuby 2.6以前とRuby 2.7のどちらの場合も引数を渡さず、`**{}`がパーサーによって削除される点にご注意ください。また、Ruby 2.7以降ではどちらも`**empty_hash`として同じに扱われるので、メソッドにキーワード引数を渡さないようにする指定が楽に行なえます。 -Ruby 2.7では、あるメソッド呼び出しで必須とされる位置引数の個数が不足している場合、Ruby 2.6との互換性を保つために`foo(**empty_hash)`は空のハッシュを渡してwarningを表示します。この振る舞いはRuby 3.0で廃止されます。 +Ruby 2.7では、あるメソッド呼び出しで必須とされる位置引数の個数が不足している場合、Ruby 2.6との互換性を保つために`foo(**empty_hash)`は空のハッシュを渡して警告を表示します。この振る舞いはRuby 3.0で廃止されます。 {% highlight ruby %} def foo(x) @@ -273,7 +275,7 @@ foo(**empty_hash) ### 3\. キーワード引数を受け取らないことを表す構文(`**nil`)が導入される -メソッド定義で`**nil`を用いることで、そのメソッドがキーワード引数を受け取らないことを明示的に示せるようになります。このメソッドを呼び出すときにキーワード引数を渡すと`ArgumentError`が表示されます(これは非互換性ではなく、事実上新機能です)。 +メソッド定義で`**nil`を用いることで、そのメソッドがキーワード引数を受け取らないことを明示的に示せるようになります。このメソッドを呼び出すときにキーワード引数を渡すと`ArgumentError`が表示されます(これは非互換性ではなく、新機能です)。 {% highlight ruby %} def foo(*args, **nil) @@ -283,7 +285,7 @@ foo(k: 1) #=> Ruby 2.7以降: no keywords accepted (ArgumentError) {% endhighlight %} -この新構文は、メソッドがキーワード引数を受け取らないことを明示的に指定するのに有用です。これを使わない場合、キーワード引数は上述の例の他の引数に吸い込まれます。メソッドを拡張してキーワード引数を受け取るようにする場合、以下のような非互換性が発生する可能性があります。 +この新構文は、メソッドがキーワード引数を受け取らないことを明示的に指定するのに有用です。これを使わない場合、キーワード引数は上述の例のrest引数に吸い込まれます。メソッドを拡張してキーワード引数を受け取るようにする場合、以下のような非互換性が発生する可能性があります。 {% highlight ruby %} # メソッドは残りの引数を受け取るが、`**nil`はない状態 @@ -307,7 +309,7 @@ foo(k: 1) #=> ArgumentError: unknown keyword k 当初、自動変換はうまいアイデアに思われていて、多くの場合問題なく機能していました。しかし、エッジケースがあまりにも多く、これまでこの振る舞いに関するバグレポートを山のように受け取りました。 -自動変換は、オプションの位置引数とキーワード引数をどちらも受け取るメソッドではうまく動きません。末尾のHashオブジェクトを位置引数として扱うことを期待する人々もいれば、末尾のHashオブジェクトをキーワード引数として扱うことを期待する人々もいました。 +自動変換は、オプション引数とキーワード引数をどちらも受け取るメソッドではうまく動きません。末尾のHashオブジェクトを位置引数として扱うことを期待する人々もいれば、末尾のHashオブジェクトをキーワード引数として扱うことを期待する人々もいました。 最も混乱を呼ぶケースのひとつを以下に示します。 @@ -345,7 +347,7 @@ foo() #=> Ruby 2.6以前: [{}] #=> Ruby 2.7以降: [] {% endhighlight %} -`foo()`には引数がありませんが、Ruby 2.6では空のハッシュ引数が`target`に渡されます。理由は、メソッド`foo`が明示的にキーワード(`**kwargs`)を委譲しているためです。`foo()`が呼び出されると、`args`は空のArrayになり、`kwargs`は空のHashになります。そして`target(*args, **kwargs, &block)`は空のHashを引数として1つ渡します。理由は、`**kwargs`が自動的にHash位置引数に変換されるためです。 +`foo()`には引数がありませんが、Ruby 2.6では空のハッシュ引数が`target`に渡されます。理由は、メソッド`foo`が明示的にキーワード(`**kwargs`)を委譲しているためです。`foo()`が呼び出されると、`args`は空のArrayになり、`kwargs`は空のHashになり、blockはnilになります。。そして`target(*args, **kwargs, &block)`は空のHashを引数として1つ渡します。理由は、`**kwargs`が自動的にHash位置引数に変換されるためです。 自動変換は開発者を混乱させるのみならず、メソッドの拡張性も弱めてしまいます。振る舞いが変更された理由や、特定の実装が選択された理由について詳しくは[Feature #14183](https://bugs.ruby-lang.org/issues/14183)をご覧ください。 @@ -355,4 +357,4 @@ foo() #=> Ruby 2.6以前: [{}] ## 更新履歴 -* 更新 2019-12-25: 2.7.0-rc2でwarningメッセージが若干変更され、warning抑制APIが追加された。 +* 更新 2019-12-25: 2.7.0-rc2で警告メッセージが若干変更され、警告抑制APIが追加された。 From 177e9c20ebd9f893fc9c1350840a507230d5d102 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Mon, 29 Nov 2021 09:43:56 +0900 Subject: [PATCH 0480/1487] Markup --- ...eparation-of-positional-and-keyword-arguments-in-ruby-3-0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md index 38c2aea1c9..7b981ae761 100644 --- a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md +++ b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -347,7 +347,7 @@ foo() #=> Ruby 2.6以前: [{}] #=> Ruby 2.7以降: [] {% endhighlight %} -`foo()`には引数がありませんが、Ruby 2.6では空のハッシュ引数が`target`に渡されます。理由は、メソッド`foo`が明示的にキーワード(`**kwargs`)を委譲しているためです。`foo()`が呼び出されると、`args`は空のArrayになり、`kwargs`は空のHashになり、blockはnilになります。。そして`target(*args, **kwargs, &block)`は空のHashを引数として1つ渡します。理由は、`**kwargs`が自動的にHash位置引数に変換されるためです。 +`foo()`には引数がありませんが、Ruby 2.6では空のハッシュ引数が`target`に渡されます。理由は、メソッド`foo`が明示的にキーワード(`**kwargs`)を委譲しているためです。`foo()`が呼び出されると、`args`は空のArrayになり、`kwargs`は空のHashになり、`block`は`nil`になります。そして`target(*args, **kwargs, &block)`は空のHashを引数として1つ渡します。理由は、`**kwargs`が自動的にHash位置引数に変換されるためです。 自動変換は開発者を混乱させるのみならず、メソッドの拡張性も弱めてしまいます。振る舞いが変更された理由や、特定の実装が選択された理由について詳しくは[Feature #14183](https://bugs.ruby-lang.org/issues/14183)をご覧ください。 From 2ddada69b79bbcce70fbf3e8888b7fe805dbf27a Mon Sep 17 00:00:00 2001 From: hachi8833 Date: Wed, 22 Jan 2020 12:35:17 +0900 Subject: [PATCH 0481/1487] Add en doc --- ...ional-and-keyword-arguments-in-ruby-3-0.md | 355 ++++++++++++++++++ 1 file changed, 355 insertions(+) create mode 100644 ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md diff --git a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md new file mode 100644 index 0000000000..44cd874cc1 --- /dev/null +++ b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -0,0 +1,355 @@ +--- +layout: news_post +title: "Separation of positional and keyword arguments in Ruby 3.0" +author: "mame" +translator: +date: 2019-12-12 12:00:00 +0000 +lang: en +--- + +This article explains the planned incompatibility of keyword arguments in Ruby 3.0 + +## tl;dr + +In Ruby 3.0, positional arguments and keyword arguments will be separated. Ruby 2.7 will warn for behaviors that will change in Ruby 3.0. If you see the following warnings, you need to update your code: + +* `Using the last argument as keyword parameters is deprecated`, or +* `Passing the keyword argument as the last hash parameter is deprecated`, or +* `Splitting the last argument into positional and keyword parameters is deprecated` + +In most cases, you can avoid the incompatibility by adding the _double splat_ operator. It explicitly specifies passing keyword arguments instead of a `Hash` object. Likewise, you may add braces `{}` to explicitly pass a `Hash` object, instead of keyword arguments. Read the section "Typical cases" below for more details. + +In Ruby 3, a method delegating all arguments must explicitly delegate keyword arguments in addition to positional arguments. If you want to keep the delegation behavior found in Ruby 2.7 and earlier, use `ruby2_keywords`. See the "Handling argument delegation" section below for more details. + +## Typical cases + +Here is the most typical case. You can use double splat operator (`**`) to pass keywords instead of a Hash. + +{% highlight ruby %} +# This method accepts only a keyword argument +def foo(k: 1) + p k +end + +h = { k: 42 } + +# This method call passes a positional Hash argument +# In Ruby 2.7: The Hash is automatically converted to a keyword argument +# In Ruby 3.0: This call raises an ArgumentError +foo(h) + # => demo.rb:11: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call + # demo.rb:2: warning: The called method `foo' is defined here + # 42 + +# If you want to keep the behavior in Ruby 3.0, use double splat +foo(**h) #=> 42 +{% endhighlight %} + +Here is another case. You can use braces (`{}`) to pass a Hash instead of keywords explicitly. + +{% highlight ruby %} +# This method accepts one positional argument and a keyword rest argument +def bar(h, **kwargs) + p h +end + +# This call passes only a keyword argument and no positional arguments +# In Ruby 2.7: The keyword is converted to a positional Hash argument +# In Ruby 3.0: This call raises an ArgumentError +bar(k: 42) + # => demo2.rb:9: warning: Passing the keyword argument as the last hash parameter is deprecated + # demo2.rb:2: warning: The called method `bar' is defined here + # {:k=>42} + +# If you want to keep the behavior in Ruby 3.0, write braces to make it an +# explicit Hash +bar({ k: 42 }) # => {:k=>42} +{% endhighlight %} + +## What is deprecated? + +In Ruby 2, keyword arguments can be treated as the last positional Hash argument and a last positional Hash argument can be treated as keyword arguments. + +Because the automatic conversion is sometimes too complex and troublesome as described in the final section. So it's now deprecated in Ruby 2.7 and will be removed in Ruby 3. In other words, keyword arguments will be completely separated from positional one in Ruby 3. So when you want to pass keyword arguments, you should always use `foo(k: expr)` or `foo(**expr)`. If you want to accept keyword arguments, in principle you should always use `def foo(k: default)` or `def foo(k:)` or `def foo(**kwargs)`. + +Note that Ruby 3.0 doesn't behave differently when calling a method which doesn't accept keyword arguments with keyword arguments. For instance, the following case is not going to be deprecated and will keep working in Ruby 3.0. The keyword arguments are still treated as a positional Hash argument. + +{% highlight ruby %} +def foo(kwargs = {}) + kwargs +end + +foo(k: 1) #=> {:k=>1} +{% endhighlight %} + +This is because this style is used very frequently, and there is no ambiguity in how the argument should be treated. Prohibiting this conversion would result in additional incompatibility for little benefit. + +However, this style is not recommended in new code, unless you are often passing a Hash as a positional argument, and are also using keyword arguments. Otherwise, use double splat: + +{% highlight ruby %} +def foo(**kwargs) + kwargs +end + +foo(k: 1) #=> {:k=>1} +{% endhighlight %} + +## Will my code break on Ruby 2.7? + +A short answer is "maybe not". + +The changes in Ruby 2.7 are designed as a migration path towards 3.0. While in principle, Ruby 2.7 only warns against behaviors that will change in Ruby 3, it includes some incompatible changes we consider to be minor. See the "Other minor changes" section for details. + +Except for the warnings and minor changes, Ruby 2.7 attempts to keep the compatibility with Ruby 2.6. So, your code will probably work on Ruby 2.7, though it may emit warnings. And by running it on Ruby 2.7, you can check if your code is ready for Ruby 3.0. + +If you want to disable the deprecation warnings, please use a command-line argument `-W:no-deprecated` or add `Warning[:deprecated] = false` to your code. + +## Handling argument delegation + +### Ruby 2.6 or prior + +In Ruby 2, you can write a delegation method by accepting a `*rest` argument and a `&block` argument, and passing the two to the target method. In this behavior, the keyword arguments are also implicitly handled by the automatic conversion between positional and keyword arguments. + +{% highlight ruby %} +def foo(*args, &block) + target(*args, &block) +end +{% endhighlight %} + +### Ruby 3 + +You need to explicitly delegate keyword arguments. + +{% highlight ruby %} +def foo(*args, **kwargs, &block) + target(*args, **kwargs, &block) +end +{% endhighlight %} + +Alternatively, if you do not need compatibility with Ruby 2.6 or prior and you don't alter any arguments, you can use the new delegation syntax (`...`) that is introduced in Ruby 2.7. + +{% highlight ruby %} +def foo(...) + target(...) +end +{% endhighlight %} + +### Ruby 2.7 + +In short: use `Module#ruby2_keywords` and delegate `*args, &block`. + +{% highlight ruby %} +ruby2_keywords def foo(*args, &block) + target(*args, &block) +end +{% endhighlight %} + +`ruby2_keywords` accepts keyword arguments as the last Hash argument, and passes it as keyword arguments when calling the other method. + +In fact, Ruby 2.7 allows the new style of delegation in many cases. However, there is a known corner case. See the next section. + +### A compatible delegation that works on Ruby 2.6, 2.7 and Ruby 3 + +In short: use `Module#ruby2_keywords` again. + +{% highlight ruby %} +ruby2_keywords def foo(*args, &block) + target(*args, &block) +end +{% endhighlight %} + +Unfortunately, we need to use the old-style delegation (i.e., no `**kwargs`) because Ruby 2.6 or prior does not handle the new delegation style correctly. This is one of the reasons of the keyword argument separation; the details are described in the final section. And `ruby2_keywords` allows you to run the old style even in Ruby 2.7 and 3.0. As there is no `ruby2_keywords` defined in 2.6 or prior, please use the [ruby2_keywords gem](https://rubygems.org/gems/ruby2_keywords) or define it yourself: + +{% highlight ruby %} +def ruby2_keywords(*) +end if RUBY_VERSION < "2.7" +{% endhighlight %} + +--- + +If your code doesn't have to run on Ruby 2.6 or older, you may try the new style in Ruby 2.7. In almost all cases, it works. Note that, however, there are unfortunate corner cases as follows: + +{% highlight ruby %} +def target(*args) + p args +end + +def foo(*args, **kwargs, &block) + target(*args, **kwargs, &block) +end + +foo({}) #=> Ruby 2.7: [] ({} is dropped) +foo({}, **{}) #=> Ruby 2.7: [{}] (You can pass {} by explicitly passing "no" keywords) +{% endhighlight %} + +An empty Hash argument is automatically converted and absorbed into `**kwargs`, and the delegation call removes the empty keyword hash, so no argument is passed to `target`. As far as we know, this is the only corner case. + +As noted in the last line, you can work around this issue by using `**{}`. + +If you really worry about the portability, use `ruby2_keywords`. (Acknowledge that Ruby 2.6 or before themselves have tons of corner cases in keyword arguments. :-) +`ruby2_keywords` might be removed in the future after Ruby 2.6 reaches end-of-life. At that point, we recommend to explicitly delegate keyword arguments (see Ruby 3 code above). + +## Other minor changes + +There are three minor changes about keyword arguments in Ruby 2.7. + +### 1. Non-Symbol keys are allowed in keyword arguments + +In Ruby 2.6 or before, only Symbol keys were allowed in keyword arguments. In Ruby 2.7, keyword arguments can use non-Symbol keys. + +{% highlight ruby %} +def foo(**kwargs) + kwargs +end +foo("key" => 42) + #=> Ruby 2.6 or before: ArgumentError: wrong number of arguments + #=> Ruby 2.7 or later: {"key"=>42} +{% endhighlight %} + +If a method accepts both optional and keyword arguments, the Hash object that has both Symbol keys and non-Symbol keys was split in two in Ruby 2.6. In Ruby 2.7, both are accepted as keywords because non-Symbol keys are allowed. + +{% highlight ruby %} +def bar(x=1, **kwargs) + p [x, kwargs] +end + +bar("key" => 42, :sym => 43) + #=> Ruby 2.6: [{"key"=>42}, {:sym=>43}] + #=> Ruby 2.7: [1, {"key"=>42, :sym=>43}] + +# Use braces to keep the behavior +bar({"key" => 42}, :sym => 43) + #=> Ruby 2.6 and 2.7: [{"key"=>42}, {:sym=>43}] +{% endhighlight %} + +Ruby 2.7 still splits hashes with a warning if passing a Hash or keyword arguments with both Symbol and non-Symbol keys to a method that accepts explicit keywords but no keyword rest argument (`**kwargs`). This behavior will be removed in Ruby 3, and an `ArgumentError` will be raised. + +{% highlight ruby %} +def bar(x=1, sym: nil) + p [x, sym] +end + +bar("key" => 42, :sym => 43) +# Ruby 2.6 and 2.7: => [{"key"=>42}, 43] +# Ruby 2.7: warning: Splitting the last argument into positional and keyword parameters is deprecated +# warning: The called method `bar' is defined here +# Ruby 3.0: ArgumentError +{% endhighlight %} + +### 2. Double splat with an empty hash (`**{}`) passes no arguments + +In Ruby 2.6 or before, passing `**empty_hash` passes an empty Hash as a positional argument. In Ruby 2.7 or later, it passes no arguments. + +{% highlight ruby %} +def foo(*args) + args +end + +empty_hash = {} +foo(**empty_hash) + #=> Ruby 2.6 or before: [{}] + #=> Ruby 2.7 or later: [] +{% endhighlight %} + +Note that `foo(**{})` passes nothing in both Ruby 2.6 and 2.7. In Ruby 2.6 and before, `**{}` is removed by the parser, and in Ruby 2.7 and above, it is treated the same as `**empty_hash`, allowing for an easy way to pass no keyword arguments to a method. + +In Ruby 2.7, when calling a method with an insufficient number of required positional arguments, `foo(**empty_hash)` passes an empty hash with a warning emitted, for compatibility with Ruby 2.6. This behavior will be removed in 3.0. + +{% highlight ruby %} +def foo(x) + x +end + +empty_hash = {} +foo(**empty_hash) + #=> Ruby 2.6 or before: {} + #=> Ruby 2.7: warning: Passing the keyword argument as the last hash parameter is deprecated + # warning: The called method `foo' is defined here + #=> Ruby 3.0: ArgumentError: wrong number of arguments +{% endhighlight %} + +### 3. The no-keyword-arguments syntax (`**nil`) is introduced + +You can use `**nil` in a method definition to explicitly mark the method accepts no keyword arguments. Calling such methods with keyword arguments will result in an `ArgumentError`. (This is actually a new feature, not an incompatibility) + +{% highlight ruby %} +def foo(*args, **nil) +end + +foo(k: 1) + #=> Ruby 2.7 or later: no keywords accepted (ArgumentError) +{% endhighlight %} + +This is useful to make it explicit that the method does not accept keyword arguments. Otherwise, the keywords are absorbed in the rest argument in the above example. If you extend a method to accept keyword arguments, the method may have incompatibility as follows: + +{% highlight ruby %} +# If a method accepts rest argument and no `**nil` +def foo(*args) + p args +end + +# Passing keywords are converted to a Hash object (even in Ruby 3.0) +foo(k: 1) #=> [{:k=>1}] + +# If the method is extended to accept a keyword +def foo(*args, mode: false) + p args +end + +# The existing call may break +foo(k: 1) #=> ArgumentError: unknown keyword k +{% endhighlight %} + +## Why we're deprecating the automatic conversion + +The automatic conversion initially appeared to be a good idea, and worked well in many cases. However, it had too many corner cases, and we have received many bug reports about the behavior. + +Automatic conversion does not work well when a method accepts optional positional arguments and keyword arguments. Some people expect the last Hash object to be treated as a positional argument, and others expect it to be converted to keyword arguments. + +Here is one of the most confusing cases: + +{% highlight ruby %} +def foo(x, **kwargs) + p [x, kwargs] +end + +def bar(x=1, **kwargs) + p [x, kwargs] +end + +foo({}) => [{}, {}] +bar({}) => [1, {}] + +bar({}, **{}) => expected: [{}, {}], actual: [1, {}] +{% endhighlight %} + +In Ruby 2, `foo({})` passes an empty hash as a normal argument (i.e., `{}` is assigned to `x`), while `bar({})` passes a keyword argument (i.e, `{}` is assigned to `kwargs`). So `any_method({})` is very ambiguous. + +You may think of `bar({}, **{})` to pass the empty hash to `x` explicitly. Surprisingly, it does not work as you expected; it still prints `[1, {}]` in Ruby 2.6. This is because `**{}` is ignored by the parser in Ruby 2.6, and the first argument `{}` is automatically converted to keywords (`**kwargs`). In this case, you need to call `bar({}, {})`, which is very weird. + +The same issues also apply to methods that accept rest and keyword arguments. This makes explicit delegation of keyword arguments not work. + +{% highlight ruby %} +def target(*args) + p args +end + +def foo(*args, **kwargs, &block) + target(*args, **kwargs, &block) +end + +foo() #=> Ruby 2.6 or before: [{}] + #=> Ruby 2.7 or later: [] +{% endhighlight %} + +`foo()` passes no arguments, but `target` receives an empty hash argument in Ruby 2.6. This is because the method `foo` delegates keywords (`**kwargs`) explicitly. When `foo()` is called, `args` is an empty Array, `kwargs` is an empty Hash, and `block` is `nil`. And then `target(*args, **kwargs, &block)` passes an empty Hash as an argument because `**kwargs` is automatically converted to a positional Hash argument. + +The automatic conversion not only confuses people but also makes the method less extensible. See [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) for more details about the reasons for the change in behavior, and why certain implementation choices were made. + +## Acknowledgment + +This article was kindly reviewed (or even co-authored) by Jeremy Evans and Benoit Daloze. + +## History + +* Updated 2019-12-25: In 2.7.0-rc2, the warning message was slightly changed, and an API to suppress the warnings was added. From b98d7083356c9cf8ecab750872108243561e38cb Mon Sep 17 00:00:00 2001 From: hachi8833 Date: Wed, 22 Jan 2020 12:35:47 +0900 Subject: [PATCH 0482/1487] Translate "Separation of positional and keyword arguments in Ruby 3.0" --- ...ional-and-keyword-arguments-in-ruby-3-0.md | 195 +++++++++--------- 1 file changed, 99 insertions(+), 96 deletions(-) diff --git a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md index 44cd874cc1..5e80e231d5 100644 --- a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md +++ b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -2,77 +2,81 @@ layout: news_post title: "Separation of positional and keyword arguments in Ruby 3.0" author: "mame" -translator: +translator: "hachi8833" date: 2019-12-12 12:00:00 +0000 -lang: en +lang: ja --- -This article explains the planned incompatibility of keyword arguments in Ruby 3.0 +本記事では、Ruby 3.0で予定されているキーワード引数の非互換性について解説します。 -## tl;dr +## 概要 -In Ruby 3.0, positional arguments and keyword arguments will be separated. Ruby 2.7 will warn for behaviors that will change in Ruby 3.0. If you see the following warnings, you need to update your code: +Ruby 3.0では、位置引数とキーワード引数が分離されます。Ruby 3.0で変更される振る舞いはRuby 2.7でwarningを表示します。以下のいずれかのwarningが表示される場合は、コードのアップデートが必要です。 * `Using the last argument as keyword parameters is deprecated`, or * `Passing the keyword argument as the last hash parameter is deprecated`, or * `Splitting the last argument into positional and keyword parameters is deprecated` -In most cases, you can avoid the incompatibility by adding the _double splat_ operator. It explicitly specifies passing keyword arguments instead of a `Hash` object. Likewise, you may add braces `{}` to explicitly pass a `Hash` object, instead of keyword arguments. Read the section "Typical cases" below for more details. +この非互換性は、double splat演算子(`**`)を追加することでほぼ回避できます。これにより、`Hash`オブジェクトではなくキーワード引数を渡すことが明示的に指定されます。同様に、キーワード引数ではなく`Hash`オブジェクトを明示的に渡したい場合は中かっこ(`{}`)を追加できます。詳しくは後述の「典型的なケース」をご覧ください。 -In Ruby 3, a method delegating all arguments must explicitly delegate keyword arguments in addition to positional arguments. If you want to keep the delegation behavior found in Ruby 2.7 and earlier, use `ruby2_keywords`. See the "Handling argument delegation" section below for more details. +Ruby 3では、すべての引数を委譲するメソッドで、位置引数の他に必ずキーワード引数も明示的に委譲しなければなりません。Ruby 2.7以前の委譲の振る舞いを変えたくない場合は、`ruby2_keywords`をお使いください。詳しくは後述の「引数の委譲の扱いについて」をご覧ください。 -## Typical cases +## よくあるケース -Here is the most typical case. You can use double splat operator (`**`) to pass keywords instead of a Hash. +以下はもっともよくあるケースです。Hashではなくキーワードを渡すのにdouble splat演算子(`**`)を使えます。 {% highlight ruby %} -# This method accepts only a keyword argument +# このメソッドはキーワード引数のみを受け取る def foo(k: 1) p k end h = { k: 42 } -# This method call passes a positional Hash argument -# In Ruby 2.7: The Hash is automatically converted to a keyword argument -# In Ruby 3.0: This call raises an ArgumentError +# このメソッド呼び出しは位置引数としてHashを渡している +# Ruby 2.7: このHashは自動でキーワード引数に変換される +# Ruby 3.0: この呼び出しはArgumentErrorになる foo(h) # => demo.rb:11: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call # demo.rb:2: warning: The called method `foo' is defined here # 42 -# If you want to keep the behavior in Ruby 3.0, use double splat +# この振る舞いをRuby 3.0で変えたくない場合はdouble splatを用いる foo(**h) #=> 42 {% endhighlight %} -Here is another case. You can use braces (`{}`) to pass a Hash instead of keywords explicitly. +別の例: キーワード引数ではなくHashを明示的に渡す場合は中かっこ(`{}`)を使います。 {% highlight ruby %} -# This method accepts one positional argument and a keyword rest argument +# このメソッドは位置引数を1個、残りはキーワード引数を受け取る def bar(h, **kwargs) p h end -# This call passes only a keyword argument and no positional arguments -# In Ruby 2.7: The keyword is converted to a positional Hash argument -# In Ruby 3.0: This call raises an ArgumentError +# この呼び出しではキーワード引数のみが渡され、位置引数は渡されない +# Ruby 2.7: このキーワード引数は自動でHash引数に変換される +# Ruby 3.0: この呼び出しはArgumentErrorになる bar(k: 42) # => demo2.rb:9: warning: Passing the keyword argument as the last hash parameter is deprecated # demo2.rb:2: warning: The called method `bar' is defined here # {:k=>42} -# If you want to keep the behavior in Ruby 3.0, write braces to make it an -# explicit Hash +# この振る舞いをRuby 3.0で変えたくない場合は +# 中かっこで明示的にHashにする bar({ k: 42 }) # => {:k=>42} {% endhighlight %} -## What is deprecated? +## どの動作が非推奨になるか -In Ruby 2, keyword arguments can be treated as the last positional Hash argument and a last positional Hash argument can be treated as keyword arguments. +Ruby 2では、キーワード引数が末尾のハッシュ位置引数として扱われることがあります。また、末尾のハッシュ引数がキーワード引数として扱われることもあります。 -Because the automatic conversion is sometimes too complex and troublesome as described in the final section. So it's now deprecated in Ruby 2.7 and will be removed in Ruby 3. In other words, keyword arguments will be completely separated from positional one in Ruby 3. So when you want to pass keyword arguments, you should always use `foo(k: expr)` or `foo(**expr)`. If you want to accept keyword arguments, in principle you should always use `def foo(k: default)` or `def foo(k:)` or `def foo(**kwargs)`. +この自動変換は場合によっては複雑になりすぎてしまい、本記事末尾で後述するようにトラブルの原因になることがあります。そのため、この自動変換をRuby 2.7で非推奨とし、Ruby 3.0で廃止する予定です。言い換えると、Ruby 3.0のキーワード引数は位置引数と完全に分離されることになります。つまり、キーワード引数を渡したい場合は、常に`foo(k: expr)`または`foo(**expr)`の形にすべきです。(メソッド定義で)キーワード引数を受け取りたい場合は、原則として常に以下のいずれかの形にすべきです。 -Note that Ruby 3.0 doesn't behave differently when calling a method which doesn't accept keyword arguments with keyword arguments. For instance, the following case is not going to be deprecated and will keep working in Ruby 3.0. The keyword arguments are still treated as a positional Hash argument. +* `def foo(k: default)` +* `def foo(k:)` +* `def foo(**kwargs)` + +なお、キーワード引数を受け取らないメソッドを呼び出すときにキーワード引数を渡した場合の振る舞いは、Ruby 3.0でも変わらない点にご注意ください。たとえば、以下のケースは非推奨にはならず、Ruby 3.0でも引き続き動作します(このキーワード引数は引き続きHash位置引数として扱われます)。 {% highlight ruby %} def foo(kwargs = {}) @@ -82,9 +86,9 @@ end foo(k: 1) #=> {:k=>1} {% endhighlight %} -This is because this style is used very frequently, and there is no ambiguity in how the argument should be treated. Prohibiting this conversion would result in additional incompatibility for little benefit. +変わらない理由は、このスタイルが非常によく用いられていることと、この呼び出し方法では引数の扱いに曖昧な点がないためです。この振る舞いまで禁止してしまうと、得られるメリットが少ないうえに非互換性がさらに増えてしまいます。 -However, this style is not recommended in new code, unless you are often passing a Hash as a positional argument, and are also using keyword arguments. Otherwise, use double splat: +ただし今後新しいコードを書く場合、このスタイルはおすすめできません(Hashを位置引数として渡す頻度が高く、かつキーワード引数も使う場合を除く)。代わりに、次のようにdouble splat(`**`)をお使いください。 {% highlight ruby %} def foo(**kwargs) @@ -94,21 +98,21 @@ end foo(k: 1) #=> {:k=>1} {% endhighlight %} -## Will my code break on Ruby 2.7? +## Q: 自分のコードはRuby 2.7で動かなくなりますか? -A short answer is "maybe not". +手短かに言うと「壊れない可能性はあります」。 -The changes in Ruby 2.7 are designed as a migration path towards 3.0. While in principle, Ruby 2.7 only warns against behaviors that will change in Ruby 3, it includes some incompatible changes we consider to be minor. See the "Other minor changes" section for details. +Ruby 2.7におけるこの変更は、3.0への移行パスとして設計されています。あくまで原則としてですが、Ruby 2.7ではRuby 3.0で変更される振る舞いについてwarningを出すにとどめており、warningの中には私たちが微細とみなしている変更点も若干含まれます。詳しくは後述の「その他の微細な変更点」をご覧ください。 -Except for the warnings and minor changes, Ruby 2.7 attempts to keep the compatibility with Ruby 2.6. So, your code will probably work on Ruby 2.7, though it may emit warnings. And by running it on Ruby 2.7, you can check if your code is ready for Ruby 3.0. +Ruby 2.7では、warningが表示される点と微細な変更点以外を除いてRuby 2.6との互換性を保とうとしています。つまり、あなたのコードはRuby 2.7でもおそらく動作しますが、warningが表示される可能性はあります。あなたのコードをRuby 2.7で実行すれば、Ruby 3.0の準備ができているかどうかをチェックできます。 -If you want to disable the deprecation warnings, please use a command-line argument `-W:no-deprecated` or add `Warning[:deprecated] = false` to your code. +非推奨のwarningを無効にしたい場合は、コマンドライン引数`-W:no-deprecated`を使うか、コードに`Warning[:deprecated] = false`を追加します。 -## Handling argument delegation +## 引数の委譲の扱いについて -### Ruby 2.6 or prior +### Ruby 2.6以前の場合 -In Ruby 2, you can write a delegation method by accepting a `*rest` argument and a `&block` argument, and passing the two to the target method. In this behavior, the keyword arguments are also implicitly handled by the automatic conversion between positional and keyword arguments. +Ruby 2では、以下のように1個の`*rest`引数と1個の`&block`引数を受け付けて、この2つの引数を委譲先メソッド(以下の`target`)に渡すことで委譲メソッドを書けます。この振る舞いでは、(1つ以上の)キーワード引数も「位置引数<=>キーワード引数の自動変換」によって暗黙的に扱われます。 {% highlight ruby %} def foo(*args, &block) @@ -116,9 +120,9 @@ def foo(*args, &block) end {% endhighlight %} -### Ruby 3 +### Ruby 3の場合 -You need to explicitly delegate keyword arguments. +以下のようにキーワード引数を明示的に委譲する必要があります。 {% highlight ruby %} def foo(*args, **kwargs, &block) @@ -126,7 +130,7 @@ def foo(*args, **kwargs, &block) end {% endhighlight %} -Alternatively, if you do not need compatibility with Ruby 2.6 or prior and you don't alter any arguments, you can use the new delegation syntax (`...`) that is introduced in Ruby 2.7. +別の方法として、Ruby 2.6以前との互換性を考慮する必要がなく、かつ引数を一切改変しないのであれば、以下のようにRuby 2.7で新しく導入される委譲構文(`...`)を利用できます。 {% highlight ruby %} def foo(...) @@ -134,9 +138,9 @@ def foo(...) end {% endhighlight %} -### Ruby 2.7 +### Ruby 2.7の場合 -In short: use `Module#ruby2_keywords` and delegate `*args, &block`. +手短かに言うと、以下のように`Module#ruby2_keywords`を用い、`*args, &block`を委譲します。 {% highlight ruby %} ruby2_keywords def foo(*args, &block) @@ -144,13 +148,13 @@ ruby2_keywords def foo(*args, &block) end {% endhighlight %} -`ruby2_keywords` accepts keyword arguments as the last Hash argument, and passes it as keyword arguments when calling the other method. +`ruby2_keywords`を指定すると、キーワード引数を末尾のHash引数として受け取れるようになり、他のメソッドを呼び出すときにそれをキーワード引数として渡せます。 -In fact, Ruby 2.7 allows the new style of delegation in many cases. However, there is a known corner case. See the next section. +実際、Ruby 2.7では多くの場面でこの新しい委譲のスタイルを利用できます。ただし1つ既知のエッジケースがあります。次をご覧ください。 -### A compatible delegation that works on Ruby 2.6, 2.7 and Ruby 3 +### Ruby 2.6 / 2.7 / 3で互換性のある委譲スタイル -In short: use `Module#ruby2_keywords` again. +手短かに言うと、ここも「`Module#ruby2_keywords`を使う」となります。 {% highlight ruby %} ruby2_keywords def foo(*args, &block) @@ -158,16 +162,16 @@ ruby2_keywords def foo(*args, &block) end {% endhighlight %} -Unfortunately, we need to use the old-style delegation (i.e., no `**kwargs`) because Ruby 2.6 or prior does not handle the new delegation style correctly. This is one of the reasons of the keyword argument separation; the details are described in the final section. And `ruby2_keywords` allows you to run the old style even in Ruby 2.7 and 3.0. As there is no `ruby2_keywords` defined in 2.6 or prior, please use the [ruby2_keywords gem](https://rubygems.org/gems/ruby2_keywords) or define it yourself: +残念ながら、Ruby 2.6以前では新しい委譲スタイルを正しく扱えないため、旧来の委譲スタイル(`**kwargs`を使わないなど)を使う必要があります。これは、キーワード引数を分離した理由のひとつでもあります(詳しくは本記事末尾をご覧ください)。`ruby2_keywords`を用いれば、Ruby 2.7や3.0でも旧来の委譲スタイルを引き続き利用できます。2.6以前のRubyでは`ruby2_keywords`が定義されていないので、[ruby2_keywords](https://rubygems.org/gems/ruby2_keywords) gemを使うか、以下を手動で定義します。 {% highlight ruby %} def ruby2_keywords(*) end if RUBY_VERSION < "2.7" {% endhighlight %} ---- +* * * * * -If your code doesn't have to run on Ruby 2.6 or older, you may try the new style in Ruby 2.7. In almost all cases, it works. Note that, however, there are unfortunate corner cases as follows: +自分のコードがRuby 2.6以前で動かなくても構わないのであれば、Ruby 2.7で新しいスタイルを試してもよいでしょう。ほぼほぼ間違いなく動作しますが、以下のようなエッジケースを運悪く踏むこともあります。 {% highlight ruby %} def target(*args) @@ -178,35 +182,34 @@ def foo(*args, **kwargs, &block) target(*args, **kwargs, &block) end -foo({}) #=> Ruby 2.7: [] ({} is dropped) -foo({}, **{}) #=> Ruby 2.7: [{}] (You can pass {} by explicitly passing "no" keywords) +foo({}) #=> Ruby 2.7: [] ({}を含んでいない) +foo({}, **{}) #=> Ruby 2.7: [{}] ({}を渡せば、キーワード引数が「ない」ことを明示できる) {% endhighlight %} -An empty Hash argument is automatically converted and absorbed into `**kwargs`, and the delegation call removes the empty keyword hash, so no argument is passed to `target`. As far as we know, this is the only corner case. +上のコードでは、空のHash引数が自動的に変換されて`**kwargs`に吸い込まれ、この空のキーワードハッシュは委譲の呼び出しで削除されます。このため、`targe`には引数がまったく渡されなくなります。私たちが把握している範囲では、これが唯一のエッジケースです。 -As noted in the last line, you can work around this issue by using `**{}`. +上のコードの最下部に書いたように、`**{}`を渡すことでこの問題を回避できます。 -If you really worry about the portability, use `ruby2_keywords`. (Acknowledge that Ruby 2.6 or before themselves have tons of corner cases in keyword arguments. :-) -`ruby2_keywords` might be removed in the future after Ruby 2.6 reaches end-of-life. At that point, we recommend to explicitly delegate keyword arguments (see Ruby 3 code above). +移植性がどうしても不安な場合は`ruby2_keywords`をお使いください(Ruby 2.6以前ではキーワード引数周りで膨大なエッジケースが存在していることを知っておいてください)。`ruby2_keywords`は、今後Ruby 2.6が役目を終えたときに削除される可能性があります。現時点で私たちがおすすめできるのは、キーワード引数を明示的に委譲することです(上述のRuby 3向けのコードを参照)。 -## Other minor changes +## その他の微細な変更点 -There are three minor changes about keyword arguments in Ruby 2.7. +Ruby 2.7のキーワード引数では、この他に以下の3つのマイナーチェンジが行われています。 -### 1. Non-Symbol keys are allowed in keyword arguments +### 1\. キーワード引数で非シンボルキーを利用できるようになった -In Ruby 2.6 or before, only Symbol keys were allowed in keyword arguments. In Ruby 2.7, keyword arguments can use non-Symbol keys. +Ruby 2.6以前のキーワード引数では、シンボル形式のキーしか利用できませんでした。Ruby 2.7のキーワード引数では、以下のようにシンボル形式でないキーを利用できるようになります。 {% highlight ruby %} def foo(**kwargs) kwargs end foo("key" => 42) - #=> Ruby 2.6 or before: ArgumentError: wrong number of arguments - #=> Ruby 2.7 or later: {"key"=>42} + #=> Ruby 2.6以前: ArgumentError: wrong number of arguments + #=> Ruby 2.7以降: {"key"=>42} {% endhighlight %} -If a method accepts both optional and keyword arguments, the Hash object that has both Symbol keys and non-Symbol keys was split in two in Ruby 2.6. In Ruby 2.7, both are accepted as keywords because non-Symbol keys are allowed. +あるメソッドがオプション引数とキーワード引数を両方とも受け付ける場合、Ruby 2.6では以下のようにシンボル形式のキーと非シンボルキーを両方持つHashオブジェクトが2つに分割されていました。Ruby 2.7では非シンボルキーを利用できるので、どちらも受け取れます。 {% highlight ruby %} def bar(x=1, **kwargs) @@ -217,12 +220,12 @@ bar("key" => 42, :sym => 43) #=> Ruby 2.6: [{"key"=>42}, {:sym=>43}] #=> Ruby 2.7: [1, {"key"=>42, :sym=>43}] -# Use braces to keep the behavior +# 振る舞いを変えたくない場合は中かっこ{}を使う bar({"key" => 42}, :sym => 43) #=> Ruby 2.6 and 2.7: [{"key"=>42}, {:sym=>43}] {% endhighlight %} -Ruby 2.7 still splits hashes with a warning if passing a Hash or keyword arguments with both Symbol and non-Symbol keys to a method that accepts explicit keywords but no keyword rest argument (`**kwargs`). This behavior will be removed in Ruby 3, and an `ArgumentError` will be raised. +Ruby 2.7では、キーワード引数を明示的に受け付けるがキーワードrest引数(`**kwargs`)を受け取らないメソッドに対して、シンボル形式のキーと非シンボルキーが両方混じったHashやキーワード引数を渡すと、引き続きハッシュを分割して警告を表示します。この振る舞いはRuby 3で廃止されて`ArgumentError`にする予定です。 {% highlight ruby %} def bar(x=1, sym: nil) @@ -230,15 +233,15 @@ def bar(x=1, sym: nil) end bar("key" => 42, :sym => 43) -# Ruby 2.6 and 2.7: => [{"key"=>42}, 43] +# Ruby 2.6と2.7: => [{"key"=>42}, 43] # Ruby 2.7: warning: Splitting the last argument into positional and keyword parameters is deprecated # warning: The called method `bar' is defined here # Ruby 3.0: ArgumentError {% endhighlight %} -### 2. Double splat with an empty hash (`**{}`) passes no arguments +### 2\. double splatを付けた空ハッシュ(`**{}`)で引数を渡さないようになった -In Ruby 2.6 or before, passing `**empty_hash` passes an empty Hash as a positional argument. In Ruby 2.7 or later, it passes no arguments. +Ruby 2.6以前は、`**empty_hash`を渡すと位置引数に空のハッシュが渡されました(`[{}]`)。Ruby 2.7以降では引数を渡さなくなります。 {% highlight ruby %} def foo(*args) @@ -247,13 +250,13 @@ end empty_hash = {} foo(**empty_hash) - #=> Ruby 2.6 or before: [{}] - #=> Ruby 2.7 or later: [] + #=> Ruby 2.6以前: [{}] + #=> Ruby 2.7以降: [] {% endhighlight %} -Note that `foo(**{})` passes nothing in both Ruby 2.6 and 2.7. In Ruby 2.6 and before, `**{}` is removed by the parser, and in Ruby 2.7 and above, it is treated the same as `**empty_hash`, allowing for an easy way to pass no keyword arguments to a method. +なお、`foo(**{})`はRuby 2.6以前とRuby 2.7のどちらの場合も引数を渡さず、`**{}`がパーサーによって削除される点にご注意ください。また、Ruby 2.7以降ではどちらも`**empty_hash`として同じに扱われるので、メソッドにキーワード引数を渡さないようにする指定が楽に行なえます。 -In Ruby 2.7, when calling a method with an insufficient number of required positional arguments, `foo(**empty_hash)` passes an empty hash with a warning emitted, for compatibility with Ruby 2.6. This behavior will be removed in 3.0. +Ruby 2.7では、あるメソッド呼び出しで必須とされる位置引数の個数が不足している場合、Ruby 2.6との互換性を保つために`foo(**empty_hash)`は空のハッシュを渡してwarningを表示します。この振る舞いはRuby 3.0で廃止されます。 {% highlight ruby %} def foo(x) @@ -262,51 +265,51 @@ end empty_hash = {} foo(**empty_hash) - #=> Ruby 2.6 or before: {} + #=> Ruby 2.6以前: {} #=> Ruby 2.7: warning: Passing the keyword argument as the last hash parameter is deprecated # warning: The called method `foo' is defined here #=> Ruby 3.0: ArgumentError: wrong number of arguments {% endhighlight %} -### 3. The no-keyword-arguments syntax (`**nil`) is introduced +### 3\. キーワード引数を受け取らないことを表す構文(`**nil`)が導入される -You can use `**nil` in a method definition to explicitly mark the method accepts no keyword arguments. Calling such methods with keyword arguments will result in an `ArgumentError`. (This is actually a new feature, not an incompatibility) +メソッド定義で`**nil`を用いることで、そのメソッドがキーワード引数を受け取らないことを明示的に示せるようになります。このメソッドを呼び出すときにキーワード引数を渡すと`ArgumentError`が表示されます(これは非互換性ではなく、事実上新機能です)。 {% highlight ruby %} def foo(*args, **nil) end foo(k: 1) - #=> Ruby 2.7 or later: no keywords accepted (ArgumentError) + #=> Ruby 2.7以降: no keywords accepted (ArgumentError) {% endhighlight %} -This is useful to make it explicit that the method does not accept keyword arguments. Otherwise, the keywords are absorbed in the rest argument in the above example. If you extend a method to accept keyword arguments, the method may have incompatibility as follows: +この新構文は、メソッドがキーワード引数を受け取らないことを明示的に指定するのに有用です。これを使わない場合、キーワード引数は上述の例の他の引数に吸い込まれます。メソッドを拡張してキーワード引数を受け取るようにする場合、以下のような非互換性が発生する可能性があります。 {% highlight ruby %} -# If a method accepts rest argument and no `**nil` +# メソッドは残りの引数を受け取るが、`**nil`はない状態 def foo(*args) p args end -# Passing keywords are converted to a Hash object (even in Ruby 3.0) +# キーワード引数はHashオブジェクトに変換される(Ruby 3.0でも同じ) foo(k: 1) #=> [{:k=>1}] -# If the method is extended to accept a keyword +# メソッドがキーワード引数を受け取るよう拡張した場合 def foo(*args, mode: false) p args end -# The existing call may break +# 以下の呼び出しが壊れる可能性がある foo(k: 1) #=> ArgumentError: unknown keyword k {% endhighlight %} -## Why we're deprecating the automatic conversion +## 自動変換を非推奨に変える理由 -The automatic conversion initially appeared to be a good idea, and worked well in many cases. However, it had too many corner cases, and we have received many bug reports about the behavior. +当初、自動変換はうまいアイデアに思われていて、多くの場合問題なく機能していました。しかし、エッジケースがあまりにも多く、これまでこの振る舞いに関するバグレポートを山のように受け取りました。 -Automatic conversion does not work well when a method accepts optional positional arguments and keyword arguments. Some people expect the last Hash object to be treated as a positional argument, and others expect it to be converted to keyword arguments. +自動変換は、オプションの位置引数とキーワード引数をどちらも受け取るメソッドではうまく動きません。末尾のHashオブジェクトを位置引数として扱うことを期待する人々もいれば、末尾のHashオブジェクトをキーワード引数として扱うことを期待する人々もいました。 -Here is one of the most confusing cases: +最も混乱を呼ぶケースのひとつを以下に示します。 {% highlight ruby %} def foo(x, **kwargs) @@ -317,17 +320,17 @@ def bar(x=1, **kwargs) p [x, kwargs] end -foo({}) => [{}, {}] -bar({}) => [1, {}] +foo({}) #=> [{}, {}] +bar({}) #=> [1, {}] -bar({}, **{}) => expected: [{}, {}], actual: [1, {}] +bar({}, **{}) #=> 期待は: [{}, {}]だが実際はl: [1, {}] {% endhighlight %} -In Ruby 2, `foo({})` passes an empty hash as a normal argument (i.e., `{}` is assigned to `x`), while `bar({})` passes a keyword argument (i.e, `{}` is assigned to `kwargs`). So `any_method({})` is very ambiguous. +Ruby 2の場合、`foo({})`は空のハッシュを通常の引数として1つ渡しますが(`x`に`{}`が代入されるなど)、`bar({})`はキーワード引数を1つ渡します(`kwargs`に`{}`が代入されるなど)。つまり、`any_method({})`は極めてあいまいになります。 -You may think of `bar({}, **{})` to pass the empty hash to `x` explicitly. Surprisingly, it does not work as you expected; it still prints `[1, {}]` in Ruby 2.6. This is because `**{}` is ignored by the parser in Ruby 2.6, and the first argument `{}` is automatically converted to keywords (`**kwargs`). In this case, you need to call `bar({}, {})`, which is very weird. +「`bar({}, **{})`は`x`に明示的に空のハッシュを渡すのでは?」と考える人もいるかもしれませんが、驚いたことに、この期待は裏切られます。Ruby 2.6では`[1, {}]`が出力されるのです。理由は、`**{}`がRuby 2.6のパーサーで無視されるのと、1番目の引数`{}`が自動的にキーワード引数(`**kwargs`)に変換されるためです。この場合`bar({}, {})`という形で呼び出す必要がありますが、これではあまりに見苦しくなります。 -The same issues also apply to methods that accept rest and keyword arguments. This makes explicit delegation of keyword arguments not work. +同じ問題は、残りの引数とキーワード引数を受け取るメソッドにも当てはまります。そのせいで、以下のようなキーワード引数の明示的な委譲は動作しません。 {% highlight ruby %} def target(*args) @@ -338,18 +341,18 @@ def foo(*args, **kwargs, &block) target(*args, **kwargs, &block) end -foo() #=> Ruby 2.6 or before: [{}] - #=> Ruby 2.7 or later: [] +foo() #=> Ruby 2.6以前: [{}] + #=> Ruby 2.7以降: [] {% endhighlight %} -`foo()` passes no arguments, but `target` receives an empty hash argument in Ruby 2.6. This is because the method `foo` delegates keywords (`**kwargs`) explicitly. When `foo()` is called, `args` is an empty Array, `kwargs` is an empty Hash, and `block` is `nil`. And then `target(*args, **kwargs, &block)` passes an empty Hash as an argument because `**kwargs` is automatically converted to a positional Hash argument. +`foo()`には引数がありませんが、Ruby 2.6では空のハッシュ引数が`target`に渡されます。理由は、メソッド`foo`が明示的にキーワード(`**kwargs`)を委譲しているためです。`foo()`が呼び出されると、`args`は空のArrayになり、`kwargs`は空のHashになります。そして`target(*args, **kwargs, &block)`は空のHashを引数として1つ渡します。理由は、`**kwargs`が自動的にHash位置引数に変換されるためです。 -The automatic conversion not only confuses people but also makes the method less extensible. See [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183) for more details about the reasons for the change in behavior, and why certain implementation choices were made. +自動変換は開発者を混乱させるのみならず、メソッドの拡張性も弱めてしまいます。振る舞いが変更された理由や、特定の実装が選択された理由について詳しくは[Feature #14183](https://bugs.ruby-lang.org/issues/14183)をご覧ください。 -## Acknowledgment +## 謝辞 -This article was kindly reviewed (or even co-authored) by Jeremy Evans and Benoit Daloze. +本記事はJeremy EvansとBenoit Dalozeによる丁寧なレビュー(共著と言ってもよいくらいです)をいただきました。 -## History +## 更新履歴 -* Updated 2019-12-25: In 2.7.0-rc2, the warning message was slightly changed, and an API to suppress the warnings was added. +* 更新 2019-12-25: 2.7.0-rc2でwarningメッセージが若干変更され、warning抑制APIが追加された。 From c82970710444b36e5baf1f6315b388d809062b1a Mon Sep 17 00:00:00 2001 From: hachi8833 Date: Thu, 30 Jan 2020 16:49:40 +0900 Subject: [PATCH 0483/1487] Fix untranslated lines --- ...ation-of-positional-and-keyword-arguments-in-ruby-3-0.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md index 5e80e231d5..b9aec21a12 100644 --- a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md +++ b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -1,6 +1,6 @@ --- layout: news_post -title: "Separation of positional and keyword arguments in Ruby 3.0" +title: "Ruby 3.0における位置引数とキーワード引数の分離について" author: "mame" translator: "hachi8833" date: 2019-12-12 12:00:00 +0000 @@ -13,8 +13,8 @@ lang: ja Ruby 3.0では、位置引数とキーワード引数が分離されます。Ruby 3.0で変更される振る舞いはRuby 2.7でwarningを表示します。以下のいずれかのwarningが表示される場合は、コードのアップデートが必要です。 -* `Using the last argument as keyword parameters is deprecated`, or -* `Passing the keyword argument as the last hash parameter is deprecated`, or +* `Using the last argument as keyword parameters is deprecated` +* `Passing the keyword argument as the last hash parameter is deprecated` * `Splitting the last argument into positional and keyword parameters is deprecated` この非互換性は、double splat演算子(`**`)を追加することでほぼ回避できます。これにより、`Hash`オブジェクトではなくキーワード引数を渡すことが明示的に指定されます。同様に、キーワード引数ではなく`Hash`オブジェクトを明示的に渡したい場合は中かっこ(`{}`)を追加できます。詳しくは後述の「典型的なケース」をご覧ください。 From db32bd844eff125ad3ddd8e47a6ee8285f3c57b1 Mon Sep 17 00:00:00 2001 From: jinroq <2787780+jinroq@users.noreply.github.com> Date: Sat, 27 Nov 2021 00:48:28 +0900 Subject: [PATCH 0484/1487] Revised the points pointed out in the review. --- ...ional-and-keyword-arguments-in-ruby-3-0.md | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md index b9aec21a12..38c2aea1c9 100644 --- a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md +++ b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -11,7 +11,9 @@ lang: ja ## 概要 -Ruby 3.0では、位置引数とキーワード引数が分離されます。Ruby 3.0で変更される振る舞いはRuby 2.7でwarningを表示します。以下のいずれかのwarningが表示される場合は、コードのアップデートが必要です。 +この文書では便宜上、必須引数、オプション引数、rest引数、後置引数(つまり、キーワード引数とブロック引数以外の引数)をまとめて「位置引数」と呼びます。 + +Ruby 3.0では、位置引数とキーワード引数が分離されます。Ruby 3.0で変更される振る舞いはRuby 2.7で警告を表示します。以下のいずれかの警告が表示される場合は、コードのアップデートが必要です。 * `Using the last argument as keyword parameters is deprecated` * `Passing the keyword argument as the last hash parameter is deprecated` @@ -100,13 +102,13 @@ foo(k: 1) #=> {:k=>1} ## Q: 自分のコードはRuby 2.7で動かなくなりますか? -手短かに言うと「壊れない可能性はあります」。 +A: たぶん動きます。 -Ruby 2.7におけるこの変更は、3.0への移行パスとして設計されています。あくまで原則としてですが、Ruby 2.7ではRuby 3.0で変更される振る舞いについてwarningを出すにとどめており、warningの中には私たちが微細とみなしている変更点も若干含まれます。詳しくは後述の「その他の微細な変更点」をご覧ください。 +Ruby 2.7では、原則として、Ruby 3.0で変更される振る舞いについて警告を出すにとどめています。しかし、私たちが軽微とみなした非互換も少しだけ入っています。詳しくは後述の「その他の軽微な変更点」をご覧ください。 -Ruby 2.7では、warningが表示される点と微細な変更点以外を除いてRuby 2.6との互換性を保とうとしています。つまり、あなたのコードはRuby 2.7でもおそらく動作しますが、warningが表示される可能性はあります。あなたのコードをRuby 2.7で実行すれば、Ruby 3.0の準備ができているかどうかをチェックできます。 +Ruby 2.7では、警告が表示される点と軽微な変更点以外を除いてRuby 2.6との互換性を保とうとしています。つまり、あなたのコードはRuby 2.7でもおそらく動作しますが、警告が表示される可能性はあります。あなたのコードをRuby 2.7で実行すれば、Ruby 3.0の準備ができているかどうかをチェックできます。 -非推奨のwarningを無効にしたい場合は、コマンドライン引数`-W:no-deprecated`を使うか、コードに`Warning[:deprecated] = false`を追加します。 +非推奨の警告を無効にしたい場合は、コマンドライン引数`-W:no-deprecated`を使うか、コードに`Warning[:deprecated] = false`を追加します。 ## 引数の委譲の扱いについて @@ -162,7 +164,7 @@ ruby2_keywords def foo(*args, &block) end {% endhighlight %} -残念ながら、Ruby 2.6以前では新しい委譲スタイルを正しく扱えないため、旧来の委譲スタイル(`**kwargs`を使わないなど)を使う必要があります。これは、キーワード引数を分離した理由のひとつでもあります(詳しくは本記事末尾をご覧ください)。`ruby2_keywords`を用いれば、Ruby 2.7や3.0でも旧来の委譲スタイルを引き続き利用できます。2.6以前のRubyでは`ruby2_keywords`が定義されていないので、[ruby2_keywords](https://rubygems.org/gems/ruby2_keywords) gemを使うか、以下を手動で定義します。 +残念ながら、Ruby 2.6以前では新しい委譲スタイルを正しく扱えないため、旧来の委譲スタイル(つまり、**kwargsを受け渡ししないスタイル)を使う必要があります。これは、キーワード引数を分離した理由のひとつでもあります(詳しくは本記事末尾をご覧ください)。`ruby2_keywords`を用いれば、Ruby 2.7や3.0でも旧来の委譲スタイルを引き続き利用できます。2.6以前のRubyでは`ruby2_keywords`が定義されていないので、[ruby2_keywords](https://rubygems.org/gems/ruby2_keywords) gemを使うか、以下を手動で定義します。 {% highlight ruby %} def ruby2_keywords(*) @@ -186,15 +188,15 @@ foo({}) #=> Ruby 2.7: [] ({}を含んでいない) foo({}, **{}) #=> Ruby 2.7: [{}] ({}を渡せば、キーワード引数が「ない」ことを明示できる) {% endhighlight %} -上のコードでは、空のHash引数が自動的に変換されて`**kwargs`に吸い込まれ、この空のキーワードハッシュは委譲の呼び出しで削除されます。このため、`targe`には引数がまったく渡されなくなります。私たちが把握している範囲では、これが唯一のエッジケースです。 +上のコードでは、空のHash引数が自動的に変換されて`**kwargs`に吸い込まれ、この空のキーワードハッシュは委譲の呼び出しで削除されます。このため、`target`には引数がまったく渡されなくなります。私たちが把握している範囲では、これが唯一のエッジケースです。 上のコードの最下部に書いたように、`**{}`を渡すことでこの問題を回避できます。 -移植性がどうしても不安な場合は`ruby2_keywords`をお使いください(Ruby 2.6以前ではキーワード引数周りで膨大なエッジケースが存在していることを知っておいてください)。`ruby2_keywords`は、今後Ruby 2.6が役目を終えたときに削除される可能性があります。現時点で私たちがおすすめできるのは、キーワード引数を明示的に委譲することです(上述のRuby 3向けのコードを参照)。 +移植性がどうしても不安な場合は`ruby2_keywords`をお使いください(Ruby 2.6以前ではキーワード引数周りで膨大なエッジケースが存在していることを知っておいてください)。`ruby2_keywords`は、今後Ruby 2.6がサポート切れになったあとで削除される可能性があります。そのときになったら、キーワード引数を明示的に委譲することをおすすめします(上述のRuby 3向けのコードを参照)。 -## その他の微細な変更点 +## その他の軽微な変更点 -Ruby 2.7のキーワード引数では、この他に以下の3つのマイナーチェンジが行われています。 +Ruby 2.7のキーワード引数では、この他に以下の3つの軽微な変更が行われています。 ### 1\. キーワード引数で非シンボルキーを利用できるようになった @@ -256,7 +258,7 @@ foo(**empty_hash) なお、`foo(**{})`はRuby 2.6以前とRuby 2.7のどちらの場合も引数を渡さず、`**{}`がパーサーによって削除される点にご注意ください。また、Ruby 2.7以降ではどちらも`**empty_hash`として同じに扱われるので、メソッドにキーワード引数を渡さないようにする指定が楽に行なえます。 -Ruby 2.7では、あるメソッド呼び出しで必須とされる位置引数の個数が不足している場合、Ruby 2.6との互換性を保つために`foo(**empty_hash)`は空のハッシュを渡してwarningを表示します。この振る舞いはRuby 3.0で廃止されます。 +Ruby 2.7では、あるメソッド呼び出しで必須とされる位置引数の個数が不足している場合、Ruby 2.6との互換性を保つために`foo(**empty_hash)`は空のハッシュを渡して警告を表示します。この振る舞いはRuby 3.0で廃止されます。 {% highlight ruby %} def foo(x) @@ -273,7 +275,7 @@ foo(**empty_hash) ### 3\. キーワード引数を受け取らないことを表す構文(`**nil`)が導入される -メソッド定義で`**nil`を用いることで、そのメソッドがキーワード引数を受け取らないことを明示的に示せるようになります。このメソッドを呼び出すときにキーワード引数を渡すと`ArgumentError`が表示されます(これは非互換性ではなく、事実上新機能です)。 +メソッド定義で`**nil`を用いることで、そのメソッドがキーワード引数を受け取らないことを明示的に示せるようになります。このメソッドを呼び出すときにキーワード引数を渡すと`ArgumentError`が表示されます(これは非互換性ではなく、新機能です)。 {% highlight ruby %} def foo(*args, **nil) @@ -283,7 +285,7 @@ foo(k: 1) #=> Ruby 2.7以降: no keywords accepted (ArgumentError) {% endhighlight %} -この新構文は、メソッドがキーワード引数を受け取らないことを明示的に指定するのに有用です。これを使わない場合、キーワード引数は上述の例の他の引数に吸い込まれます。メソッドを拡張してキーワード引数を受け取るようにする場合、以下のような非互換性が発生する可能性があります。 +この新構文は、メソッドがキーワード引数を受け取らないことを明示的に指定するのに有用です。これを使わない場合、キーワード引数は上述の例のrest引数に吸い込まれます。メソッドを拡張してキーワード引数を受け取るようにする場合、以下のような非互換性が発生する可能性があります。 {% highlight ruby %} # メソッドは残りの引数を受け取るが、`**nil`はない状態 @@ -307,7 +309,7 @@ foo(k: 1) #=> ArgumentError: unknown keyword k 当初、自動変換はうまいアイデアに思われていて、多くの場合問題なく機能していました。しかし、エッジケースがあまりにも多く、これまでこの振る舞いに関するバグレポートを山のように受け取りました。 -自動変換は、オプションの位置引数とキーワード引数をどちらも受け取るメソッドではうまく動きません。末尾のHashオブジェクトを位置引数として扱うことを期待する人々もいれば、末尾のHashオブジェクトをキーワード引数として扱うことを期待する人々もいました。 +自動変換は、オプション引数とキーワード引数をどちらも受け取るメソッドではうまく動きません。末尾のHashオブジェクトを位置引数として扱うことを期待する人々もいれば、末尾のHashオブジェクトをキーワード引数として扱うことを期待する人々もいました。 最も混乱を呼ぶケースのひとつを以下に示します。 @@ -345,7 +347,7 @@ foo() #=> Ruby 2.6以前: [{}] #=> Ruby 2.7以降: [] {% endhighlight %} -`foo()`には引数がありませんが、Ruby 2.6では空のハッシュ引数が`target`に渡されます。理由は、メソッド`foo`が明示的にキーワード(`**kwargs`)を委譲しているためです。`foo()`が呼び出されると、`args`は空のArrayになり、`kwargs`は空のHashになります。そして`target(*args, **kwargs, &block)`は空のHashを引数として1つ渡します。理由は、`**kwargs`が自動的にHash位置引数に変換されるためです。 +`foo()`には引数がありませんが、Ruby 2.6では空のハッシュ引数が`target`に渡されます。理由は、メソッド`foo`が明示的にキーワード(`**kwargs`)を委譲しているためです。`foo()`が呼び出されると、`args`は空のArrayになり、`kwargs`は空のHashになり、blockはnilになります。。そして`target(*args, **kwargs, &block)`は空のHashを引数として1つ渡します。理由は、`**kwargs`が自動的にHash位置引数に変換されるためです。 自動変換は開発者を混乱させるのみならず、メソッドの拡張性も弱めてしまいます。振る舞いが変更された理由や、特定の実装が選択された理由について詳しくは[Feature #14183](https://bugs.ruby-lang.org/issues/14183)をご覧ください。 @@ -355,4 +357,4 @@ foo() #=> Ruby 2.6以前: [{}] ## 更新履歴 -* 更新 2019-12-25: 2.7.0-rc2でwarningメッセージが若干変更され、warning抑制APIが追加された。 +* 更新 2019-12-25: 2.7.0-rc2で警告メッセージが若干変更され、警告抑制APIが追加された。 From a5f8fdd3ea5cd14267b1d9cc7efc3d208447de8a Mon Sep 17 00:00:00 2001 From: hachi8833 Date: Wed, 22 Jan 2020 12:35:17 +0900 Subject: [PATCH 0485/1487] Add en doc --- ...separation-of-positional-and-keyword-arguments-in-ruby-3-0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md index 38c2aea1c9..505003747d 100644 --- a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md +++ b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -174,6 +174,7 @@ end if RUBY_VERSION < "2.7" * * * * * 自分のコードがRuby 2.6以前で動かなくても構わないのであれば、Ruby 2.7で新しいスタイルを試してもよいでしょう。ほぼほぼ間違いなく動作しますが、以下のようなエッジケースを運悪く踏むこともあります。 +--- {% highlight ruby %} def target(*args) From bdd3514fe2b0a6a4e52ae311b93d39f462f9ac87 Mon Sep 17 00:00:00 2001 From: hachi8833 Date: Wed, 22 Jan 2020 12:35:47 +0900 Subject: [PATCH 0486/1487] Translate "Separation of positional and keyword arguments in Ruby 3.0" --- ...paration-of-positional-and-keyword-arguments-in-ruby-3-0.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md index 505003747d..234c6671db 100644 --- a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md +++ b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -13,6 +13,8 @@ lang: ja この文書では便宜上、必須引数、オプション引数、rest引数、後置引数(つまり、キーワード引数とブロック引数以外の引数)をまとめて「位置引数」と呼びます。 +Ruby 3.0では、位置引数とキーワード引数が分離されます。Ruby 3.0で変更される振る舞いはRuby 2.7でwarningを表示します。以下のいずれかのwarningが表示される場合は、コードのアップデートが必要です。 + Ruby 3.0では、位置引数とキーワード引数が分離されます。Ruby 3.0で変更される振る舞いはRuby 2.7で警告を表示します。以下のいずれかの警告が表示される場合は、コードのアップデートが必要です。 * `Using the last argument as keyword parameters is deprecated` @@ -174,7 +176,6 @@ end if RUBY_VERSION < "2.7" * * * * * 自分のコードがRuby 2.6以前で動かなくても構わないのであれば、Ruby 2.7で新しいスタイルを試してもよいでしょう。ほぼほぼ間違いなく動作しますが、以下のようなエッジケースを運悪く踏むこともあります。 ---- {% highlight ruby %} def target(*args) From d1d39723a179d9f0e97329bb48786981c8147c54 Mon Sep 17 00:00:00 2001 From: hachi8833 Date: Thu, 30 Jan 2020 16:49:40 +0900 Subject: [PATCH 0487/1487] Fix untranslated lines --- ...eparation-of-positional-and-keyword-arguments-in-ruby-3-0.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md index 234c6671db..38c2aea1c9 100644 --- a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md +++ b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -13,8 +13,6 @@ lang: ja この文書では便宜上、必須引数、オプション引数、rest引数、後置引数(つまり、キーワード引数とブロック引数以外の引数)をまとめて「位置引数」と呼びます。 -Ruby 3.0では、位置引数とキーワード引数が分離されます。Ruby 3.0で変更される振る舞いはRuby 2.7でwarningを表示します。以下のいずれかのwarningが表示される場合は、コードのアップデートが必要です。 - Ruby 3.0では、位置引数とキーワード引数が分離されます。Ruby 3.0で変更される振る舞いはRuby 2.7で警告を表示します。以下のいずれかの警告が表示される場合は、コードのアップデートが必要です。 * `Using the last argument as keyword parameters is deprecated` From 8b1e350ead504e7d804b7b44dfa2669cd56e2fab Mon Sep 17 00:00:00 2001 From: jinroq <2787780+jinroq@users.noreply.github.com> Date: Mon, 29 Nov 2021 10:40:13 +0900 Subject: [PATCH 0488/1487] Added some changes that we consider to minor. --- ...ositional-and-keyword-arguments-in-ruby-3-0.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md index 38c2aea1c9..ac24a4a40e 100644 --- a/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md +++ b/ja/news/_posts/2019-12-12-separation-of-positional-and-keyword-arguments-in-ruby-3-0.md @@ -24,6 +24,7 @@ Ruby 3.0では、位置引数とキーワード引数が分離されます。Rub Ruby 3では、すべての引数を委譲するメソッドで、位置引数の他に必ずキーワード引数も明示的に委譲しなければなりません。Ruby 2.7以前の委譲の振る舞いを変えたくない場合は、`ruby2_keywords`をお使いください。詳しくは後述の「引数の委譲の扱いについて」をご覧ください。 ## よくあるケース +{: #typical-cases } 以下はもっともよくあるケースです。Hashではなくキーワードを渡すのにdouble splat演算子(`**`)を使えます。 @@ -69,6 +70,7 @@ bar({ k: 42 }) # => {:k=>42} {% endhighlight %} ## どの動作が非推奨になるか +{: #what-is-deprecated } Ruby 2では、キーワード引数が末尾のハッシュ位置引数として扱われることがあります。また、末尾のハッシュ引数がキーワード引数として扱われることもあります。 @@ -101,6 +103,7 @@ foo(k: 1) #=> {:k=>1} {% endhighlight %} ## Q: 自分のコードはRuby 2.7で動かなくなりますか? +{: #break-on-ruby-2-7 } A: たぶん動きます。 @@ -111,8 +114,10 @@ Ruby 2.7では、警告が表示される点と軽微な変更点以外を除い 非推奨の警告を無効にしたい場合は、コマンドライン引数`-W:no-deprecated`を使うか、コードに`Warning[:deprecated] = false`を追加します。 ## 引数の委譲の扱いについて +{: #delegation } ### Ruby 2.6以前の場合 +{: #delegation-ruby-2-6-or-prior } Ruby 2では、以下のように1個の`*rest`引数と1個の`&block`引数を受け付けて、この2つの引数を委譲先メソッド(以下の`target`)に渡すことで委譲メソッドを書けます。この振る舞いでは、(1つ以上の)キーワード引数も「位置引数<=>キーワード引数の自動変換」によって暗黙的に扱われます。 @@ -123,6 +128,7 @@ end {% endhighlight %} ### Ruby 3の場合 +{: #delegation-ruby-3 } 以下のようにキーワード引数を明示的に委譲する必要があります。 @@ -141,6 +147,7 @@ end {% endhighlight %} ### Ruby 2.7の場合 +{: #delegation-ruby-2-7 } 手短かに言うと、以下のように`Module#ruby2_keywords`を用い、`*args, &block`を委譲します。 @@ -155,6 +162,7 @@ end 実際、Ruby 2.7では多くの場面でこの新しい委譲のスタイルを利用できます。ただし1つ既知のエッジケースがあります。次をご覧ください。 ### Ruby 2.6 / 2.7 / 3で互換性のある委譲スタイル +{: #a-compatible-delegation } 手短かに言うと、ここも「`Module#ruby2_keywords`を使う」となります。 @@ -171,7 +179,7 @@ def ruby2_keywords(*) end if RUBY_VERSION < "2.7" {% endhighlight %} -* * * * * +--- 自分のコードがRuby 2.6以前で動かなくても構わないのであれば、Ruby 2.7で新しいスタイルを試してもよいでしょう。ほぼほぼ間違いなく動作しますが、以下のようなエッジケースを運悪く踏むこともあります。 @@ -195,10 +203,12 @@ foo({}, **{}) #=> Ruby 2.7: [{}] ({}を渡せば、キーワード引数が「 移植性がどうしても不安な場合は`ruby2_keywords`をお使いください(Ruby 2.6以前ではキーワード引数周りで膨大なエッジケースが存在していることを知っておいてください)。`ruby2_keywords`は、今後Ruby 2.6がサポート切れになったあとで削除される可能性があります。そのときになったら、キーワード引数を明示的に委譲することをおすすめします(上述のRuby 3向けのコードを参照)。 ## その他の軽微な変更点 +{: #other-minor-changes } Ruby 2.7のキーワード引数では、この他に以下の3つの軽微な変更が行われています。 ### 1\. キーワード引数で非シンボルキーを利用できるようになった +{: #other-minor-changes-non-symbol-keys } Ruby 2.6以前のキーワード引数では、シンボル形式のキーしか利用できませんでした。Ruby 2.7のキーワード引数では、以下のようにシンボル形式でないキーを利用できるようになります。 @@ -242,6 +252,7 @@ bar("key" => 42, :sym => 43) {% endhighlight %} ### 2\. double splatを付けた空ハッシュ(`**{}`)で引数を渡さないようになった +{: #other-minor-changes-empty-hash } Ruby 2.6以前は、`**empty_hash`を渡すと位置引数に空のハッシュが渡されました(`[{}]`)。Ruby 2.7以降では引数を渡さなくなります。 @@ -274,6 +285,7 @@ foo(**empty_hash) {% endhighlight %} ### 3\. キーワード引数を受け取らないことを表す構文(`**nil`)が導入される +{: #other-minor-changes-double-splat-nil } メソッド定義で`**nil`を用いることで、そのメソッドがキーワード引数を受け取らないことを明示的に示せるようになります。このメソッドを呼び出すときにキーワード引数を渡すと`ArgumentError`が表示されます(これは非互換性ではなく、新機能です)。 @@ -306,6 +318,7 @@ foo(k: 1) #=> ArgumentError: unknown keyword k {% endhighlight %} ## 自動変換を非推奨に変える理由 +{: #why-deprecated } 当初、自動変換はうまいアイデアに思われていて、多くの場合問題なく機能していました。しかし、エッジケースがあまりにも多く、これまでこの振る舞いに関するバグレポートを山のように受け取りました。 From 43feb73e0af06667ddbb9a695972fe019fc00a57 Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Sat, 27 Nov 2021 21:07:05 +0700 Subject: [PATCH 0489/1487] Translate CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP (id) --- ...7-07-trusting-pasv-responses-in-net-ftp.md | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 id/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md diff --git a/id/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md b/id/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md new file mode 100644 index 0000000000..6dad71eca8 --- /dev/null +++ b/id/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md @@ -0,0 +1,40 @@ +--- +layout: news_post +title: "CVE-2021-31810: Kerentanan respons FTP PASV yang dipercaya pada Net::FTP" +author: "shugo" +translator: "meisyal" +date: 2021-07-07 09:00:00 +0000 +tags: security +lang: id +--- + +Sebuah kerentanan respons FTP PASV yang dipercaya telah ditemukan pada Net::FTP. +Kerentanan ini telah ditetapkan dengan penanda CVE +[CVE-2021-31810](https://nvd.nist.gov/vuln/detail/CVE-2021-31810). +Kami sangat merekomendasikan Anda untuk memperbarui Ruby. + +net-ftp adalah sebuah *default gem* pada Ruby 3.0.1, tetapi *gem* tersebut +memiliki masalah pengemasan. Sehingga, mohon perbarui Ruby. + +## Detail + +Sebuah FTP *server* yang berbahaya dapat menggunakan respons PASV untuk +mengelabui Net::FTP dengan menghubungkan kembali ke sebuah alamat IP dan *port* +yang diberikan. Ini berpotensi membuat Net::FTP menguraikan informasi *service* +yang seharusnya privat dan tidak boleh terbuka (contohnya, penyerang melakukan +*port scan* dan *service banner extraction*). + +## Versi Terimbas + +* Rangkaian Ruby 2.6: 2.6.7 dan sebelumnya +* Rangkaian Ruby 2.7: 2.7.3 dan sebelumnya +* Rangkaian Ruby 3.0: 3.0.1 dan sebelumnya + +## Rujukan + +Terima kasih kepada [Alexandr Savca](https://hackerone.com/chinarulezzz) yang +telah melaporkan kerentanan ini. + +## Riwayat + +* Semula dipublikasikan pada 2021-07-07 09:00:00 UTC From 568fbdc9322ab3d5f91c9938af05a890841ead65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20T=C3=A1mara=20Pati=C3=B1o?= Date: Thu, 2 Dec 2021 09:48:22 -0500 Subject: [PATCH 0490/1487] Translation of Ruby 3.1.0-preview1 releases (es) (#2736) --- ...2021-11-09-ruby-3-1-0-preview1-released.md | 259 ++++++++++++++++++ 1 file changed, 259 insertions(+) create mode 100644 es/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md diff --git a/es/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md b/es/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md new file mode 100644 index 0000000000..6bbecd9013 --- /dev/null +++ b/es/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md @@ -0,0 +1,259 @@ +--- +layout: news_post +title: "Publicado Ruby 3.1.0 versión previa 1" +author: "naruse" +translator: vtamara +date: 2021-11-09 00:00:00 +0000 +lang: es +--- + +Nos complace anunciar la publicación de Ruby {{ release.version }}. + +{% assign release = site.data.releases | where: "version", "3.1.0-preview1" | first %} + + +## YJIT: Nuevo compilador experimental JIT en-proceso + +Ruby 3.1 incorpora YJIT, un nuevo compilador JIT en-proceso desarrollado +por Shopify. + +Desde que [Ruby 2.6 introdujo MJIT en 2018](https://www.ruby-lang.org/es/news/2018/12/25/ruby-2-6-0-released/), +su desempeño ha mejorado significativamente, y finalmente +[alcanzamos Ruby3x3 el año pasado](https://www.ruby-lang.org/es/news/2020/12/25/ruby-3-0-0-released/). +Pero aún cuando Optcarrot ha demostrado un impresionante aumento de velocidad, +el JIT no ha beneficiado aplicaciones de negocios del mundo real. + +Recientemente Shopify contribuyó muchas mejoras a Ruby para aumentar la +velocidad de su aplicación Rails. +YJIT es una contribución importante y busca mejorar el desempeño de +aplicaciones rails. + +Mientras MJIT es un compilador JIT basado-en-métodos y usa un +compilador de C externo, YJIT usa Versiones de Bloques Básicos e +incluye un compilador JIT. Con Versiones de Bloques Básicos Perezosa +(Lazy Basic Block Versioning - LBBV), que primero compilan el comienzo de +un método e incrementalmente compila el resto a medida que el tipo de +los argumentos y variables se determina dinámicamente. Ver una introducción +detallada en +[YJIT: a basic block versioning JIT compiler for CRuby](https://dl.acm.org/doi/10.1145/3486606.3486781). + +Con esta tecnología, YJIT alcanza tanto un tiempo de calentamiento rápido como +mejoras en desempeño en la mayoría de software del mundo-real, hasta +22% en railsbench, 39% en liquid-render. + + + +YJIT es aún una características experimental, y como tal, +está deshabilitado de manera predeterminada. Si quiere usarlo, +especifique la opción `--yjit` en la línea de ordenes que habilita +YJIT. Por ahora está limitado a macOS & Linux sobre plataformas +x86-64. + +* https://bugs.ruby-lang.org/issues/18229 +* https://shopify.engineering/yjit-just-in-time-compiler-cruby +* https://www.youtube.com/watch?v=PBVLf3yfMs8 + +## Gema debug: Un nuevo depurador + +Se incluye un nuevo depurador [debug.gem](https://github.com/ruby/debug). +debug.gem es una implementación de un depurador rápido que provee muchas +características tales como depuración remota, REPL con colores, integración +con IDE (VSCode) entre otras. +Remplaza la librería estándar `lib/debug.rb`. + +## error_highlight: Localización de errores afinada en las trazas + +Se ha incluido un gema con Ruby, error_highlight. Proporciona +localización afinada de errores en la traza: + +``` +$ ruby prueba.rb +prueba.rb:1:in `
': undefined method `time' for 1:Integer (NoMethodError) + +1.time {} + ^^^^^ +Did you mean? times +``` + +Esta gema está habilitada de manera predeterminada. Puede deshabilitarla +desde la línea de ordenes con la opción `--disable-error_highlight`. +Ver detalles en [el repositorio](https://github.com/ruby/error_highlight). + +## Mejoras a Irb + +Se describirán en la siguiente versión previa. + +## Otras características nuevas y notables + +### Lenguaje + +* Pueden omitirse valores en literales de diccionarios y en argumentos de + palabra reservada [Feature #14579] + * `{x:, y:}` es azúcar sintáctica para `{x: x, y: y}`. + * `foo(x:, y:)` es azúcar sintáctica para `foo(x: x, y: y)`. + +* En reconocimiento de patrones el operador pin ahora toma una + expresión [Feature #17411] + +```ruby +Prime.each_cons(2).lazy.find_all{_1 in [n, ^(n + 2)]}.take(3).to_a +#=> [[3, 5], [5, 7], [11, 13]] +``` + + +### RBS + +RBS es un lenguaje para describir la estructura de programas Ruby. +Ver detalles en [el repositorio](https://github.com/ruby/rbs). + +Actualizaciones desde Ruby 3.0.0: + +* se introduce `rbs collection` para administrar RBSs de gemas. + [doc](https://github.com/ruby/rbs/blob/master/docs/collection.md) +* Se han añadido/actualizado muchas características incorporadas y de + la librería estándar. +* Incluye soluciones a muchas fallas, así como mejoras de desempeño. + +Ver más informaciń en [el archivo CHANGELOG.md](https://github.com/ruby/rbs/blob/master/CHANGELOG.md). + +### TypeProf + +TypeProf es un analizador de tipos estático para Ruby. Genera un prototipo +en RBS a partir de código Ruby sin anotaciones de tipos. Ver detalles en +[el documento](https://github.com/ruby/typeprof/blob/master/doc/doc.md). + +Actualizaciones desde Ruby 3.0.0: + +* Se ha implementado [soporte experimental para IDE](https://github.com/ruby/typeprof/blob/master/doc/ide.md). +* Muchas correcciones a fallas y mejoras de desempeño. + +## Mejoras de desempeño + +* MJIT + * Para cargas de trabajo como Rails, se cambia `--jit-max-cache` de 100 + a 10000. + El compilador JIT ya no se salta la compilación de métodos con menos de + 1000 instrucciones. + * Para soportar Zeitwerk de Rails, el código compilado con JIT ya no + se cancela cuando se habilita un TracePoint para eventos de clase. + +## Otros cambios notables desde 3.0 + +* Reconocimiento de patrones en una línea, e.g., `ary => [x, y, z]`, ya no es + experimental. +* Se ha cambiado levemente el orden de evaluación de asignaciones múltiples. + [[Bug #4443]] + * `foo[0], bar[0] = baz, qux` era evaluado en el orden `baz`, `qux`, `foo`, + y después `bar` en Ruby 3.0. En Ruby 3.1, se evalúa en el orden + `foo`, `bar`, `baz`, y después `qux`. +* Localización de ancho variable: Cadenas (experimental) + [[Falla #18239]](https://bugs.ruby-lang.org/issues/18239) + +### Actualizaciones a la librería estándar + +* Se actualizaron algunas librerías estándar + * RubyGems + * Bundler + * RDoc 6.4.0 + * ReLine + * JSON 2.6.0 + * Psych 4.0.2 + * FileUtils 1.6.0 + * Fiddle + * StringIO 3.0.1 + * IO::Console 0.5.9 + * IO::Wait 0.2.0 + * CSV + * Etc 1.3.0 + * Date 3.2.0 + * Zlib 2.1.1 + * StringScanner + * IpAddr + * Logger 1.4.4 + * OStruct 0.5.0 + * Irb + * Racc 1.6.0 + * Delegate 0.2.0 + * Benchmark 0.2.0 + * CGI 0.3.0 + * Readline(C-ext) 0.1.3 + * Timeout 0.2.0 + * YAML 0.2.0 + * URI 0.11.0 + * OpenSSL + * DidYouMean + * Weakref 0.1.1 + * Tempfile 0.1.2 + * TmpDir 0.1.2 + * English 0.7.1 + * Net::Protocol 0.1.2 + * Net::Http 0.2.0 + * BigDecimal + * OptionParser 0.2.0 + * Set + * Find 0.1.1 + * Rinda 0.1.1 + * Erb + * NKF 0.1.1 + * Base64 0.1.1 + * OpenUri 0.2.0 + * SecureRandom 0.1.1 + * Resolv 0.2.1 + * Resolv::Replace 0.1.0 + * Time 0.2.0 + * PP 0.2.1 + * Prettyprint 0.1.1 + * Drb 2.1.0 + * Pathname 0.2.0 + * Digest 3.1.0.pre2 + * Un 0.2.0 +* Se actualizaron las siguientes gemas incluidas en Ruby + * minitest 5.14.4 + * power_assert 2.0.1 + * rake 13.0.6 + * test-unit 3.5.0 + * rbs 1.6.2 + * typeprof 0.20.0 +* Las siguientes gemas por omisión ahora son ahora gemas incluidas en Ruby. + * net-ftp + * net-imap + * net-pop + * net-smtp + * matrix + * prime + +Ver más detalles en +[NEWS](https://github.com/ruby/ruby/blob/{{ release.tag }}/NEWS.md) +o [en la bitácora de cambios](https://github.com/ruby/ruby/compare/v3_0_0...{{ release.tag }}). + +Con esos cambios, [{{ release.stats.files_changed }} archivos cambiados, {{ release.stats.insertions }} inserciones(+), {{ release.stats.deletions }} eliminaciones (-)](https://github.com/ruby/ruby/compare/v3_0_0...{{ release.tag }}#file_bucket) +desde Ruby 3.0.0! + +## Descargas + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Qué es Ruby + +Ruby fue desarrollado inicialmente pof Matz (Yukihiro Matsumoto) en 1993, +y ahora es desarrollado como Código Abierto. Corre en múltiples +plataformas y se usa en todo el mundo especialmente para desarrollo web. From 8582d2af9bc328a6d90d11b44daaf48e169f18ed Mon Sep 17 00:00:00 2001 From: jinroq <2787780+jinroq@users.noreply.github.com> Date: Fri, 26 Nov 2021 14:40:51 +0900 Subject: [PATCH 0491/1487] Japanese translation of "CVE-2021-31810: Trusting FTP PASV responses vulnerability in Net::FTP" Translate [https://github.com/ruby/www.ruby-lang.org/blob/master/en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md](https://github.com/ruby/www.ruby-lang.org/blob/master/en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md) to ja. --- ...7-07-trusting-pasv-responses-in-net-ftp.md | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 ja/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md diff --git a/ja/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md b/ja/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md new file mode 100644 index 0000000000..6e122de845 --- /dev/null +++ b/ja/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md @@ -0,0 +1,35 @@ +--- +layout: news_post +title: "CVE-2021-31810: Net::FTP における信頼性のある FTP PASV 応答の脆弱性について" +author: "shugo" +translator: "jinroq" +date: 2021-07-07 09:00:00 +0000 +tags: security +lang: ja +--- + +信頼性のある FTP PASV 応答の脆弱性が Net::FTP で発見されました。 +この脆弱性は [CVE-2021-31810](https://nvd.nist.gov/vuln/detail/CVE-2021-31810) として登録されています。 +Ruby をアップグレードすることを強く推奨します。 + +net-ftp は Ruby 3.0.1 の デフォルト gem ですが、パッケージ化の問題があるため、Ruby 自体をアップグレードしてください。 + +## 詳細 + +悪意のある FTP サーバーが、PASV 応答を利用して Net::FTP を偽装し、特定の IP アドレスとポートに接続し直す可能性があります。 +これにより Net::FTP は本来では抽出できない非公開なサービスに関する情報を抽出する可能性があります +(例: 攻撃者はポートスキャンやサービスバナーの抽出を実行できます)。 + +## 影響を受けるバージョン + +* Ruby 2.6 系列: 2.6.7 およびそれ以前のバージョン +* Ruby 2.7 系列: 2.7.3 およびそれ以前のバージョン +* Ruby 3.0 系列: 3.0.1 およびそれ以前のバージョン + +## クレジット + +この脆弱性情報は、[Alexandr Savca](https://hackerone.com/chinarulezzz) 氏によって報告されました。 + +## 更新履歴 + +* 2021-07-07 18:00:00 (JST) 初版 From 85b21c3e53f54cef7d0b7f8f156c0f708c950bb4 Mon Sep 17 00:00:00 2001 From: jinroq <2787780+jinroq@users.noreply.github.com> Date: Thu, 25 Nov 2021 17:52:06 +0900 Subject: [PATCH 0492/1487] Japanese translation of "CVE-2021-41816: Buffer Overrun in CGI.escape_html" Translate [https://github.com/ruby/www.ruby-lang.org/blob/master/en/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md](https://github.com/ruby/www.ruby-lang.org/blob/master/en/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md) to ja. --- ...errun-in-cgi-escape_html-cve-2021-41816.md | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 ja/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md diff --git a/ja/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md b/ja/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md new file mode 100644 index 0000000000..b6712c7c3f --- /dev/null +++ b/ja/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md @@ -0,0 +1,39 @@ +--- +layout: news_post +title: "CVE-2021-41816: CGI.escape_html 内のバッファオーバーラン" +author: "mame" +translator: "jinroq" +date: 2021-11-24 12:00:00 +0000 +tags: security +lang: ja +--- + +A buffer overrun vulnerability was discovered in CGI.escape_html. +This vulnerability has been assigned the CVE identifier [CVE-2021-41816](https://nvd.nist.gov/vuln/detail/CVE-2021-41816). +We strongly recommend upgrading Ruby. +CGI.escape_html 内のバッファオーバーランの脆弱性が発見されました。 +この脆弱性は、[CVE-2021-41816](https://nvd.nist.gov/vuln/detail/CVE-2021-41816)として登録されています。 +Ruby をアップグレードすることを強く推奨します。 + +## 詳細 + +`long` 型が 4 バイトかかるプラットフォーム(典型的なものは Windows)で非常に大きな文字列(700 MB 以上)を `CGI.escape_html` に渡すと、バッファオーバーフローを引き起こす脆弱性があります。 + +cgi gem をバージョン 0.3.1, 0.2.1, 0.1.1 もしくはこれら以上のバージョンに更新してください。`gem update cgi` を使用して更新できます。bundler を使用している場合は、 `Gemfile` に `gem "cgi", "> = 0.3.1"` を追加してください。 +または、Rubyを 2.7.5 または 3.0.3 に更新してください。 + +この問題は Ruby 2.7 以降で発見されたので、Ruby 2.6 でバンドルされている cgi バージョンには脆弱性はありません。 + +## 影響を受けるバージョン + +* cgi gem 0.1.0 以前(Ruby 2.7.5 より前にバンドルされている Ruby 2.7 系列) +* cgi gem 0.2.0 以前(Ruby 3.0.3 より前にバンドルされている Ruby 3.0 系列) +* cgi gem 0.3.0 以前 + +## クレジット + +この脆弱性情報は、[chamal](https://hackerone.com/chamal) 氏によって報告されました。 + +## 更新履歴 + +* 2021-11-24 21:00:00 (JST) 初版 From cf989664e27d38c7ed1c38c6548d8a32523721e3 Mon Sep 17 00:00:00 2001 From: jinroq <2787780+jinroq@users.noreply.github.com> Date: Fri, 26 Nov 2021 12:46:24 +0900 Subject: [PATCH 0493/1487] Japanese translation of "Ruby 3.1.0 Preview 1 Released" Translate [https://github.com/ruby/www.ruby-lang.org/blob/master/en/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md](https://github.com/ruby/www.ruby-lang.org/blob/master/en/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md) to ja. --- ...2021-11-09-ruby-3-1-0-preview1-released.md | 210 ++++++++++++++++++ 1 file changed, 210 insertions(+) create mode 100644 ja/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md diff --git a/ja/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md b/ja/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md new file mode 100644 index 0000000000..bcd1ca2733 --- /dev/null +++ b/ja/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md @@ -0,0 +1,210 @@ +--- +layout: news_post +title: "Ruby 3.1.0 Preview 1 リリース" +author: "naruse" +translator: "jinroq" +date: 2021-11-09 00:00:00 +0000 +lang: ja +--- + +Ruby 3.1 に向けてフィードバックを得るためのリリースである、Ruby 3.1.0-preview1 が公開されました。 + +{% assign release = site.data.releases | where: "version", "3.1.0-preview1" | first %} + +## YJIT: 新しいインプロセス JIT コンパイラ (experimental) + +Ruby 3.1 には、Shopify 社が開発した新しいインプロセス JIT コンパイラである YJIT をマージしています。 + +[2018 年に Ruby 2.6 が MJIT を導入](https://www.ruby-lang.org/en/news/2018/12/25/ruby-2-6-0-released/)して以降、パフォーマンスは大幅に向上し、ついに[昨年 Ruby3x3 を達成しました](https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/)。しかし、この JIT は Optcarrot では目覚ましい速度改善を示したものの、実世界のプロダクトで運用するには厳しいものでした。 + +近年 Shopify 社は Rails アプリケーションを高速化するために Ruby へ多くの改善をしてくれました。その中でも YJIT は重要な貢献であり、また、Rails アプリケーションのパフォーマンス向上を目的としています。 + +MJIT はメソッドベースの JIT コンパイラであり、外部 C コンパイラを使用します。一方、YJIT は Basic Block Versioning を使用し、その中に JIT コンパイラを含みます。 Lazy Basic Block Versioning(LBBV)では、最初にメソッドの先頭をコンパイルし、引数と変数の型が動的に決定されると、残りをインクリメンタルにコンパイルします。詳細な概要については [YJIT: a basic block versioning JIT compiler for CRuby](https://dl.acm.org/doi/10.1145/3486606.3486781) を参照してください。 + +この技術により、YJIT は実世界の多くのプロダクトで高速な起動時間とパフォーマンス向上の両方を実現しています。railsbench 上で 22%、liquid-render 上で 39% の改善を実現しています。 + + + +YJIT はまだ実験的な機能であるため、デフォルトでは無効になっています。使用するにはコマンドラインオプション `--yjit` を指定して YJIT を有効にします。また YJIT が仕様できる環境は、現時点では x86-64 プラットフォーム搭載の macOS および Linux に限定されています。 + +* [https://bugs.ruby-lang.org/issues/18229](https://bugs.ruby-lang.org/issues/18229) +* [https://shopify.engineering/yjit-just-in-time-compiler-cruby](https://shopify.engineering/yjit-just-in-time-compiler-cruby) +* [https://www.youtube.com/watch?v=PBVLf3yfMs8](https://www.youtube.com/watch?v=PBVLf3yfMs8) + +## debug gem: 新しいデバッガ + +新しいデバッガ [debug.gem](https://github.com/ruby/debug) がバンドルされています。 debug.gem は高速なデバッガであり、リモートデバッグ、色付き REPL、IDE integration(VSCode)など多くの機能を提供します。これは標準添付ライブラリの `lib/debug.rb` に置き換えられます。 + +## error_highlight: バックトレース内でさらに詳細なエラー箇所を示す機能 + +組み込み gem である error_highlight が導入されました。バックトレース内でさらに詳細なエラー箇所を示すことができます: + +``` +$ ruby test.rb +test.rb:1:in `
': undefined method `time' for 1:Integer (NoMethodError) + +1.time {} + ^^^^^ +Did you mean? times +``` + +この gem はデフォルトで有効になっています。コマンドラインオプション `--disable-error_highlight` を使用して無効にできます。詳細は[リポジトリ](https://github.com/ruby/error_highlight)を参照してください。 + +## Irb の改善 + +次の preview 版で説明します。 + +## その他の主要な新機能 + +### 言語仕様 + +* ハッシュリテラルとキーワード引数の値は省略できます [Feature #14579] + * `{x:, y:}` は `{x: x, y: y}` の糖衣構文です + * `foo(x:, y:)` は `foo(x: x, y: y)` の糖衣構文です + +* パターンマッチングのピン演算子が式を受け取るようになりました [Feature #17411] + +```ruby +Prime.each_cons(2).lazy.find_all{_1 in [n, ^(n + 2)]}.take(3).to_a +#=> [[3, 5], [5, 7], [11, 13]] +``` + +### RBS + +RBS は Ruby プログラムの構造を記述するための言語です。詳細は[リポジトリ](https://github.com/ruby/rbs)を参照してください。 + +Ruby 3.0.0 からの変更点: + +* gem の RBS を管理する `rbs collection` が導入されています [[doc]](https://github.com/ruby/rbs/blob/master/docs/collection.md) +* 組み込みライブラリおよび標準添付ライブラリの多くのシグネチャが追加/更新されています +* 多くのバグ修正とパフォーマンスの改善も含まれています + +詳細は [CHANGELOG.md](https://github.com/ruby/rbs/blob/master/CHANGELOG.md) を参照してください。 + +### TypeProf + +TypeProf は Ruby の静的型解析器です。型注釈のない Ruby コードから RBS のプロトタイプを生成します。詳細は[ドキュメント](https://github.com/ruby/typeprof/blob/master/doc/doc.md)を参照してください。 + +Ruby 3.0.0 からの変更点: + +* [IDE サポート](https://github.com/ruby/typeprof/blob/master/doc/ide.md)が実装されました (Experimental) +* 多くのバグ修正とパフォーマンスの改善も含まれています + +## パフォーマンスの改善 + +* MJIT + * Rails のようなワークロードのために、`--jit-max-cache` のデフォルト値を 100 から 10000 に変更しています。 + JIT コンパイラは 1000 命令列長より長いメソッドのコンパイルをスキップしなくなりました + * Rails の Zeitwerk モードをサポートするために、クラスイベントで TracePoint が有効になっている場合に JIT コンパイルされたコードをキャンセルしなくなりました + +## その他の注目すべき 3.0 からの変更点 + +* 1 行パターンマッチ(例: `ary => [x, y, z]`)が experimental ではなくなりました +* 多重代入の評価順序が若干変更されました [[Bug #4443]](https://bugs.ruby-lang.org/issues/4443) + * Ruby 3.0では `foo[0], bar[0] = baz, qux` は `baz`, `qux`,`foo`, `bar` の順に評価されていました。Ruby 3.1 からは `foo`,`bar`, `baz`,`qux` の順に評価されるようになります +* 文字列の可変幅割り当て (experimental) [[Bug #18239]](https://bugs.ruby-lang.org/issues/18239) + +### 標準添付ライブラリの更新 + +* いくつかの標準添付ライブラリが更新されています + * RubyGems + * Bundler + * RDoc 6.4.0 + * ReLine + * JSON 2.6.0 + * Psych 4.0.2 + * FileUtils 1.6.0 + * Fiddle + * StringIO 3.0.1 + * IO::Console 0.5.9 + * IO::Wait 0.2.0 + * CSV + * Etc 1.3.0 + * Date 3.2.0 + * Zlib 2.1.1 + * StringScanner + * IpAddr + * Logger 1.4.4 + * OStruct 0.5.0 + * Irb + * Racc 1.6.0 + * Delegate 0.2.0 + * Benchmark 0.2.0 + * CGI 0.3.0 + * Readline(C-ext) 0.1.3 + * Timeout 0.2.0 + * YAML 0.2.0 + * URI 0.11.0 + * OpenSSL + * DidYouMean + * Weakref 0.1.1 + * Tempfile 0.1.2 + * TmpDir 0.1.2 + * English 0.7.1 + * Net::Protocol 0.1.2 + * Net::Http 0.2.0 + * BigDecimal + * OptionParser 0.2.0 + * Set + * Find 0.1.1 + * Rinda 0.1.1 + * Erb + * NKF 0.1.1 + * Base64 0.1.1 + * OpenUri 0.2.0 + * SecureRandom 0.1.1 + * Resolv 0.2.1 + * Resolv::Replace 0.1.0 + * Time 0.2.0 + * PP 0.2.1 + * Prettyprint 0.1.1 + * Drb 2.1.0 + * Pathname 0.2.0 + * Digest 3.1.0.pre2 + * Un 0.2.0 +* 以下のバンドルされた gems が更新されています + * minitest 5.14.4 + * power_assert 2.0.1 + * rake 13.0.6 + * test-unit 3.5.0 + * rbs 1.6.2 + * typeprof 0.20.0 +* 以下のデフォルト gems がバンドルされた gem になりました + * net-ftp + * net-imap + * net-pop + * net-smtp + * matrix + * prime + +詳細は [NEWS](https://github.com/ruby/ruby/blob/{{ release.tag }}/NEWS.md) か [commit logs](https://github.com/ruby/ruby/compare/v3_0_0...{{ release.tag }}) を参照してください。 + +なお、こうした変更により、Ruby 3.0.0 以降では [{{ release.stats.files_changed }} 個のファイルに変更が加えられ、 {{ release.stats.insertions }} 行の追加と {{ release.stats.deletions }} 行の削除が行われました](https://github.com/ruby/ruby/compare/v3_0_0...{{ release.tag }}#file_bucket)! + +## ダウンロード + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Ruby とは + +Ruby はまつもとゆきひろ(Matz)によって 1993 年に開発が始められ、今もオープンソースソフトウェアとして開発が続けられています。 +Ruby は様々なプラットフォームで動き、世界中で、特に Web アプリケーション開発のために使われています。 From cd5d083f793f69db198d73e21f07cc910bcd9d4a Mon Sep 17 00:00:00 2001 From: jinroq <2787780+jinroq@users.noreply.github.com> Date: Fri, 26 Nov 2021 21:26:16 +0900 Subject: [PATCH 0494/1487] Fixed a bug Fixed a bug that disturbed `release.version` from being displayed. --- ja/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ja/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md b/ja/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md index bcd1ca2733..125aed23f2 100644 --- a/ja/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md +++ b/ja/news/_posts/2021-11-09-ruby-3-1-0-preview1-released.md @@ -7,10 +7,10 @@ date: 2021-11-09 00:00:00 +0000 lang: ja --- -Ruby 3.1 に向けてフィードバックを得るためのリリースである、Ruby 3.1.0-preview1 が公開されました。 - {% assign release = site.data.releases | where: "version", "3.1.0-preview1" | first %} +Ruby 3.1 に向けてフィードバックを得るためのリリースである、Ruby {{ release.version }} が公開されました。 + ## YJIT: 新しいインプロセス JIT コンパイラ (experimental) Ruby 3.1 には、Shopify 社が開発した新しいインプロセス JIT コンパイラである YJIT をマージしています。 From 36bbdaa59d6a658c4bdcf51ab8575e0da8b070fe Mon Sep 17 00:00:00 2001 From: jinroq <2787780+jinroq@users.noreply.github.com> Date: Fri, 3 Dec 2021 17:06:26 +0900 Subject: [PATCH 0495/1487] Removed unnecessary English text. --- ...1-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/ja/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md b/ja/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md index b6712c7c3f..6414233097 100644 --- a/ja/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md +++ b/ja/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md @@ -8,9 +8,6 @@ tags: security lang: ja --- -A buffer overrun vulnerability was discovered in CGI.escape_html. -This vulnerability has been assigned the CVE identifier [CVE-2021-41816](https://nvd.nist.gov/vuln/detail/CVE-2021-41816). -We strongly recommend upgrading Ruby. CGI.escape_html 内のバッファオーバーランの脆弱性が発見されました。 この脆弱性は、[CVE-2021-41816](https://nvd.nist.gov/vuln/detail/CVE-2021-41816)として登録されています。 Ruby をアップグレードすることを強く推奨します。 From b9a2cab013eaeac40e2295b92485b2a7b6b0d350 Mon Sep 17 00:00:00 2001 From: jinroq <2787780+jinroq@users.noreply.github.com> Date: Fri, 26 Nov 2021 15:21:54 +0900 Subject: [PATCH 0496/1487] Translate "CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP" (ja) Translate [https://github.com/ruby/www.ruby-lang.org/blob/master/en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md](https://github.com/ruby/www.ruby-lang.org/blob/master/en/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md) to ja. --- ...21-07-07-starttls-stripping-in-net-imap.md | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 ja/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md diff --git a/ja/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md b/ja/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md new file mode 100644 index 0000000000..6d2f0d0343 --- /dev/null +++ b/ja/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md @@ -0,0 +1,34 @@ +--- +layout: news_post +title: "CVE-2021-32066: Net::IMAP 内の StartTLS ストリッピングの脆弱性について" +author: "shugo" +translator: "jinroq" +date: 2021-07-07 09:00:00 +0000 +tags: security +lang: ja +--- + +Net::IMAP 内の StartTLS ストリッピングに脆弱性が発見されました。 +この脆弱性は [CVE-2021-32066](https://nvd.nist.gov/vuln/detail/CVE-2021-32066) として登録されています。 +Ruby をアップグレードすることを強く推奨します。 + +net-imap は Ruby 3.0.1 の デフォルト gem ですが、パッケージ化の問題があるため、Ruby 自体をアップグレードしてください。 + +## 詳細 + +Net::IMAP は、StartTLS が不明な応答で失敗した場合に例外を発生させません。これにより、中間者攻撃者がクライアントとレジストリ間のネットワークの場所を利用して StartTLS コマンドをブロックできる可能性があります。つまり、中間者攻撃者が TLS 保護をバイパスできる可能性があります。 +これは「StartTLS ストリッピング攻撃」とも呼ばれています。 + +## 影響を受けるバージョン + +* Ruby 2.6 系列: 2.6.7 およびそれ以前のバージョン +* Ruby 2.7 系列: 2.7.3 およびそれ以前のバージョン +* Ruby 3.0 系列: 3.0.1 およびそれ以前のバージョン + +## クレジット + +この脆弱性情報は、[Alexandr Savca](https://hackerone.com/chinarulezzz) 氏によって報告されました。 + +## 更新履歴 + +* 2021-07-07 18:00:00 (JST) 初版 From 0e5e25f8e1e46d121cc14b0936a835696d9db50f Mon Sep 17 00:00:00 2001 From: jinroq <2787780+jinroq@users.noreply.github.com> Date: Fri, 26 Nov 2021 16:04:13 +0900 Subject: [PATCH 0497/1487] Translate "CVE-2021-28965: XML round-trip vulnerability in REXML" (ja) Translate [https://github.com/ruby/www.ruby-lang.org/blob/master/en/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md](https://github.com/ruby/www.ruby-lang.org/blob/master/en/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md) to ja. --- ...p-vulnerability-in-rexml-cve-2021-28965.md | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 ja/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md diff --git a/ja/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md b/ja/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md new file mode 100644 index 0000000000..65589d9ebe --- /dev/null +++ b/ja/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md @@ -0,0 +1,47 @@ +--- +layout: news_post +title: "CVE-2021-28965: REXML 内の XML ラウンドトリップの脆弱性について" +author: "mame" +translator: "jinroq" +date: 2021-04-05 12:00:00 +0000 +tags: security +lang: ja +--- + +Ruby にバンドルされている REXML gem 内の XML ラウンドトリップに脆弱性が発見されました。 +この脆弱性は [CVE-2021-28965](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-28965) として登録されています。 +REXML gem をアップグレードすることを強く推奨します。 + +## 詳細 + +加工された XML ドキュメントをパーシングおよびシリアル化する場合、REXML gem(Ruby にバンドルされているものを含む)は、元のドキュメントとは構造が異なる誤った XML ドキュメントを生成する可能性があります。 +この問題の影響はコンテキストによって大きく異なりますが、REXML を使用している一部のプログラムでは脆弱性が生じる可能性があります。 + +REXML gem をバージョン 3.2.5 以降に更新してください。 + +Ruby 2.6 以降を使用している場合: + +* Ruby 2.6.7、2.7.3、もしくは 3.0.1 を使ってください +* または `gem update rexml` で更新することもできます。bundler を使用している場合は、`Gemfile` に `gem "rexml", ">= 3.2.5"` を追加してください + +Ruby 2.5.8 以前を使用している場合: + +* Ruby 2.5.9 を使ってください +* Ruby 2.5.8 以前では `gem update rexml` を実行できません +* Ruby 2.5 系列は現在 EOL であるため、Ruby を 2.6.7 以降に可能な限り早く更新することを検討してください + +## 影響を受けるバージョン + +* Ruby​​ 2.5.8 以前(このバージョンでは `gem update rexml` を実行できません。) +* Ruby​​ 2.6.6 以前 +* Ruby​​ 2.7.2 以前 +* Ruby​​ 3.0.0 +* REXML gem 3.2.4 以前 + +## クレジット + +この脆弱性情報は [Juho Nurminen](https://hackerone.com/jupenur) 氏によって報告されました。 + +## 更新履歴 + +* 2021-04-05 21:00:00 (JST) 初版 From 70f0285ff7ba3b5708f431ef92dab669f939d023 Mon Sep 17 00:00:00 2001 From: jinroq <2787780+jinroq@users.noreply.github.com> Date: Fri, 26 Nov 2021 16:52:26 +0900 Subject: [PATCH 0498/1487] Translate "CVE-2021-28966: Path traversal in Tempfile on Windows" (ja) Translate [https://github.com/ruby/www.ruby-lang.org/blob/master/en/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md](https://github.com/ruby/www.ruby-lang.org/blob/master/en/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md) to ja. --- ...ath-traversal-on-windows-cve-2021-28966.md | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 ja/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md diff --git a/ja/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md b/ja/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md new file mode 100644 index 0000000000..95321df7ee --- /dev/null +++ b/ja/news/_posts/2021-04-05-tempfile-path-traversal-on-windows-cve-2021-28966.md @@ -0,0 +1,36 @@ +--- +layout: news_post +title: "CVE-2021-28966: Windows 版 Tempfile 内のパストラバーサルについて" +author: "mame" +translator: "jinroq" +date: 2021-04-05 12:00:00 +0000 +tags: security +lang: ja +--- + +Windows 版 Ruby にバンドルされている tmpdir ライブラリには、意図しないディレクトリを作成してしまう脆弱性が発見されました。 +また、Windows 版 Ruby にバンドルされている tempfile ライブラリは、内部で tmpdir を使用しているため同様の脆弱性があります。 +この脆弱性は [CVE-2021-28966](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-28966) として登録されています。 + +## 詳細 + +tmpdir ライブラリで導入された `Dir.mktmpdir` メソッドは、第一引数に作成するディレクトリ名のプレフィックスとサフィックスを受け取ることができます。 +プレフィックスには相対ディレクトリ指定子 `"..\\"` を含めることができるため、このメソッドは任意のディレクトリを対象にすることができます。 +したがって、スクリプトが外部入力をプレフィックスとして受け取り、対象のディレクトリに不適切なアクセス許可がある、もしくは、ruby プロセスに不適切な権限がある場合に、攻撃者は任意のディレクトリに対してディレクトリやファイルを作成することができます。 + +同じ脆弱性が [CVE-2018-6914](https://www.ruby-lang.org/en/news/2018/03/28/unintentional-file-and-directory-creation-with-directory-traversal-cve-2018-6914/) として登録されていますが、Windows 版の対応が不十分でした。 + +影響を受けるバージョンの Ruby を利用している全ユーザーは、すぐにアップグレードする必要があります。 + +## 影響を受けるバージョン + +* Ruby 2.7.2 以前 +* Ruby 3.0.0 + +## クレジット + +この脆弱性情報は [Bugdiscloseguys](https://hackerone.com/bugdiscloseguys) 氏によって報告されました。 + +## 更新履歴 + +* 2021-04-05 21:00:00 (JST) 初版 From a6169206b4d5b1cad122b3225396e07ccc1ce542 Mon Sep 17 00:00:00 2001 From: jinroq <2787780+jinroq@users.noreply.github.com> Date: Fri, 26 Nov 2021 18:23:23 +0900 Subject: [PATCH 0499/1487] Translate "CVE-2020-25613: Potential HTTP Request Smuggling Vulnerability in WEBrick" (ja) Translate [https://github.com/ruby/www.ruby-lang.org/blob/master/en/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md](https://github.com/ruby/www.ruby-lang.org/blob/master/en/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md) to ja. --- ...9-http-request-smuggling-cve-2020-25613.md | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 ja/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md diff --git a/ja/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md b/ja/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md new file mode 100644 index 0000000000..bc0fdc11fe --- /dev/null +++ b/ja/news/_posts/2020-09-29-http-request-smuggling-cve-2020-25613.md @@ -0,0 +1,38 @@ +--- +layout: news_post +title: "CVE-2020-25613: WEBrick 内の潜在的な HTTP リクエストスマグリングの脆弱性について " +author: "mame" +translator: "jinroq" +date: 2020-09-29 06:30:00 +0000 +tags: security +lang: ja +--- + +WEBrick 内で潜在的な HTTP リクエストスマグリングの脆弱性が発見されました。 +この脆弱性は [CVE-2020-25613](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-25613) として登録されています。 +webrick gem をアップグレードすることを強く推奨します。 + +## 詳細 + +WEBrick は、無効な Transfer-Encoding ヘッダーに対して寛容すぎました。 +これは WEBrick と一部の HTTP プロキシサーバー間で一貫性のない解釈が発生し、攻撃者が HTTP リクエストを”スマグリング(smuggle)”する可能性があります。 +詳細は [CWE-444](https://cwe.mitre.org/data/definitions/444.html) を参照してください。 + +webric gem を 1.6.1 以降に更新してください。 +`gem update webrick` を実行すれば更新できます。 +bundler を使用している場合は、`Gemfile` に `gem "webrick", ">= 1.6.1"` を追加してください。 + +## 影響を受けるバージョン + +* webrick gem 1.6.0 以前 +* Ruby 2.7.1 以前のバージョンでバンドルされた webrick +* Ruby 2.6.6 以前のバージョンでバンドルされた webrick +* Ruby 2.5.8 以前のバージョンでバンドルされた webrick + +## クレジット + +この脆弱性情報は [piao](https://hackerone.com/piao) 氏によって報告されました。 + +## 更新履歴 + +* 2020-09-29 15:30:00 (JST) 初版 From 0771b94d4a43f2caf6afe0d6b2d6cd8632afb1b4 Mon Sep 17 00:00:00 2001 From: jinroq <2787780+jinroq@users.noreply.github.com> Date: Sat, 27 Nov 2021 18:50:14 +0900 Subject: [PATCH 0500/1487] Translate "Dispute of Vulnerability CVE-2014-2734" (ja) Translate [https://github.com/ruby/www.ruby-lang.org/blob/master/en/news/_posts/2014-05-09-dispute-of-vulnerability-cve-2014-2734.md](https://github.com/ruby/www.ruby-lang.org/blob/master/en/news/_posts/2014-05-09-dispute-of-vulnerability-cve-2014-2734.md) to ja. --- ...-dispute-of-vulnerability-cve-2014-2734.md | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 ja/news/_posts/2014-05-09-dispute-of-vulnerability-cve-2014-2734.md diff --git a/ja/news/_posts/2014-05-09-dispute-of-vulnerability-cve-2014-2734.md b/ja/news/_posts/2014-05-09-dispute-of-vulnerability-cve-2014-2734.md new file mode 100644 index 0000000000..4fab485093 --- /dev/null +++ b/ja/news/_posts/2014-05-09-dispute-of-vulnerability-cve-2014-2734.md @@ -0,0 +1,75 @@ +--- +layout: news_post +title: "脆弱性 CVE-2014-2734 の争点について" +author: "emboss" +translator: "jinroq" +date: 2014-05-09 05:33:54 +0000 +tags: security +lang: ja +--- + +[CVE-2014-2734](http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-2734) として登録されている脆弱性について、「Ruby でも起こりうるのではないか」という報告を受けました。 +結論から書くと、以下に記載する詳細な分析の結果、Ruby に脆弱性があるとは**考えていません**。 + +この脆弱性により、攻撃者は証明書の署名を変更して任意のルート証明書を偽造し、証明書のオリジナルの秘密鍵を攻撃者が選択した秘密鍵に都合よく置き換える可能性があります。 + +## コンセプトの実証 + +以下は CVE-2014-2734 の分析です。オリジナルの PoC を縮小させることができました。これはコンセプトの実証の本質を捉えていると考えられます。 + +{% highlight ruby %} +require 'openssl' + +forge_key = OpenSSL::PKey::RSA.new(2048) +raw_certificate = File.read("arbitrary.cer") +cert = OpenSSL::X509::Certificate.new(raw_certificate) +resigned_cert = cert.sign(spoof, OpenSSL::Digest::SHA1.new) + +resigned_cert.verify(key) #=> true +{% endhighlight %} + +`X509Certificate#verify` が `true` を返してくることに驚くかもしれません。 +オリジナルの証明書には `forge_key` の公開鍵とは異なるオリジナルの公開鍵を指す[サブジェクト公開鍵情報](http://tools.ietf.org/html/rfc5280#section-4.1.2.7)が含まれている場合があります。 +証明書の再署名に使用された公開鍵と秘密鍵のペアは、サブジェクト公開鍵情報で参照されているオリジナルの公開鍵と明らかに一致しなくなりました。 +どうして `#verify` は ` true` を返すのでしょうか? + +### 鍵の検証方法 + +`X509Certificate#verify` は OpenSSL の[`X509_verify`](https://github.com/openssl/openssl/blob/master/crypto/x509/x_all.c#L74) 関数を利用しています(内部的には [`ASN1_item_verify`](https://github.com/openssl/openssl/blob/master/crypto/asn1/a_verify.c#L134) 関数を呼び出しています)。 +これらの関数は、提示された公開鍵を指定して署名の有効性を確立します。 +ところが、指定された鍵が証明書で参照されているサブジェクト公開鍵と実際に一致するかどうかは**検証されません**。 +これは、このシナリオでは「`X509Certificate#verify` の期待する振る舞いは `true` を返すこと」を意味します。 +このチェックを省略しても、総体的に X.509 信頼モデルのセキュリティに大きな影響はありません。 + +RFC 5280 の 4.1.1.3 項は、CA が証明書に含まれる情報の正確さを「証明書の署名を計算すること」で確認すると明記しています。 +上記のサンプルコードはこの原則に違反していますが、セキュリティを脅かすものではありません。 + +## 潜在的なリスク + +2 通り考えられます: + +### ルート証明書の再署名 + +ユーザーとして、私たちは無条件にルート証明書を信頼します。 +有効なな情報が含まれていない場合でも、公的に認められたルート証明書であるというステータスだけで、それらを元の状態に保つことができます。 +たとえば、OpenSSL 自体は同様の理由からデフォルトで自己署名ルート証明書の署名をチェックしません。 + +参考: [X509_V_FLAG_CHECK_SS_SIGNATURE documentation](https://www.openssl.org/docs/crypto/X509_VERIFY_PARAM_set_flags.html) + +再署名されたルート証明書は事実上の「自己署名」証明書になります(ただし、サブジェクト公開鍵情報は正しくありません)。 +これは正常な自己署名ルート証明書より危険ではありません。 +事実、署名がなければ、有効なルート証明書と完全に一致する可能性のある自己署名ルート証明書は誰でも作成できます。 +私たちは所有するだけでルート証明書を信頼するため、クライアントの「このルート証明書は信頼する」という積極的な同意がない限り、詐欺まがいな証明書に意味はありません。 + +### 中間証明書またはリーフ証明書の再署名 + +非ルート証明書の再署名もまた X.509 信頼モデルのセキュリティを脅かすものではありません。 +通常はこのような種類の証明書をあらかじめ所有していない限り、[パス検証手続き](http://tools.ietf.org/html/rfc5280#section-6)中にこのような偽装は検出されます。 +ここで、非ルート証明書の署名は、発行する証明書の公開鍵を使用して検証されます。 +証明書チェーンのある時点で、偽造は最終的に無効な証明書署名値という形で検出されます。 + +## まとめ + +結論として、`X509Certificate#verify` は期待どおりに動作すると考えています。 +私たち以外の誰かも自力で[同じ結論](https://github.com/adrienthebo/cve-2014-2734/)に行き着いたため、CVE-2014-2734 に異議を唱え、その取り消しを求めました。 +[オリジナルのコンセプトの実証](https://gist.github.com/emboss/91696b56cd227c8a0c13)は、コメントを含め、完全な分析結果として閲覧することができます。 From 45ecaadb25d8ea1460c51471750c22f227ea99f5 Mon Sep 17 00:00:00 2001 From: jinroq <2787780+jinroq@users.noreply.github.com> Date: Mon, 29 Nov 2021 00:05:49 +0900 Subject: [PATCH 0501/1487] Translate "OpenSSL Severe Vulnerability in TLS Heartbeat Extension (CVE-2014-0160)" (ja) Translate [https://github.com/ruby/www.ruby-lang.org/blob/master/en/news/_posts/2014-04-10-severe-openssl-vulnerability.md](https://github.com/ruby/www.ruby-lang.org/blob/master/en/news/_posts/2014-04-10-severe-openssl-vulnerability.md) to ja. --- ...2014-04-10-severe-openssl-vulnerability.md | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 ja/news/_posts/2014-04-10-severe-openssl-vulnerability.md diff --git a/ja/news/_posts/2014-04-10-severe-openssl-vulnerability.md b/ja/news/_posts/2014-04-10-severe-openssl-vulnerability.md new file mode 100644 index 0000000000..98c992bfe7 --- /dev/null +++ b/ja/news/_posts/2014-04-10-severe-openssl-vulnerability.md @@ -0,0 +1,59 @@ +--- +layout: news_post +title: "OpenSSL の TLS ハートビート拡張による重大な脆弱性について(CVE-2014-0160)" +author: "hone and zzak" +translator: "jinroq" +date: 2014-04-10 01:04:27 +0000 +tags: security +lang: ja +--- + +OpenSSL の TLS/DTLS(トランスポート層セキュアプロトコル)ハートビート拡張(`RFC6520`)の実装で重大な脆弱性が発見されました。 +この脆弱性は [CVE-2014-0160](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-0160) として登録されています。 + +サーバーからクライアントへ、およびクライアントからサーバーへのメモリの内容を利己的に開示される可能性があります。 +攻撃者は、SSL 暗号化に使用される秘密鍵や認証トークンなどを含む機密データをメモリから遠隔操作によって取得できます。 + +詳細は [heartbleed.com](http://heartbleed.com) を参照してください. + +## Ruby の影響範囲 + +Ruby は、標準添付ライブラリ OpenSSL の C 拡張機能を介した脆弱な OpenSSL のバージョンに対して静的コンパイルをされると影響を受けます。 + +バージョン 1.0.1 以上 1.0.1f 以下の OpenSSL がこの攻撃に対して脆弱です。 +Ruby にリンクしている OpenSSL ライブラリのバージョンを検証するには、以下を実行してください。 + +{% highlight sh %} +ruby -v -ropenssl -rfiddle -e 'puts Fiddle::Function.new(Fiddle.dlopen(nil)["SSLeay_version"], [Fiddle::TYPE_INT], Fiddle::TYPE_VOIDP).call(0)' +{% endhighlight %} + +Ruby を使って現在インストールされている OpenSSL のバージョンを確認するには、以下を実行してください。 + +{% highlight sh %} +ruby -ropenssl -e 'puts OpenSSL::OPENSSL_VERSION' +{% endhighlight %} + +[emboss のスクリプト](https://github.com/emboss/heartbeat)を使ってクライアントソフトウェア、または実行中のサービスが脆弱かどうかを確認できます。 + +## 解決策 + +最新版である OpenSSL バージョン `1.0.1g` もしくはそれ以降にアップグレードする必要があります。そのためには最新の OpenSSL が提供されているかを現在使っている OS パッケージ管理システムで確認する必要があります。 +利用可能なバージョン番号に関係なく、その OpenSSL のバージョンにパッチが適用されているかを確認するために、OS ディストリビューターに相談する必要があるかもしれません。 + +アップグレードがオプションではない場合、ビルド時に `-DOPENSSL_NO_HEARTBEATS` オプションを付け、パッチが適用されている OpenSSL を再コンパイルします。 + +アプグレードされている OpenSSL を使っているなら、脆弱なバージョンの OpenSSL へのリンクがないことを確認している Ruby を再コンパイルすることを推奨します。 + +これは、RVM や ruby-build のような Ruby をビルドするために使うツールを更新することを意味します。 +Ruby を自分でビルドする場合は、コンパイル時にアップグレードされた OpenSSL をインストールしているディレクトリにリンクするよう `--with-openssl-dir` オプションを使用してください。。 + +{% highlight sh %} +$ ./configure --with-openssl-dir=/path/to/openssl +$ make +$ make install +{% endhighlight %} + +OpenSSL と Ruby をアップグレードした後、脆弱なバージョンを使っている全てのプログラムを再起動することが重要です。 + +多くの OS ディストリビューションは、この攻撃に脆弱であるライブラリに対し、パッチを適用したバージョンと再構築されたパッケージをすでに提供しています(もしくは間もなく提供する予定です)。 +安全性を確保するために、OS ディストリビューターを監視することが重要です。 From 1951efd3308b9371d282d0c300e855a61fbe2177 Mon Sep 17 00:00:00 2001 From: jinroq <2787780+jinroq@users.noreply.github.com> Date: Sat, 4 Dec 2021 07:46:18 +0900 Subject: [PATCH 0502/1487] Revised in the review. --- ja/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ja/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md b/ja/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md index 6d2f0d0343..ca45ac42cd 100644 --- a/ja/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md +++ b/ja/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md @@ -12,7 +12,7 @@ Net::IMAP 内の StartTLS ストリッピングに脆弱性が発見されまし この脆弱性は [CVE-2021-32066](https://nvd.nist.gov/vuln/detail/CVE-2021-32066) として登録されています。 Ruby をアップグレードすることを強く推奨します。 -net-imap は Ruby 3.0.1 の デフォルト gem ですが、パッケージ化の問題があるため、Ruby 自体をアップグレードしてください。 +net-imap は Ruby 3.0.1 の デフォルト gem ですが、パッケージ化に問題があるため、Ruby 自体をアップグレードしてください。 ## 詳細 From 39180f8bf65f45aa3bdd132bdbeed34f7a14a73d Mon Sep 17 00:00:00 2001 From: jinroq <2787780+jinroq@users.noreply.github.com> Date: Sat, 4 Dec 2021 08:08:16 +0900 Subject: [PATCH 0503/1487] Revised in the review. --- ja/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ja/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md b/ja/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md index ca45ac42cd..0a54c65239 100644 --- a/ja/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md +++ b/ja/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md @@ -16,7 +16,7 @@ net-imap は Ruby 3.0.1 の デフォルト gem ですが、パッケージ化 ## 詳細 -Net::IMAP は、StartTLS が不明な応答で失敗した場合に例外を発生させません。これにより、中間者攻撃者がクライアントとレジストリ間のネットワークの場所を利用して StartTLS コマンドをブロックできる可能性があります。つまり、中間者攻撃者が TLS 保護をバイパスできる可能性があります。 +Net::IMAP は、StartTLS が不明な応答で失敗した場合に例外を発生させません。これにより、中間者攻撃者がクライアントとレジストリ間のネットワーク位置を利用して StartTLS コマンドをブロックし、結果として、中間者攻撃者が TLS 保護をバイパスできる可能性があります。 これは「StartTLS ストリッピング攻撃」とも呼ばれています。 ## 影響を受けるバージョン From c9dea54abfe645b9203e4b20003e082a95015e8b Mon Sep 17 00:00:00 2001 From: jinroq <2787780+jinroq@users.noreply.github.com> Date: Sat, 4 Dec 2021 21:36:05 +0900 Subject: [PATCH 0504/1487] Polished sentences. --- ...-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ja/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md b/ja/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md index 65589d9ebe..db1112833a 100644 --- a/ja/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md +++ b/ja/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md @@ -1,6 +1,6 @@ --- layout: news_post -title: "CVE-2021-28965: REXML 内の XML ラウンドトリップの脆弱性について" +title: "CVE-2021-28965: REXML 内の XML ラウンドトリップ脆弱性について" author: "mame" translator: "jinroq" date: 2021-04-05 12:00:00 +0000 @@ -8,13 +8,13 @@ tags: security lang: ja --- -Ruby にバンドルされている REXML gem 内の XML ラウンドトリップに脆弱性が発見されました。 +Ruby にバンドルされている REXML gem 内の XML ラウンドトリップ脆弱性が発見されました。 この脆弱性は [CVE-2021-28965](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-28965) として登録されています。 REXML gem をアップグレードすることを強く推奨します。 ## 詳細 -加工された XML ドキュメントをパーシングおよびシリアル化する場合、REXML gem(Ruby にバンドルされているものを含む)は、元のドキュメントとは構造が異なる誤った XML ドキュメントを生成する可能性があります。 +特定の加工が施された XML ドキュメントをパーシングおよびシリアル化する場合、REXML gem(Ruby にバンドルされているものを含む)は、元のドキュメントとは構造が異なる誤った XML ドキュメントを生成する可能性があります。 この問題の影響はコンテキストによって大きく異なりますが、REXML を使用している一部のプログラムでは脆弱性が生じる可能性があります。 REXML gem をバージョン 3.2.5 以降に更新してください。 From 178e4af80f26aabe7cc3edf365dc395994338616 Mon Sep 17 00:00:00 2001 From: jinroq <2787780+jinroq@users.noreply.github.com> Date: Mon, 6 Dec 2021 12:07:14 +0900 Subject: [PATCH 0505/1487] Revised points made in reviews. Revised the points made in [this comment](https://github.com/ruby/www.ruby-lang.org/pull/2747). --- ...4-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ja/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md b/ja/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md index db1112833a..a30f112f91 100644 --- a/ja/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md +++ b/ja/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md @@ -8,7 +8,7 @@ tags: security lang: ja --- -Ruby にバンドルされている REXML gem 内の XML ラウンドトリップ脆弱性が発見されました。 +Ruby にバンドルされている REXML gem に XML ラウンドトリップ脆弱性が発見されました。 この脆弱性は [CVE-2021-28965](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-28965) として登録されています。 REXML gem をアップグレードすることを強く推奨します。 From 93192c190415158183f702a6fcad0838dc975568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20T=C3=A1mara=20Pati=C3=B1o?= Date: Mon, 6 Dec 2021 14:35:10 -0500 Subject: [PATCH 0506/1487] Translation of CVE-2021-41817 to spanish (#2758) * Translation of CVE-2021-41817 to spanish * No blank line at end * Update es/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md Co-authored-by: Gustavo Villa * Update es/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md Co-authored-by: Gustavo Villa * Update es/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md Co-authored-by: Gustavo Villa * Update es/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md Co-authored-by: Gustavo Villa * Update es/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md Co-authored-by: Gustavo Villa * Update es/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md Co-authored-by: Gustavo Villa * Update es/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md Co-authored-by: Gustavo Villa * Update es/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md Co-authored-by: Gustavo Villa Co-authored-by: Gustavo Villa --- ...p-vulnerability-in-rexml-cve-2021-28965.md | 2 +- ...arsing-method-regexp-dos-cve-2021-41817.md | 57 +++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 es/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md diff --git a/es/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md b/es/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md index fcc342219d..325205277b 100644 --- a/es/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md +++ b/es/news/_posts/2021-04-05-xml-round-trip-vulnerability-in-rexml-cve-2021-28965.md @@ -41,7 +41,7 @@ posterior tan pronto como sea posible. ## Versiones afectadas -* Ruby 2.5.8 o anterior (NO podrá usar `gem upgrade rexml` +* Ruby 2.5.8 o anterior (NO podrá usar `gem update rexml` con estas versiones.) * Ruby 2.6.6 o anterior * Ruby 2.7.2 o anterior diff --git a/es/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md b/es/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md new file mode 100644 index 0000000000..8f1bacc61e --- /dev/null +++ b/es/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md @@ -0,0 +1,57 @@ +--- +layout: news_post +title: "CVE-2021-41817: Vulnerabilidad de denegación de servicio por Expresiones Reguales en los métodos para reconocer fechas" +author: "mame" +translator: vtamara +date: 2021-11-15 08:00:00 +0000 +tags: security +lang: es +--- + +Hemos publicado la gema `date` con versiones 3.2.1, 3.1.2, 3.0.2 y 2.0.1 +que incluyen una corrección de seguridad a una vulnerabilidad de denegación +de servicio por expresiones regulares (ReDoS) en los métodos para reconocer +fechas. +Un atacante podría explotar esta vulnerabilidad para generar +un ataque de denegación de servicio efectivo. + +A esta vulnerabilidad se le ha asignado el identificador CVE +[CVE-2021-41817](https://nvd.nist.gov/vuln/detail/CVE-2021-41817). + +## Detalles + +Los métodos para reconocer fechas incluyendo `Date.parse` usan +expresiones regulares internamente, algunas de las cuales son vulnerables +a denegación de servicio por expresiones regulares. +Las aplicaciones y librerías que emplean tales métodos con entradas +no confiables pueden verse afectadas. + +La corrección limita el tamaño de la entrada a 128 bytes de manera +predeterminada en lugar de cambiar las expresiones regulares. +Esto es porque la gema Date usa muchas expresiones regulares y es posible que aún haya +vulnerabilidades no descubiertas en algunas. Por compatibilidad, se +permite eliminar la limitación pasando explícitamente la palabra +reservada `limit` en `nil`, como en `Date.parse(str, limit: nil)`, +pero tenga en cuenta que el reconocimiento puede tardar un largo tiempo. + +Por favor actualice la gema date a una de las versiones 3.2.1, 3.1.2, 3.0.2, +2.0.1 o posterior. Puede usar `gem update date` para actualizarla. +Si usa bundler, por favor añada `gem "date", ">= 3.2.1"` a su `Gemfile`. +De forma alternativa, puede actualizar Ruby a 3.0.3, 2.7.5, 2.6.9 o posterior. + +## Versiones afectadas + +* gema date 2.0.0 y anteriores (distribuidas con la serie Ruby 2.6 antes de Ruby 2.6.9) +* gema date 3.0.1 y anteriores (distribuidas con la serie Ruby 2.7 antes de Ruby 2.7.5) +* gema date 3.1.1 y anteriores (distribuida con la serie Ruby 3.0 antes de Ruby 3.0.3) +* gema date gem 3.2.0 y anteriores + +## Créditos + +Agradecemos a [svalkanov](https://github.com/SValkanov/) por descubrir +el problema. + +## Historia + +* Publicado originalmente en inglés el 2021-11-15 08:00:00 (UTC) +* Mención sobre nuevas versiones de Ruby el 2021-11-24 13:20:00 (UTC) From 75c9ef329eb90cd5411df8e7fa9f3da49a32f1de Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Sat, 4 Dec 2021 20:23:33 +0700 Subject: [PATCH 0507/1487] Translate CVE-2021-32066: A StartTLS stripping vulnerability in Net::IMAP (id) --- ...21-07-07-starttls-stripping-in-net-imap.md | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 id/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md diff --git a/id/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md b/id/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md new file mode 100644 index 0000000000..0e83033da3 --- /dev/null +++ b/id/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md @@ -0,0 +1,40 @@ +--- +layout: news_post +title: "CVE-2021-32066: Kerentanan StartTLS stripping pada Net::IMAP" +author: "shugo" +translator: "meisyal" +date: 2021-07-07 09:00:00 +0000 +tags: security +lang: id +--- + +Sebuah kerentanan StartTLS *stripping* telah ditemukan pada Net::IMAP. +Kerentanan ini telah ditetapkan dengan penanda CVE +[CVE-2021-32066](https://nvd.nist.gov/vuln/detail/CVE-2021-32066). +Kami sangat merekomendasikan untuk memperbarui Ruby. + +net-imap adalah sebuah *default gem* pada Ruby 3.0.1, tetapi *gem* tersebut +memiliki masalah pengemasan. Sehingga, mohon perbarui Ruby. + +## Detail + +Net::IMAP tidak akan mengeluarkan sebuah *exception* jika StartTLS gagal +dengan sebuah respons yang tidak dikenal, yang mana mungkin memperbolehkan +penyerang *man-in-the-middle* untuk melewati perlindungan TLS dengan +memanfaatkan posisi jaringan antara *client* dan *registry* untuk mengeblok +perintah StartTLS, alias "StartTLS stripping attack." + +## Versi Terimbas + +* Rangkaian Ruby 2.6: 2.6.7 dan sebelumnya +* Rangkaian Ruby 2.7: 2.7.3 dan sebelumnya +* Rangkaian Ruby 3.0: 3.0.1 dan sebelumnya + +## Rujukan + +Terima kasih kepada [Alexandr Savca](https://hackerone.com/chinarulezzz) yang +telah melaporkan kerentanan ini. + +## Riwayat + +* Semula dipublikasikan pada 2021-07-07 09:00:00 UTC From 6a7c5e36a74e64d4b689bb89908be5fa68f1a19a Mon Sep 17 00:00:00 2001 From: billaul Date: Sun, 19 Dec 2021 17:22:33 +0100 Subject: [PATCH 0508/1487] Update index.md --- fr/community/index.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fr/community/index.md b/fr/community/index.md index 97898265cd..984296a32d 100644 --- a/fr/community/index.md +++ b/fr/community/index.md @@ -25,6 +25,12 @@ Quelques liens à visiter: disponibles. Si vous avez des questions sur Ruby, les poser sur une de ces listes est un moyen efficace pour obtenir rapidement des réponses. +[Server Discord Ruby (lien d'invitation)][ruby-discord] +: Le serveur Discord Ruby est un endroit où vous pouvez discuter avec + d'autres rubyistes, obtenir de l'aide pour vos questions sur Ruby ou + aider les autres. Discord est un bon point d'entrée pour les nouveaux + développeurs et il est facile à rejoindre. + [IRC (#ruby)](https://web.libera.chat/#ruby) : Le canal IRC anglophone #ruby est un endroit fantastique pour discuter en temps réel avec d’autres rubyistes. @@ -53,5 +59,6 @@ Informations générales [ruby-central]: http://rubycentral.org/ +[ruby-discord]: https://ruby-discord.com/ [ruby-opendir]: https://dmoztools.net/Computers/Programming/Languages/Ruby/ [rails-opendir]: https://dmoztools.net/Computers/Programming/Languages/Ruby/Software/Frameworks/Rails/ From 840bad163a6756708734b5d7626e037c83fc95ff Mon Sep 17 00:00:00 2001 From: Andrias Meisyal Date: Sat, 18 Dec 2021 20:23:19 +0700 Subject: [PATCH 0509/1487] Translate Ruby 2.6.8 released news (id) --- .../_posts/2021-07-07-ruby-2-6-8-released.md | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 id/news/_posts/2021-07-07-ruby-2-6-8-released.md diff --git a/id/news/_posts/2021-07-07-ruby-2-6-8-released.md b/id/news/_posts/2021-07-07-ruby-2-6-8-released.md new file mode 100644 index 0000000000..0b922bfdcc --- /dev/null +++ b/id/news/_posts/2021-07-07-ruby-2-6-8-released.md @@ -0,0 +1,64 @@ +--- +layout: news_post +title: "Ruby 2.6.8 Dirilis" +author: "usa" +translator: "meisyal" +date: 2021-07-07 09:00:00 +0000 +lang: id +--- + +Ruby 2.6.8 telah dirilis. + +Rilis ini memuat perbaikan keamanan. +Mohon cek topik-topik di bawah ini untuk lebih detail. + +* [CVE-2021-31810: Kerentanan respons FTP PASV yang dipercaya pada Net::FTP]({%link id/news/_posts/2021-07-07-trusting-pasv-responses-in-net-ftp.md %}) +* [CVE-2021-32066: Kerentanan StartTLS stripping pada Net::IMAP]({%link id/news/_posts/2021-07-07-starttls-stripping-in-net-imap.md %}) +* [CVE-2021-31799: Sebuah kerentanan command injection pada RDoc]({%link id/news/_posts/2021-05-02-os-command-injection-in-rdoc.md %}) + +Kami biasanya tidak memperbaiki Ruby 2.6, kecuali perbaikan keamanan. Tetapi, +rilis ini memuat beberapa perbaikan *regressed bug* dan *build problem*. +Lihat [commit logs](https://github.com/ruby/ruby/compare/v2_6_7...v2_6_8) +untuk detail. + +Ruby 2.6 saat ini berada pada fase perawatan keamanan hingga akhir Maret 2022. +Setelah bulan tersebut, perawatan Ruby 2.6 akan berakhir. +Kami merekomendasikan Anda untuk mulai merencanakan migrasi ke Ruby versi +terbaru, seperti 3.0 atau 2.7. + +## Unduh + +{% assign release = site.data.releases | where: "version", "2.6.8" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Komentar Rilis + +Banyak *committer*, pengembang, dan pengguna yang telah menyediakan laporan +*bug* membantu kami untuk membuat rilis ini. Terima kasih atas kontribusinya. From f1e7ad610a7aa5a5e48b4894a6c8b9b205b5afbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20T=C3=A1mara=20Pati=C3=B1o?= Date: Wed, 22 Dec 2021 15:57:40 -0500 Subject: [PATCH 0510/1487] Translation of CVE 2021 41816 to spanish (#2760) * Translation of CVE 2021 41816 to spanish * lang es --- ...errun-in-cgi-escape_html-cve-2021-41816.md | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 es/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md diff --git a/es/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md b/es/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md new file mode 100644 index 0000000000..6a64284388 --- /dev/null +++ b/es/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md @@ -0,0 +1,46 @@ +--- +layout: news_post +title: "CVE-2021-41816: Desbordamiento de búfer en CGI.escape_html" +author: "mame" +translator: vtamara +date: 2021-11-24 12:00:00 +0000 +tags: security +lang: es +--- + +Una vulnerabilidad de desbordamiento de búfer fue descubierta en +CGI.escape_html. +A esta vulnerabilidad se le ha asignado el identificador CVE +[CVE-2021-41816](https://nvd.nist.gov/vuln/detail/CVE-2021-41816). +Recomendamos enfáticamente actualizar Ruby. + +## Detalles + +Una vulnerabilidad de seguridad que causa desbordamientos de búfer cuando +el usuario pasa una cadenas muy grande (> 700MB) a `CGI.escape_html` en +una plataforma donde el tipo `long` emplee 4 bytes, tipicamente, Windows. + +Por favor actualice la gema cgi a la versión 0.3.1, 0.2,1, y 0.1,1 o posterior. +Puede usar `gem update cgi` para actualizarla. Si está usando bundler, +por favor añada `gem "cgi", ">= 0.3.1"` a su archivo `Gemfile`. +Alternativamente, por favor actualice Ruby a 2.7.5 o a 3.0.3. + +Este problema fue introducido desde Ruby 2.7, así que las versiones de cgi +incorporadas en Ruby 2.6 no es vulnerable. + +## Versiones afectadas + +* Gema cgi 0.1.0 o anterior (que se distribuyó con la serie Ruby 2.7 antes de + Ruby 2.7.5) +* Gema cgi 0.2.0 o anterior (que se distribuyó con la serie Ruby 3.0 antes de + Ruby 3.0.3) +* Gema cgi 0.3.0 o anterior + +## Créditos + +Agradecimientos a [chamal](https://hackerone.com/chamal) por descubrir este +problema. + +## Historia + +* Publicado originalmente el 2021-11-24 12:00:00 (UTC) From b923ddb8c6558223d1f691749d21985022132c6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20T=C3=A1mara=20Pati=C3=B1o?= Date: Thu, 23 Dec 2021 09:38:46 -0500 Subject: [PATCH 0511/1487] Translation of CVE 2021-41819 to spanish (#2763) --- ...fing-in-cgi-cookie-parse-cve-2021-41819.md | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 es/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md diff --git a/es/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md b/es/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md new file mode 100644 index 0000000000..2648f13314 --- /dev/null +++ b/es/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md @@ -0,0 +1,59 @@ +--- +layout: news_post +title: "CVE-2021-41819: Cookie Prefix Spoofing in CGI::Cookie.parse" +author: "mame" +translator: vtamara +date: 2021-11-24 12:00:00 +0000 +tags: security +lang: es +--- + +Se descubrió una vulnerabilidad de suplantación de identidad de prefijos de +galletas (cookies) en CGI::Cookie.parse. +A esta vulnerabilidad se el ha asignado el identificador +CVE [CVE-2021-41819](https://nvd.nist.gov/vuln/detail/CVE-2021-41819). +Recomendamos con énfasis actualizar Ruby. + +## Detalles + +La antigua versión de `CGI::Cookie.parse` aplicaba decodificación de URL a los +nombres de galletas. +Un atacante podría explotar esta vulnerabilidad para suplantar prefijos de +seguridad en los nombres de las galletas, que podría permitirle engañar +a una aplicación vulnerable. + +Con este arreglo, `CGI::Cookie.parse` ya no decodifica los nombres +de las galletas. +Note que esto es una incompatibilidad si los nombres de galletas que +está usando incluyendo carácteres no alfanuméricos que no están +codificados como URL. + +Este es el mismo incidente [CVE-2020-8184](https://nvd.nist.gov/vuln/detail/CVE-2020-8184). + +Si está usando Ruby 2.7 o 3.0: + +* Por favor actualice la gema cgi a la versión 0.3.1, 0.2,1, y 0.1,1 + o posterior. Puede usar `gem update cgi` para actualizarla. Si usa + bundler por favor agregue `gem "cgi", ">= 0.3.1"` a su `Gemfile`. +* De manera alternativa, por favor actualice Ruby a 2.7.5 o 3.0.3. + +Si usa Ruby 2.6: + +* Por favor actualice Ruby a 2.6.9. *No puede usar `gem update cgi` con Ruby 2.6 + o anteriores.* + +## Versiones afectadas + +* ruby 2.6.8 o anteriores (*No* puede usar `gem update cgi` para esta versión.) +* Gema cgi 0.1.0 o anteriores (que son versiones incorporadas en la serie Ruby 2.7 antes de Ruby 2.7.5) +* Gema cgi 0.2.0 o anteriores (que son versiones incorporadas en la serie Ruby 3.0 antes de Ruby 3.0.3) +* Gema cgi 0.3.0 o anteriores + +## Créditos + +Agradecemos a [ooooooo_q](https://hackerone.com/ooooooo_q) por descubrir +este problema. + +## Historia + +* Publicado originalmente el 2021-11-24 12:00:00 (UTC) From 0df598db6ec35d2f8c9070e448110a354a78952a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladimir=20T=C3=A1mara=20Pati=C3=B1o?= Date: Thu, 23 Dec 2021 11:53:56 -0500 Subject: [PATCH 0512/1487] Translation of release of Ruby 2.6.9, 2.7.5 and 3.0.3 to spanish (#2764) --- ...fing-in-cgi-cookie-parse-cve-2021-41819.md | 2 +- .../_posts/2021-11-24-ruby-2-6-9-released.md | 63 +++++++++++++++++++ .../_posts/2021-11-24-ruby-2-7-5-released.md | 63 +++++++++++++++++++ .../_posts/2021-11-24-ruby-3-0-3-released.md | 60 ++++++++++++++++++ 4 files changed, 187 insertions(+), 1 deletion(-) create mode 100644 es/news/_posts/2021-11-24-ruby-2-6-9-released.md create mode 100644 es/news/_posts/2021-11-24-ruby-2-7-5-released.md create mode 100644 es/news/_posts/2021-11-24-ruby-3-0-3-released.md diff --git a/es/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md b/es/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md index 2648f13314..664dbe5b00 100644 --- a/es/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md +++ b/es/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md @@ -1,6 +1,6 @@ --- layout: news_post -title: "CVE-2021-41819: Cookie Prefix Spoofing in CGI::Cookie.parse" +title: "CVE-2021-41819: Suplantación de identidad del prefijo de galletas en CGI::Cookie.parse" author: "mame" translator: vtamara date: 2021-11-24 12:00:00 +0000 diff --git a/es/news/_posts/2021-11-24-ruby-2-6-9-released.md b/es/news/_posts/2021-11-24-ruby-2-6-9-released.md new file mode 100644 index 0000000000..62f48cbae2 --- /dev/null +++ b/es/news/_posts/2021-11-24-ruby-2-6-9-released.md @@ -0,0 +1,63 @@ +--- +layout: news_post +title: "Publicado Ruby 2.6.9" +author: "usa" +translator: vtamara +date: 2021-11-24 12:00:00 +0000 +lang: es +--- + +Ruby 2.6.9 ha sido publicado. +CVE-2021-41819: Suplantación de identidad del prefijo de galletas en CGI::Cookie.parse +Esta versión incluye correcciones de seguridad. +Por favor revise los temas siguientes para ver detalles. +Please check the topics below for details. + +* [CVE-2021-41817: Vulnerabilidad de denegación de servicio por Expresiones Reguales en los métodos para reconocer fechas]({%link es/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md %}) +* [CVE-2021-41819: Suplantación de identidad del prefijo de galletas en CGI::Cookie.parse]({%link es/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md %}) + +Ver detalles en la [bitácora de cambios](https://github.com/ruby/ruby/compare/v2_6_8...v2_6_9). + +Ruby 2.6 ahora está en la fase de mantenimiento de seguridad, hasta el final +de Marzo de 2022. +Tras esa fecha, cesará el mantenimiento a Ruby 2.6. +Le recomendamos empezar a planear la migración a una versińo más +reciente de ruby, tal como 3.0 o 2.7. + +## Descargas + +{% assign release = site.data.releases | where: "version", "2.6.9" | first %} + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Comentario de la versión + +Muchos contribuidores, desarrolladores y usuarios proveyeron reportes +de fallas que ayudaron a completar esta versión. +Gracias por sus contribuciones. diff --git a/es/news/_posts/2021-11-24-ruby-2-7-5-released.md b/es/news/_posts/2021-11-24-ruby-2-7-5-released.md new file mode 100644 index 0000000000..641d91f64f --- /dev/null +++ b/es/news/_posts/2021-11-24-ruby-2-7-5-released.md @@ -0,0 +1,63 @@ +--- +layout: news_post +title: "Publicado Ruby 2.7.5" +author: "usa" +translator: vtamara +date: 2021-11-24 12:00:00 +0000 +lang: es +--- + +Ruby 2.7.5 ha sido publicado. + +Esta versión incluye correcciones de seguridad. +Por favor revise los temas siguientes para ver detalles. + +* [CVE-2021-41817: Vulnerabilidad de denegación de servicio por Expresiones Reguales en los métodos para reconocer fechas]({%link es/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md %}) +* [CVE-2021-41819: Suplantación de identidad del prefijo de galletas en CGI::Cookie.parse]({%link es/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md %}) +* [CVE-2021-41816: Desbordamiento de búfer en CGI.escape_html]({%link es/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md %}) + +Ver detalles en la +[bitácora de cambios](https://github.com/ruby/ruby/compare/v2_7_4...v2_7_5). + + +## Descargas + +{% assign release = site.data.releases | where: "version", "2.7.5" | first %} + + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Comentario de la versión + +Muchos contribuidores, desarrolladores y usuarios proveyeron reportes +de fallas que nos ayudaron a completar esta versión. +Gracias por sus contribuciones. + +El mantenimiento de Ruby 2.7, incluida esta versión, se basa en el "Acuerdo +para una versión estable de Ruby" de la Asociación Ruby. diff --git a/es/news/_posts/2021-11-24-ruby-3-0-3-released.md b/es/news/_posts/2021-11-24-ruby-3-0-3-released.md new file mode 100644 index 0000000000..1836129518 --- /dev/null +++ b/es/news/_posts/2021-11-24-ruby-3-0-3-released.md @@ -0,0 +1,60 @@ +--- +layout: news_post +title: "Publicación de Ruby 3.0.3" +author: "nagachika" +translator: vtamara +date: 2021-11-24 12:00:00 +0000 +lang: es +--- + +Ruby 3.0.3 ha sido publicado. + +Esta versión incluye correcciones de seguridad. +Por favor revise los temas siguientes para ver detalles. + +* [CVE-2021-41817: Vulnerabilidad de denegación de servicio por Expresiones Reguales en los métodos para reconocer fechas]({%link es/news/_posts/2021-11-15-date-parsing-method-regexp-dos-cve-2021-41817.md %}) +* [CVE-2021-41816: Desbordamiento de búfer en CGI.escape_html]({%link es/news/_posts/2021-11-24-buffer-overrun-in-cgi-escape_html-cve-2021-41816.md %}) +* [CVE-2021-41819: Suplantación de identidad del prefijo de galletas en CGI::Cookie.parse]({%link es/news/_posts/2021-11-24-cookie-prefix-spoofing-in-cgi-cookie-parse-cve-2021-41819.md %}) + +Ver detalles en la +[bitácora de cambios](https://github.com/ruby/ruby/compare/v2_7_4...v2_7_5). + + +## Descargas + +{% assign release = site.data.releases | where: "version", "3.0.3" | first %} + + +* <{{ release.url.bz2 }}> + + SIZE: {{ release.size.bz2 }} + SHA1: {{ release.sha1.bz2 }} + SHA256: {{ release.sha256.bz2 }} + SHA512: {{ release.sha512.bz2 }} + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Comentario de la versión + +Muchos contribuidores, desarrolladores y usuarios proveyeron reportes +de fallas que nos ayudaron a completar esta versión. +Gracias por sus contribuciones. From af3e0d344a11738ea684d0c2cf5e662f9f934228 Mon Sep 17 00:00:00 2001 From: "NARUSE, Yui" Date: Sat, 25 Dec 2021 19:59:44 +0900 Subject: [PATCH 0513/1487] Ruby 3.1.0 Released (#2765) --- _data/branches.yml | 4 +- _data/downloads.yml | 2 +- _data/releases.yml | 24 ++ .../_posts/2021-12-25-ruby-3-1-0-released.md | 259 ++++++++++++++++++ .../_posts/2021-12-25-ruby-3-1-0-released.md | 256 +++++++++++++++++ 5 files changed, 542 insertions(+), 3 deletions(-) create mode 100644 en/news/_posts/2021-12-25-ruby-3-1-0-released.md create mode 100644 ja/news/_posts/2021-12-25-ruby-3-1-0-released.md diff --git a/_data/branches.yml b/_data/branches.yml index ebd2220b93..a4054fb534 100644 --- a/_data/branches.yml +++ b/_data/branches.yml @@ -9,8 +9,8 @@ # eol_date: date of EOL (YYYY-MM-DD) - name: 3.1 - status: preview - date: + status: normal maintenance + date: 2021-12-25 eol_date: - name: 3.0 diff --git a/_data/downloads.yml b/_data/downloads.yml index 54a2601a06..10644898d1 100644 --- a/_data/downloads.yml +++ b/_data/downloads.yml @@ -4,10 +4,10 @@ # optional preview: - - 3.1.0-preview1 stable: + - 3.1.0 - 3.0.3 - 2.7.5 diff --git a/_data/releases.yml b/_data/releases.yml index 82ff598065..a7a6341109 100644 --- a/_data/releases.yml +++ b/_data/releases.yml @@ -21,6 +21,30 @@ # 3.1 series +- version: 3.1.0 + date: 2021-12-25 + post: /en/news/2021/12/25/ruby-3-1-0-released/ + url: + gz: https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.0.tar.gz + zip: https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.0.zip + xz: https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.0.tar.xz + size: + gz: 19204319 + zip: 23207824 + xz: 14051880 + sha1: + gz: 3945f8043286975cfc016d288abcb334574796d9 + zip: 88963d8244bb122668c1fc8dfa3a8a5289c87146 + xz: 3d5a9cae293763787185ccc04f05aecfb6790703 + sha256: + gz: 8dc75f2f7b5552a3a10abc22ffbf1bf85909326d715647dcdf5ce878c349a81d + zip: 8a051fdd5ba43bd072c3179bbc65c581974c06142b97aa049fe04ec6d5fc8447 + xz: 8594c076e1b06a896143d3a70163ddc12d81ca55c906ee5ee215587c2df52382 + sha512: + gz: ede15d99afb3087412a45038ad9266af67edc953fae08356a64235706766d171715bc927b045e1b07d0736cdf83f1891944b6861dad39f4519482135493cc93c + zip: f52ea893e158d79074ab7f551778df2189c184bc7b931e27ad0e7600ceab743d88d8b07ba3ff400b65c7866aa62734b72efe89216d5c4106391b40476f0d30ac + xz: 0ef0c19b6ae5af9878d8783a7b072e7f86c6d0e747866365564891c94452f334c901419bba80b6361c803c031ffa6b98d237eb4c6e017f8e6fe652cc336572de + - version: 3.1.0-preview1 date: 2021-11-09 post: /en/news/2021/11/09/ruby-3-1-0-preview1-released/ diff --git a/en/news/_posts/2021-12-25-ruby-3-1-0-released.md b/en/news/_posts/2021-12-25-ruby-3-1-0-released.md new file mode 100644 index 0000000000..caf363cc42 --- /dev/null +++ b/en/news/_posts/2021-12-25-ruby-3-1-0-released.md @@ -0,0 +1,259 @@ +--- +layout: news_post +title: "Ruby 3.1.0 Released" +author: "naruse" +translator: +date: 2021-12-25 00:00:00 +0000 +lang: en +--- + +{% assign release = site.data.releases | where: "version", "3.1.0" | first %} + +We are pleased to announce the release of Ruby {{ release.version }}. + + +## YJIT: New experimental in-process JIT compiler + + +Ruby 3.1 merges YJIT, a new in-process JIT compiler developed by Shopify. + +Since [Ruby 2.6 introduced MJIT in 2018](https://www.ruby-lang.org/en/news/2018/12/25/ruby-2-6-0-released/), its performance greatly improved, and finally [we achieved Ruby3x3 last year](https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/). But even though Optcarrot has shown impressive speedups, the JIT hasn't benefited real world business applications. + +Recently Shopify contributed many Ruby improvements to speed up their Rails application. YJIT is an important contribution, and aims to improve the performance of Rails applications. + +Though MJIT is a method-based JIT compiler and uses an external C compiler, YJIT uses Basic Block Versioning and includes JIT compiler inside it. With Lazy Basic Block Versioning (LBBV) it first compiles the beginning of a method, and incrementally compiles the rest when the type of arguments and variables are dynamically determined. See [YJIT: a basic block versioning JIT compiler for CRuby](https://dl.acm.org/doi/10.1145/3486606.3486781) for a detailed introduction. + +With this technology, YJIT achieves both fast warmup time and performance improvements on most real-world software, up to 22% on railsbench, 39% on liquid-render. + +YJIT is still an experimental feature, and as such, it is disabled by default. If you want to use this, specify the `--yjit` command-line option to enable YJIT. It is also limited to Unix-like x86-64 platforms for now. + +* https://bugs.ruby-lang.org/issues/18229 +* https://shopify.engineering/yjit-just-in-time-compiler-cruby +* https://www.youtube.com/watch?v=PBVLf3yfMs8 + +## debug gem: A new debugger + +A completely rewritten debugger [debug.gem](https://github.com/ruby/debug) is bundled. debug.gem has the following features: + +* Improve the debugging performance (it does not slow down the application even with the debugger) +* Support remote debugging +* Support rich debugging frontend (VSCode and Chrome browser are supported now) +* Support multi-process/multi-thread debugging +* Colorful REPL +* And other useful features like recod & replay feature, tracing feature and so on. + + + +Ruby had bundled lib/debug.rb, but it was not well maintained and it had issues about performance and features. debug.gem replaced lib/debug.rb completely. + +## error_highlight: Fine-grained error location in backtrace + +A built-in gem, error_highlight, has been introduced. It includes fine-grained error location in backtrace: + +``` +$ ruby test.rb +test.rb:1:in `
': undefined method `time' for 1:Integer (NoMethodError) + +1.time {} + ^^^^^ +Did you mean? times +``` + +Currently, only `NameError` is supported. + +This gem is enabled by default. You can disable it by using a command-line option `--disable-error_highlight`. See [the repository](https://github.com/ruby/error_highlight) in detail. + +## IRB Autocomplete and Document Display + +The IRB now has an autocomplete feature, where you can just type in the code, and the completion candidates dialog will appear. You can use Tab and Shift+Tab to move up and down. + +If documents are installed when you select a completion candidate, the documentation dialog will appear next to the completion candidates dialog, showing part of the content. You can read the full document by pressing Alt+d. + + + + +## Other Notable New Features + +### Language + +* Values in Hash literals and keyword arguments can be omitted. [Feature #14579] + * `{x:, y:}` is a syntax sugar of `{x: x, y: y}`. + * `foo(x:, y:)` is a syntax sugar of `foo(x: x, y: y)`. + +* Pin operator in pattern matching now takes an expression. [Feature #17411] + +```ruby +Prime.each_cons(2).lazy.find_all{_1 in [n, ^(n + 2)]}.take(3).to_a +#=> [[3, 5], [5, 7], [11, 13]] +``` + +* Parentheses can be omitted in one-line pattern matching. [Feature #16182] + +```ruby +[0, 1] => _, x +{y: 2} => y: +x #=> 1 +y #=> 2 +``` + +### RBS + +RBS is a language to describe the structure of Ruby programs. See [the repository](https://github.com/ruby/rbs) for details. + +Updates since Ruby 3.0.0: + +* Generic type parameters can be bounded. ([PR](https://github.com/ruby/rbs/pull/844)) +* Generic type aliases are supported. ([PR](https://github.com/ruby/rbs/pull/823)) +* `rbs collection` has been introduced to manage gems' RBSs. ([doc](https://github.com/ruby/rbs/blob/master/docs/collection.md)) +* Many signatures for built-in and standard libraries have been added/updated. +* It includes many bug fixes and performance improvements too. + +See [the CHANGELOG.md](https://github.com/ruby/rbs/blob/master/CHANGELOG.md) for more information. + +### TypeProf + +TypeProf is a static type analyzer for Ruby. It generates a prototype of RBS from non-type-annotated Ruby code. See [the document](https://github.com/ruby/typeprof/blob/master/doc/doc.md) for detail. + +The main updates since Ruby 3.0.0 is an experimental IDE support called "TypeProf for IDE". + +![Demo of TypeProf for IDE](https://cache.ruby-lang.org/pub/media/ruby310_typeprof_ide_demo.png) + +The vscode extension shows a guessed (or explicitly written in a RBS file) method signature above each method definition, draws a red underline under the code that may cause a name error or type error, and completes method names (i.e., shows method candidates). See [the document](https://github.com/ruby/typeprof/blob/master/doc/ide.md) in detail. + +Also, the release includes many bug fixes and performance improvements. + +## Performance improvements + +* MJIT + * For workloads like Rails, the default `--jit-max-cache` is changed from 100 to 10000. + The JIT compiler no longer skips compilation of methods longer than 1000 instructions. + * To support Zeitwerk of Rails, JIT-ed code is no longer cancelled + when a TracePoint for class events is enabled. + +## Other notable changes since 3.0 + +* One-line pattern matching, e.g., `ary => [x, y, z]`, is no longer experimental. +* Multiple assignment evaluation order has been changed slightly. [[Bug #4443]](https://bugs.ruby-lang.org/issues/4443) + * `foo[0], bar[0] = baz, qux` was evaluated in order `baz`, `qux`, `foo`, and then `bar` in Ruby 3.0. In Ruby 3.1, it is evaluated in order `foo`, `bar`, `baz`, and then `qux`. +* Variable Width Allocation: Strings (experimental) [[Bug #18239]](https://bugs.ruby-lang.org/issues/18239) + +* Psych 4.0 changes `Psych.load` as `safe_load` by the default. + You may need to use Psych 3.3.2 for migrating to this behavior. + [[Bug #17866]](https://bugs.ruby-lang.org/issues/17866) + +### Standard libraries updates + +* The following default gem are updated. + * RubyGems 3.3.3 + * base64 0.1.1 + * benchmark 0.2.0 + * bigdecimal 3.1.1 + * bundler 2.3.3 + * cgi 0.3.1 + * csv 3.2.2 + * date 3.2.2 + * did_you_mean 1.6.1 + * digest 3.1.0 + * drb 2.1.0 + * erb 2.2.3 + * error_highlight 0.3.0 + * etc 1.3.0 + * fcntl 1.0.1 + * fiddle 1.1.0 + * fileutils 1.6.0 + * find 0.1.1 + * io-console 0.5.9 + * io-wait 0.2.1 + * ipaddr 1.2.3 + * irb 1.4.1 + * json 2.6.1 + * logger 1.5.0 + * net-http 0.2.0 + * net-protocol 0.1.2 + * nkf 0.1.1 + * open-uri 0.2.0 + * openssl 3.0.0 + * optparse 0.2.0 + * ostruct 0.5.2 + * pathname 0.2.0 + * pp 0.3.0 + * prettyprint 0.1.1 + * psych 4.0.3 + * racc 1.6.0 + * rdoc 6.4.0 + * readline 0.0.3 + * readline-ext 0.1.4 + * reline 0.3.0 + * resolv 0.2.1 + * rinda 0.1.1 + * ruby2_keywords 0.0.5 + * securerandom 0.1.1 + * set 1.0.2 + * stringio 3.0.1 + * strscan 3.0.1 + * tempfile 0.1.2 + * time 0.2.0 + * timeout 0.2.0 + * tmpdir 0.1.2 + * un 0.2.0 + * uri 0.11.0 + * yaml 0.2.0 + * zlib 2.1.1 +* The following bundled gems are updated. + * minitest 5.15.0 + * power_assert 2.0.1 + * rake 13.0.6 + * test-unit 3.5.3 + * rexml 3.2.5 + * rbs 2.0.0 + * typeprof 0.21.1 +* The following default gems are now bundled gems. You need to add the following libraries to `Gemfile` under the bundler environment. + * net-ftp 0.1.3 + * net-imap 0.2.2 + * net-pop 0.1.1 + * net-smtp 0.3.1 + * matrix 0.4.2 + * prime 0.1.2 + * debug 1.4.0 + +See [NEWS](https://github.com/ruby/ruby/blob/{{ release.tag }}/NEWS.md) +or [commit logs](https://github.com/ruby/ruby/compare/v3_0_0...{{ release.tag }}) +for more details. + +With those changes, [{{ release.stats.files_changed }} files changed, {{ release.stats.insertions }} insertions(+), {{ release.stats.deletions }} deletions(-)](https://github.com/ruby/ruby/compare/v3_0_0...{{ release.tag }}#file_bucket) +since Ruby 3.0.0! + +Merry Christmas, Happy Holidays, and enjoy programming with Ruby 3.1! + +## Download + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## What is Ruby + +Ruby was first developed by Matz (Yukihiro Matsumoto) in 1993, +and is now developed as Open Source. It runs on multiple platforms +and is used all over the world especially for web development. diff --git a/ja/news/_posts/2021-12-25-ruby-3-1-0-released.md b/ja/news/_posts/2021-12-25-ruby-3-1-0-released.md new file mode 100644 index 0000000000..b8f5a29bfa --- /dev/null +++ b/ja/news/_posts/2021-12-25-ruby-3-1-0-released.md @@ -0,0 +1,256 @@ +--- +layout: news_post +title: "Ruby 3.1.0 リリース" +author: "naruse" +translator: +date: 2021-12-25 00:00:00 +0000 +lang: ja +--- + +Ruby 3.1系初のリリースである、Ruby 3.1.0 が公開されました。 + +{% assign release = site.data.releases | where: "version", "3.1.0" | first %} + + +## YJIT: New experimental in-process JIT compiler + +Ruby 3.1では、Shopifyが開発した新しいプロセス内JITコンパイラであるYJITをマージしました。 + +[2018年のRuby 2.6でMJITをマージ](https://www.ruby-lang.org/ja/news/2018/12/25/ruby-2-6-0-released/)して以来、そのパフォーマンスは年々改善され、去年には[Ruby3x3を無事達成](https://www.ruby-lang.org/ja/news/2020/12/25/ruby-3-0-0-released/)しました。比較的大規模なOptcarrotベンチマークでは輝かしい高速化を達成したMJITですが、一方で現実の業務アプリケーションの性能はこれまで改善出来ていませんでした。 + +近年Shopifyは彼らのRailsアプリケーションを高速化するため、Rubyに対して多くの貢献をしてきました。YJITはその中でも重要な貢献であり、Railsアプリケーションをさらに高速化するために開発されました。 + +MJITがメソッドベースのJITコンパイラであり、外部のCコンパイラを利用しているのに対し、YJITではBasic Block Versioningという技術を用いた独自のJITコンパイラをRuby内部に持っています。YJITの用いているLazy Basic Block Versioning (LBBC)では、まずメソッドの冒頭のみをコンパイルし、実行時に実際に値が渡されて引数や変数の値が明らかになってから残りをコンパイルするという手法を用いることで、動的プログラミング言語においても効率のよいJITを実現しています。詳細は [YJIT: a basic block versioning JIT compiler for CRuby](https://dl.acm.org/doi/10.1145/3486606.3486781) を参照ください。 + +これらの技術によって、YJITでは素早い起動と高速な実行を多くの実世界のアプリケーションに対して実現しており、railsbenchでは最大22%、liquied-renderでは39%の高速化を達成しています。 + +YJITはまだ実験的機能なため、デフォルトでは無効化されています。試してみたい場合には `--yjit` コマンドラインオプションを指定することでYJITを有効化出来ます。現在YJITはx86-64上のUnix系プラットフォームでのみ実行出来ます。 + +* https://bugs.ruby-lang.org/issues/18229 +* https://shopify.engineering/yjit-just-in-time-compiler-cruby +* https://www.youtube.com/watch?v=PBVLf3yfMs8 + +## debug gem: 新しいデバッガ + +完全に0から書き直したデバッガである [debug.gem](https://github.com/ruby/debug) が同梱されました。次のような特徴があります。 + +* デバッグ時の速度低下を極力生じないよう改善 +* リモートデバッグのサポート +* リッチなデバッガフロントエンドに対応(現在 VSCode と Chrome ブラウザに対応) +* マルチプロセス、マルチスレッドプログラムのデバッグに対応 +* カラフルな REPL +* そのほか、Record & Replay 機能やトレース機能など、様々な便利機能 + + + +Rubyにはこれまでも lib/debug.rb が同梱されていましたが、あまりメンテナンスされておらず、性能や機能に問題がありました。debug.gem はこれを完全に置き換えます。 + +## error_highlight: バックトレース中の詳細なエラー位置表示 + +error_highlightという組み込みgemが導入されました。これにより、バックトレース中でエラーが発生した詳細な位置が表示されます。 + +``` +$ ruby test.rb +test.rb:1:in `
': undefined method `time' for 1:Integer (NoMethodError) + +1.time {} + ^^^^^ +Did you mean? times +``` + +現在のところ、位置が表示されるのは`NameError`のみです。 + +このgemはデフォルトで有効になっています。`--disable-error_highlight`コマンドラインオプションを指定することで無効化できます。詳しくは[ruby/error_highlightリポジトリ](https://github.com/ruby/error_highlight)を見てください。 + +## IRB のオートコンプリートとドキュメント表示 + +IRB にオートコンプリート機能が実装され、コードを入力するだけで補完候補ダイアログが表示されるようになりました。Tab と Shift+Tab で上下に移動できます。 + +また、補完候補を選択している時に、ドキュメントがインストールされている場合、補完候補ダイアログの横にドキュメントダイアログが表示され、内容が一部表示されます。Alt+d を押すことでドキュメント全文を読むことができます。 + + + +## その他の主要な新機能 + +### 言語機能 + +* ハッシュリテラルやキーワード引数の値が省略可能になりました。 [Feature #14579] + * `{x:, y:}` は、`{x: x, y: y}` の糖衣構文です。 + * `foo(x:, y:)` は、`foo(x: x, y: y)` の糖衣構文です。 + +* パターンマッチ中のピン演算子に任意の式を書けるようになりました。 [Feature #17411] + +```ruby +Prime.each_cons(2).lazy.find_all{_1 in [n, ^(n + 2)]}.take(3).to_a +#=> [[3, 5], [5, 7], [11, 13]] +``` + +* 一行パターンマッチで括弧が省略できるようになりました. [Feature #16182] + +```ruby +[0, 1] => _, x +{y: 2} => y: +x #=> 1 +y #=> 2 +``` + + +### RBS + +[RBS](https://github.com/ruby/rbs)はRubyプログラムの型を定義するための言語です。 + +3.0.0からは、次の様なアップデートがありました。 + +* ジェネリクスの型パラメータに制約を与えることができるようになりました。 ([PR](https://github.com/ruby/rbs/pull/844)) +* ジェネリックな型エイリアスが定義できようになりました。 ([PR](https://github.com/ruby/rbs/pull/823)) +* gemのRBSを管理するための`rbs collection`コマンドが導入されました。 ([doc](https://github.com/ruby/rbs/blob/master/docs/collection.md)) +* いろいろな組み込みクラスの型定義が追加、更新されました。 +* 多数のバグ修正と性能の改善が含まれています。 + +詳しくは[CHANGELOG.md](https://github.com/ruby/rbs/blob/master/CHANGELOG.md)を確認してください。 + +### TypeProf + +TypeProfはRubyの静的型解析器です。型注釈のないRubyコードから、RBSのプロトタイプを生成します。詳しくは[ドキュメント](https://github.com/ruby/typeprof/blob/master/doc/doc.md)をご参照ください. + +Ruby 3.0.0からの主なアップデートは、"TypeProf for IDE"という実験的なIDEサポートです。 + +![Demo of TypeProf for IDE](https://cache.ruby-lang.org/pub/media/ruby310_typeprof_ide_demo.png) + +このVSCode拡張は、推定された(またはRBSファイルに手で明記された)メソッドのシグネチャを、各メソッド定義の上に表示します。 +また、NameErrorやTypeErrorを起こしうるコードを赤い下線で示します。 +さらに、メソッド名の補完(メソッド名の候補の表示)を行います。 +詳しくは[ドキュメント](https://github.com/ruby/typeprof/blob/master/doc/ide.md)をご参照ください。 + +また、数多くのバグ修正やパフォーマンス向上がなされています。 + +## パフォーマンスの改善 + +* MJIT + * For workloads like Rails, the default `--jit-max-cache` is changed from 100 to 10000. + The JIT compiler no longer skips compilation of methods longer than 1000 instructions. + * To support Zeitwerk of Rails, JIT-ed code is no longer cancelled + when a TracePoint for class events is enabled. + + +## その他の注目すべき 3.0 からの変更点 + +* 一行パターンマッチ(たとえば `ary => [x, y, z]`)が実験的機能ではなくなりました。 + +* 多重代入の評価順序が若干変更されました。[[Bug #4443]](https://bugs.ruby-lang.org/issues/4443) + * `foo[0], bar[0] = baz, qux` は、Ruby 3.0 では `baz`, `qux`, `foo`, `bar` という順序で評価されていましたが、Ruby 3.1 では `foo`, `bar`, `baz`, `qux` の順で表kされます。 + +* 可変幅アロケーション(Variable Width Allocation)が実装されました。現在は試験的にStringが対応しています。 [[Bug #18239]](https://bugs.ruby-lang.org/issues/18239) + +* Psych 4.0 では `Psych.load` が `safe_load` を利用するように変更されました。この挙動が影響ある場合は、従来の挙動である `unsafe_load` を利用する Psych 3.3.2 を移行パスとして利用できます。[[Bug #17866]](https://bugs.ruby-lang.org/issues/17866) + +## 標準添付ライブラリのアップデート + +* 以下の default gems のバージョンがアップデートされました。 + * RubyGems 3.3.3 + * base64 0.1.1 + * benchmark 0.2.0 + * bigdecimal 3.1.1 + * bundler 2.3.3 + * cgi 0.3.1 + * csv 3.2.2 + * date 3.2.2 + * did_you_mean 1.6.1 + * digest 3.1.0 + * drb 2.1.0 + * erb 2.2.3 + * error_highlight 0.3.0 + * etc 1.3.0 + * fcntl 1.0.1 + * fiddle 1.1.0 + * fileutils 1.6.0 + * find 0.1.1 + * io-console 0.5.9 + * io-wait 0.2.1 + * ipaddr 1.2.3 + * irb 1.4.1 + * json 2.6.1 + * logger 1.5.0 + * net-http 0.2.0 + * net-protocol 0.1.2 + * nkf 0.1.1 + * open-uri 0.2.0 + * openssl 3.0.0 + * optparse 0.2.0 + * ostruct 0.5.2 + * pathname 0.2.0 + * pp 0.3.0 + * prettyprint 0.1.1 + * psych 4.0.3 + * racc 1.6.0 + * rdoc 6.4.0 + * readline 0.0.3 + * readline-ext 0.1.4 + * reline 0.3.0 + * resolv 0.2.1 + * rinda 0.1.1 + * ruby2_keywords 0.0.5 + * securerandom 0.1.1 + * set 1.0.2 + * stringio 3.0.1 + * strscan 3.0.1 + * tempfile 0.1.2 + * time 0.2.0 + * timeout 0.2.0 + * tmpdir 0.1.2 + * un 0.2.0 + * uri 0.11.0 + * yaml 0.2.0 + * zlib 2.1.1 +* 以下の bundled gems のバージョンがアップデートされました。 + * minitest 5.15.0 + * power_assert 2.0.1 + * rake 13.0.6 + * test-unit 3.5.3 + * rexml 3.2.5 + * rbs 2.0.0 + * typeprof 0.21.1 +* 以下のライブラリが新たに bundled gems になりました。Bundler から利用する場合は Gemfile に明示的に指定してください。 + * net-ftp 0.1.3 + * net-imap 0.2.2 + * net-pop 0.1.1 + * net-smtp 0.3.1 + * matrix 0.4.2 + * prime 0.1.2 + * debug 1.4.0 + + +その他詳細については、[NEWS](https://github.com/ruby/ruby/blob/{{ release.tag }}/NEWS.md) ファイルまたは[コミットログ](https://github.com/ruby/ruby/compare/v3_0_0...{{ release.tag }})を参照してください。 + +なお、こうした変更により、Ruby 3.0.0 以降では [{{ release.stats.files_changed }} 個のファイルに変更が加えられ、{{ release.stats.insertions }} 行の追加と {{ release.stats.deletions }} 行の削除が行われました](https://github.com/ruby/ruby/compare/v3_0_0...{{ release.tag }}#file_bucket) ! + +メリークリスマス、様々な機能が追加された Ruby 3.1 をぜひお楽しみ下さい! + +## ダウンロード + +* <{{ release.url.gz }}> + + SIZE: {{ release.size.gz }} + SHA1: {{ release.sha1.gz }} + SHA256: {{ release.sha256.gz }} + SHA512: {{ release.sha512.gz }} + +* <{{ release.url.xz }}> + + SIZE: {{ release.size.xz }} + SHA1: {{ release.sha1.xz }} + SHA256: {{ release.sha256.xz }} + SHA512: {{ release.sha512.xz }} + +* <{{ release.url.zip }}> + + SIZE: {{ release.size.zip }} + SHA1: {{ release.sha1.zip }} + SHA256: {{ release.sha256.zip }} + SHA512: {{ release.sha512.zip }} + +## Ruby とは + +Rubyはまつもとゆきひろ (Matz) によって1993年に開発が始められ、今もオープンソースソフトウェアとして開発が続けられています。Rubyは様々なプラットフォームで動き、世界中で、特にWebアプリケーション開発のために使われています。 From 9d266cfb613f62b4adb37cf857aca5e93a96171b Mon Sep 17 00:00:00 2001 From: "NARUSE, Yui" Date: Sat, 25 Dec 2021 20:41:25 +0900 Subject: [PATCH 0514/1487] Ruby 3 1 0 released 2 (#2766) * fix videos * Add stats to _data/releases.yml --- _data/releases.yml | 5 +++++ en/news/_posts/2021-12-25-ruby-3-1-0-released.md | 5 ++--- ja/news/_posts/2021-12-25-ruby-3-1-0-released.md | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/_data/releases.yml b/_data/releases.yml index a7a6341109..d84d0c9226 100644 --- a/_data/releases.yml +++ b/_data/releases.yml @@ -24,6 +24,11 @@ - version: 3.1.0 date: 2021-12-25 post: /en/news/2021/12/25/ruby-3-1-0-released/ + tag: ruby_3_1_0 + stats: + files_changed: 3123 + insertions: 551754 + deletions: 99153 url: gz: https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.0.tar.gz zip: https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.0.zip diff --git a/en/news/_posts/2021-12-25-ruby-3-1-0-released.md b/en/news/_posts/2021-12-25-ruby-3-1-0-released.md index caf363cc42..9e80c9e092 100644 --- a/en/news/_posts/2021-12-25-ruby-3-1-0-released.md +++ b/en/news/_posts/2021-12-25-ruby-3-1-0-released.md @@ -71,11 +71,10 @@ The IRB now has an autocomplete feature, where you can just type in the code, an If documents are installed when you select a completion candidate, the documentation dialog will appear next to the completion candidates dialog, showing part of the content. You can read the full document by pressing Alt+d. -