Skip to content

Translate "Ruby 3.4.0 preview2 Released" (ko) #3392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 148 additions & 0 deletions ko/news/_posts/2024-10-07-ruby-3-4-0-preview2-released.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
---
layout: news_post
title: "Ruby 3.4.0 preview2 릴리슀"
author: "naruse"
translator: "shia"
date: 2024-10-07 00:00:00 +0000
lang: ko
---

{% assign release = site.data.releases | where: "version", "3.4.0-preview2" | first %}
Ruby {{ release.version }} 릴리슀λ₯Ό μ•Œλ¦¬κ²Œ λ˜μ–΄ κΈ°μ©λ‹ˆλ‹€.

## Prism

parse.yμ—μ„œ Prism으둜 κΈ°λ³Έ νŒŒμ„œλ₯Ό λ³€κ²½ν–ˆμŠ΅λ‹ˆλ‹€. [[Feature #20564]]

## μ–Έμ–΄ λ³€κ²½

* νŒŒμΌμ— `frozen_string_literal` 주석이 없을 λ•Œ, λ¬Έμžμ—΄ λ¦¬ν„°λŸ΄μ΄ λ³€κ²½λ˜λ©΄
폐기 μ˜ˆμ • κ²½κ³ λ₯Ό 좜λ ₯ν•©λ‹ˆλ‹€.
이 κ²½κ³ λŠ” `-W:deprecated`λ‚˜ `Warning[:deprecated] = true` 섀정을 톡해 ν™œμ„±ν™”ν•  수 μžˆμŠ΅λ‹ˆλ‹€.
이 변경을 λ¬΄νš¨ν™”ν•˜κ³  μ‹Άλ‹€λ©΄ Rubyλ₯Ό μ‹€ν–‰ν•  λ•Œ `--disable-frozen-string-literal` μ»€λ§¨λ“œλΌμΈ 인수λ₯Ό
μ‚¬μš©ν•˜μ„Έμš”. [[Feature #20205]]

* 블둝 인자λ₯Ό κ°€λ¦¬ν‚€λŠ” `it`이 μΆ”κ°€λ©λ‹ˆλ‹€. [[Feature #18980]]

* λ©”μ„œλ“œ 호좜 μ‹œμ— `nil`에 ν‚€μ›Œλ“œ μŠ€ν”Œλž«μ„ μ§€μ›ν•©λ‹ˆλ‹€.
`**nil`은 `**{}`와 λΉ„μŠ·ν•˜κ²Œ λ™μž‘ν•˜λ©°, ν‚€μ›Œλ“œλ₯Ό λ„˜κΈ°μ§€ μ•ŠμœΌλ©°,
μ–΄λ–€ λ³€ν™˜ λ©”μ„œλ“œλ„ ν˜ΈμΆœν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. [[Bug #20064]]

* 블둝을 인덱슀둜 μ‚¬μš©ν•  수 μ—†κ²Œ λ©λ‹ˆλ‹€. [[Bug #19918]]

* ν‚€μ›Œλ“œ 인수λ₯Ό 인덱슀둜 μ‚¬μš©ν•  수 μ—†κ²Œ λ©λ‹ˆλ‹€. [[Bug #20218]]

## μ½”μ–΄ 클래슀 λ³€κ²½

주의: λˆˆμ— λ„λŠ” 클래슀 λ³€κ²½λ§Œμ„ ν¬ν•¨ν•©λ‹ˆλ‹€.

* Exception

* `Exception#set_backtrace`λŠ” 이제 `Thread::Backtrace::Location`의 배열을 μž…λ ₯으둜 받을 수 μžˆμŠ΅λ‹ˆλ‹€.
`Kernel#raise`, `Thread#raise`와 `Fiber#raise`도 같은 ν˜•μ‹μ˜ μž…λ ₯을 λ°›μŠ΅λ‹ˆλ‹€. [[Feature #13557]]

* Range

* `Range#size`λŠ” 이제 λ²”μœ„κ°€ 순회 κ°€λŠ₯ν•˜μ§€ μ•Šλ‹€λ©΄ `TypeError`λ₯Ό λ˜μ§‘λ‹ˆλ‹€. [[Misc #18984]]



## ν˜Έν™˜μ„± 문제

주의: κΈ°λŠ₯ 버그 μˆ˜μ •μ€ ν¬ν•¨λ˜μ–΄ μžˆμ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

* μ—λŸ¬ λ©”μ‹œμ§€μ™€ 백트레이슀의 좜λ ₯ κ²°κ³Όκ°€ λ³€κ²½λ©λ‹ˆλ‹€.
* μ—¬λŠ” λ”°μ˜΄ν‘œλ‘œ λ°±ν‹± λŒ€μ‹  μž‘μ€ λ”°μ˜΄ν‘œλ₯Ό μ‚¬μš©ν•©λ‹ˆλ‹€. [[Feature #16495]]
* λ©”μ„œλ“œ 이름 μ•žμ— 클래슀 이름을 좜λ ₯ν•©λ‹ˆλ‹€(ν΄λž˜μŠ€κ°€ λΆˆλ³€ν•˜λŠ” 이름을 κ°€μ§€κ³  μžˆλŠ” 경우만). [[Feature #19117]]
* `Kernel#caller`, `Thread::Backtrace::Location`의 λ©”μ„œλ“œ 등도 λ§ˆμ°¬κ°€μ§€λ‘œ λ³€κ²½λ©λ‹ˆλ‹€.

```
Old:
test.rb:1:in `foo': undefined method `time' for an instance of Integer
from test.rb:2:in `<main>'

New:
test.rb:1:in 'Object#foo': undefined method 'time' for an instance of Integer
from test.rb:2:in '<main>'
```

* `Hash#inspect` κ²°κ³Όκ°€ λ³€κ²½λ˜μ—ˆμŠ΅λ‹ˆλ‹€. [[Bug #20433]]
* 심볼 ν‚€λŠ” μ΅œμ‹  심볼 ν‚€ ꡬ문을 μ‚¬μš©ν•˜μ—¬ ν‘œμ‹œλ©λ‹ˆλ‹€. μ˜ˆμ‹œ: `"{user: 1}"`
* λ‹€λ₯Έ ν‚€λŠ” `=>` 주변에 곡백이 μΆ”κ°€λ˜μ—ˆμŠ΅λ‹ˆλ‹€. μ˜ˆμ‹œ: `'{"user" => 1}'`. μ΄μ „μ—λŠ” κ·Έλ ‡μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€. μ˜ˆμ‹œ: `'{"user"=>1}'`.

## C API λ³€κ²½

* `rb_newobj`와 `rb_newobj_of`(그리고 λŒ€μ‘ν•˜λŠ” 맀크둜인 `RB_NEWOBJ`, `RB_NEWOBJ_OF`, `NEWOBJ`, `NEWOBJ_OF`)κ°€ μ‚­μ œλ©λ‹ˆλ‹€. [[Feature #20265]]
* 폐기 μ˜ˆμ •μΈ `rb_gc_force_recycle` ν•¨μˆ˜κ°€ μ‚­μ œλ©λ‹ˆλ‹€. [[Feature #18290]]

## κ΅¬ν˜„ κ°œμ„ 

* 더 λ‚˜μ€ μ„±λŠ₯을 μœ„ν•΄ `Array#each`λ₯Ό Ruby둜 μž¬μž‘μ„±ν–ˆμŠ΅λ‹ˆλ‹€. [[Feature #20182]]

## κ·Έ μ΄μ™Έμ˜ λ³€κ²½

* 상세 λͺ¨λ“œ(`-w`)μ—μ„œ λ©”μ„œλ“œμ— λ„˜κΈ΄ 블둝이 μ‚¬μš©λ˜μ§€ μ•Šμ•˜μ„ λ•Œ
κ²½κ³ λ₯Ό 좜λ ₯ν•©λ‹ˆλ‹€.
[[Feature #15554]]

* `String.freeze`λ‚˜ `Integer#+`처럼 인터프리터와 JIT이 νŠΉλ³„νžˆ μ΅œμ ν™”ν•˜λŠ”
λͺ‡λͺ‡ μ½”μ–΄ λ©”μ„œλ“œλ₯Ό μž¬μ •μ˜ν•˜λ©΄ μ„±λŠ₯ 클래슀
κ²½κ³ (`-W:performance`λ‚˜ `Warning[:performance] = true`)λ₯Ό 좜λ ₯ν•©λ‹ˆλ‹€.
[[Feature #20429]]

κΈ°λ³Έ gem λ˜λŠ” λ‚΄μž₯ gem에 λŒ€ν•œ μžμ„Έν•œ λ‚΄μš©μ€ [Logger](https://github.com/ruby/logger/releases)와 같은
GitHub 릴리슀 λ˜λŠ” λ³€κ²½ λ‘œκ·Έμ—μ„œ ν™•μΈν•˜μ„Έμš”.

더 μžμ„Έν•œ λ‚΄μš©μ€ [NEWS](https://github.com/ruby/ruby/blob/{{ release.tag }}/NEWS.md)λ‚˜
[컀밋 둜그](https://github.com/ruby/ruby/compare/v3_3_0...{{ release.tag }})λ₯Ό
확인해 μ£Όμ„Έμš”.

μ΄λŸ¬ν•œ 변경사항에 따라, Ruby 3.3.0 μ΄ν›„λ‘œ [파일 {{ release.stats.files_changed }}개 μˆ˜μ •, {{ release.stats.insertions }}쀄 μΆ”κ°€(+), {{ release.stats.deletions }}쀄 μ‚­μ œ(-)](https://github.com/ruby/ruby/compare/v3_3_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λŠ” 1993년에 Matz(마츠λͺ¨ν†  μœ ν‚€νžˆλ‘œ) 씨가 처음 κ°œλ°œν–ˆκ³ ,
ν˜„μž¬λŠ” μ˜€ν”ˆ μ†ŒμŠ€λ‘œμ„œ 개발되고 μžˆμŠ΅λ‹ˆλ‹€. μ—¬λŸ¬ ν”Œλž«νΌμ—μ„œ λ™μž‘ν•˜λ©°,
특히 μ›Ή κ°œλ°œμ—μ„œ μ „ μ„Έκ³„μ μœΌλ‘œ 이용되고 μžˆμŠ΅λ‹ˆλ‹€.

[Feature #13557]: https://bugs.ruby-lang.org/issues/13557
[Feature #15554]: https://bugs.ruby-lang.org/issues/15554
[Feature #16495]: https://bugs.ruby-lang.org/issues/16495
[Feature #18290]: https://bugs.ruby-lang.org/issues/18290
[Feature #18980]: https://bugs.ruby-lang.org/issues/18980
[Misc #18984]: https://bugs.ruby-lang.org/issues/18984
[Feature #19117]: https://bugs.ruby-lang.org/issues/19117
[Bug #19918]: https://bugs.ruby-lang.org/issues/19918
[Bug #20064]: https://bugs.ruby-lang.org/issues/20064
[Feature #20182]: https://bugs.ruby-lang.org/issues/20182
[Feature #20205]: https://bugs.ruby-lang.org/issues/20205
[Bug #20218]: https://bugs.ruby-lang.org/issues/20218
[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