Skip to content

Commit

Permalink
Clarify 3-4-0-preview2 release notes (#3380)
Browse files Browse the repository at this point in the history
The part about chilled string has changed since preview1.

And I also think we should call out the Hash#inspect change.
  • Loading branch information
byroot authored Oct 7, 2024
1 parent 3e7096c commit 235860a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions en/news/_posts/2024-10-07-ruby-3-4-0-preview2-released.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Switch the default parser from parse.y to Prism. [[Feature #20564]]

## Language changes

* String literals in files without a `frozen_string_literal` comment now behave
as if they were frozen. If they are mutated a deprecation warning is emitted.
* String literals in files without a `frozen_string_literal` comment now emit a deprecation warning
when they are mutated.
These warnings can be enabled with `-W:deprecated` or by setting `Warning[:deprecated] = true`.
To disable this change, you can run Ruby with the `--disable-frozen-string-literal`
command line argument. [[Feature #20205]]
Expand Down Expand Up @@ -66,6 +66,9 @@ Note: Excluding feature bug fixes.
from test.rb:2:in `<main>'
```

* `Hash#inspect` rendering has changed. [[Bug #20433]]
* Symbol keys are displayed using the modern symbol key syntax: `"{user: 1}"`
* Other keys now have spaces around `=>`: `'{"user" => 1}'`, while previously they didn't: `'{"user"=>1}'`

## C API updates

Expand Down Expand Up @@ -142,3 +145,4 @@ and is used all over the world especially for web development.
[Feature #20265]: https://bugs.ruby-lang.org/issues/20265
[Feature #20429]: https://bugs.ruby-lang.org/issues/20429
[Feature #20564]: https://bugs.ruby-lang.org/issues/20564
[Bug #20433]: https://bugs.ruby-lang.org/issues/20433

0 comments on commit 235860a

Please sign in to comment.