Skip to content

Commit 9c313c6

Browse files
committed
Fix value omission links
1 parent cd141aa commit 9c313c6

5 files changed

Lines changed: 9 additions & 15 deletions

File tree

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.5
1+
2.7.8

3.1.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ description: Ruby 3.1 full and annotated changelog
88
# Ruby 3.1
99

1010
* **Released at:** Dec 25, 2021 (<a class="github" href="https://github.com/ruby/ruby/blob/ruby_3_1/NEWS.md">NEWS.md</a> file)
11-
* **Status (as of Sep 20, 2023):** 3.1.4 is current _stable_
11+
* **Status (as of Nov 08, 2023):** 3.1.4 is current _stable_
1212
* **This document first published:** Jan 5, 2022
13-
* **Last change to this document:** Sep 20, 2023
13+
* **Last change to this document:** Nov 08, 2023
1414

1515
> **Note:** As already explained in [Introduction](README.md), this site is dedicated to changes in the **language**, not the **implementation**, therefore the list below lacks mentions of lots of important optimization introduced in 3.1, including a new JIT named YJIT. That's not because they are not important, just because this site's goals are different.
1616
@@ -33,9 +33,8 @@ _**See also my [this year's ongoing post series](https://zverok.substack.com/p/w
3333

3434
In hash literals and method calls, `x:` is now a shortcut for `x: x`—take hash value from the context, with the same name as a key.
3535

36-
* **Reason:**
3736
* **Discussion:** <a class="tracker feature" href="https://bugs.ruby-lang.org/issues/14579">Feature #14579</a>
38-
* **Documentation:** <a class="ruby-doc" href="https://docs.ruby-lang.org/en/3.1/syntax/literals_rdoc.html#label-Hash+Literals">doc/syntax/literals.rdoc#Hash Literals</a>, <a class="ruby-doc" href="https://docs.ruby-lang.org/en/3.1/syntax/methods_rdoc.html#label-Keyword+Arguments">doc/methods.rdoc#Keyword Arguments</a>, <a class="ruby-doc" href="https://docs.ruby-lang.org/en/3.1/Hash.html"><code>Hash</code></a>
37+
* **Documentation:** <a class="ruby-doc" href="https://docs.ruby-lang.org/en/3.1/syntax/literals_rdoc.html#label-Hash+Literals">doc/syntax/literals.rdoc#Hash Literals</a>, <a class="ruby-doc" href="https://docs.ruby-lang.org/en/3.1/syntax/calling_methods_rdoc.html#label-Keyword+Arguments">doc/methods.rdoc#Keyword Arguments</a>, <a class="ruby-doc" href="https://docs.ruby-lang.org/en/3.1/Hash.html"><code>Hash</code></a>
3938
* **Code:**
4039
```ruby
4140
x, y = 100, 200
@@ -70,8 +69,6 @@ In hash literals and method calls, `x:` is now a shortcut for `x: x`—take hash
7069
{'x':}
7170
# ^
7271
# syntax error, unexpected '}' (SyntaxError)
73-
74-
TODO: self, if, etc
7572
```
7673
* **Notes:** Be aware, that using new feature in a method call without parenthesis might lead to unexpected effect:
7774
```ruby

_src/3.1.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ _**See also my [this year's ongoing post series](https://zverok.substack.com/p/w
3333

3434
In hash literals and method calls, `x:` is now a shortcut for `x: x`—take hash value from the context, with the same name as a key.
3535

36-
* **Reason:**
3736
* **Discussion:** [Feature #14579](https://bugs.ruby-lang.org/issues/14579)
38-
* **Documentation:** [doc/syntax/literals.rdoc#Hash Literals](https://docs.ruby-lang.org/en/3.1/syntax/literals_rdoc.html#label-Hash+Literals), [doc/methods.rdoc#Keyword Arguments](https://docs.ruby-lang.org/en/3.1/syntax/methods_rdoc.html#label-Keyword+Arguments), [Hash](https://docs.ruby-lang.org/en/3.1/Hash.html)
37+
* **Documentation:** [doc/syntax/literals.rdoc#Hash Literals](https://docs.ruby-lang.org/en/3.1/syntax/literals_rdoc.html#label-Hash+Literals), [doc/methods.rdoc#Keyword Arguments](https://docs.ruby-lang.org/en/3.1/syntax/calling_methods_rdoc.html#label-Keyword+Arguments), [Hash](https://docs.ruby-lang.org/en/3.1/Hash.html)
3938
* **Code:**
4039
```ruby
4140
x, y = 100, 200
@@ -70,8 +69,6 @@ In hash literals and method calls, `x:` is now a shortcut for `x: x`—take hash
7069
{'x':}
7170
# ^
7271
# syntax error, unexpected '}' (SyntaxError)
73-
74-
TODO: self, if, etc
7572
```
7673
* **Notes:** Be aware, that using new feature in a method call without parenthesis might lead to unexpected effect:
7774
```ruby

_src/evolution.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ This section lists changes in how methods are defined and invoked, as well as ne
341341
```
342342
* [3.1](3.1.md#methodunboundmethod-public-private-protected) [Method#private?](https://docs.ruby-lang.org/en/3.1/Method.html#method-i-private-3F), `#protected?`, `#public?`, same are defined for `UnboundMethod`
343343
* [3.2](3.2.md#methodpublic-protected-and-private-are-removed) The change was reverted.
344-
* [3.1](3.1.md#values-in-hash-literals-and-keyword-arguments-can-be-omitted) **Values in keyword arguments [can be omitted](https://docs.ruby-lang.org/en/3.1/syntax/methods_rdoc.html#label-Keyword+Arguments)**:
344+
* [3.1](3.1.md#values-in-hash-literals-and-keyword-arguments-can-be-omitted) **Values in keyword arguments [can be omitted](https://docs.ruby-lang.org/en/3.1/syntax/calling_methods_rdoc.html#label-Keyword+Arguments)**:
345345
```ruby
346346
x = 100
347347
p(x:) # same as p(x: x), prints: {:x => 100}
@@ -533,7 +533,7 @@ Included in many classes to implement comparison methods. Once class defines a m
533533

534534
## `Data`
535535

536-
* [3.2](3.2.md#data-new-immutable-value-object-class) **[Data](https://docs.ruby-lang.org/en/3.2/Data.html): new immutable value object class introduced.** It has a stricter and leander interface than `Struct`:
536+
* [3.2](3.2.md#data-new-immutable-value-object-class) **[Data](https://docs.ruby-lang.org/en/3.2/Data.html): new immutable value object class introduced.** It has a stricter and leaner interface than `Struct`:
537537
```ruby
538538
Point = Data.define(:x, :y)
539539

evolution.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ This section lists changes in how methods are defined and invoked, as well as ne
321321
(1..50).grep(Prime.method(:prime?))
322322
#=> [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
323323
```
324-
* <span class="ruby-version">[2.7](2.7.md#selfprivate_method)</span> `self.<private_method>` <a class="ruby-doc" href="https://ruby-doc.org/core-2.7.0/syntax/doc/modules_and_classes_rdoc.html#label-Visibility">is allowed</a>
324+
* <span class="ruby-version">[2.7](2.7.md#selfprivate_method)</span> `self.<private_method>` <a class="ruby-doc" href="https://ruby-doc.org/core-2.7.0/doc/syntax/modules_and_classes_rdoc.html#label-Visibility">is allowed</a>
325325
* <span class="ruby-version">[2.7](2.7.md#keyword-argument-related-changes)</span> **[Big Keyword Argument Separation](https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/):** some incompatibilities were introduced by need, so the distinction of keyword arguments and hashes in method arguments was more clear, handling numerous irritating edge cases.
326326
* <span class="ruby-version">[2.7](2.7.md#keyword-argument-related-changes)</span> Introduce argument forwarding with `method(...)` syntax. As after the keyword argument separation "delegate everything" syntax became more complicated (you need to use and pass `(*args, **kwargs)`, because just `*args` wouldn't always work), simplified syntax was introduced:
327327
```ruby
@@ -341,7 +341,7 @@ This section lists changes in how methods are defined and invoked, as well as ne
341341
```
342342
* <span class="ruby-version">[3.1](3.1.md#methodunboundmethod-public-private-protected)</span> <a class="ruby-doc" href="https://docs.ruby-lang.org/en/3.1/Method.html#method-i-private-3F"><code>Method#private?</code></a>, `#protected?`, `#public?`, same are defined for `UnboundMethod`
343343
* <span class="ruby-version">[3.2](3.2.md#methodpublic-protected-and-private-are-removed)</span> The change was reverted.
344-
* <span class="ruby-version">[3.1](3.1.md#values-in-hash-literals-and-keyword-arguments-can-be-omitted)</span> **Values in keyword arguments <a class="ruby-doc" href="https://docs.ruby-lang.org/en/3.1/syntax/methods_rdoc.html#label-Keyword+Arguments">can be omitted</a>**:
344+
* <span class="ruby-version">[3.1](3.1.md#values-in-hash-literals-and-keyword-arguments-can-be-omitted)</span> **Values in keyword arguments <a class="ruby-doc" href="https://docs.ruby-lang.org/en/3.1/syntax/calling_methods_rdoc.html#label-Keyword+Arguments">can be omitted</a>**:
345345
```ruby
346346
x = 100
347347
p(x:) # same as p(x: x), prints: {:x => 100}

0 commit comments

Comments
 (0)