Skip to content

Commit f6dc0d3

Browse files
committed
Translate "Ruby 3.2.0 preview2 Released"
1 parent 42e8cf1 commit f6dc0d3

File tree

1 file changed

+104
-110
lines changed

1 file changed

+104
-110
lines changed

ko/news/_posts/2022-09-09-ruby-3-2-0-preview2-released.md

+104-110
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,89 @@
11
---
22
layout: news_post
3-
title: "Ruby 3.2.0 Preview 2 Released"
3+
title: "Ruby 3.2.0 Preview 2 릴리스"
44
author: "naruse"
5-
translator:
5+
translator: "shia"
66
date: 2022-09-09 00:00:00 +0000
7-
lang: en
7+
lang: ko
88
---
99

1010
{% assign release = site.data.releases | where: "version", "3.2.0-preview2" | first %}
1111

12-
We are pleased to announce the release of Ruby {{ release.version }}. Ruby 3.2 adds many features and performance improvements.
12+
Ruby {{ release.version }} 릴리스를 알리게 되어 기쁩니다. Ruby 3.2는 많은 기능과 성능 향상을 포함하고 있습니다.
1313

1414

15-
## WASI based WebAssembly support
15+
## WASI 기반 웹어셈블리 지원
1616

17-
This is an initial port of WASI based WebAssembly support. This enables a CRuby binary to be available on Web browser, Serverless Edge environment, and other WebAssembly/WASI embedders. Currently this port passes basic and bootstrap test suites not using Thread API.
17+
WASI에 기반해 웹어셈블리를 지원하는 첫 이식판입니다. 이를 통해 CRuby 바이너리는 웹 브라우저, 서버리스 엣지 환경, 그 이외의 웹어셈블리/WASI를 사용 가능한 환경에서 동작할 수 있습니다. 현재 이 이식판은 스레드 API를 사용하지 않는 기본적인 테스트와 부트스트랩 테스트 스위트를 통과합니다.
1818

1919
![](https://i.imgur.com/opCgKy2.png)
2020

21-
### Background
21+
### 배경
2222

23-
[WebAssembly (Wasm)](https://webassembly.org/) is originally introduced to run programs safely and fast in web browsers. But its objective - running programs efficinently with security on various environment - is long wanted not only by web but also by general applications.
23+
[웹어셈블리(Wasm)](https://webassembly.org/)는 본래 웹 브라우저에서 프로그램을 안전하고 빠르게 실행하기 위해서 만들어졌습니다. 하지만 그 목적 중 하나인 프로그램을 다양한 환경에서 안전하고 효율적으로 실행하는 것은 웹뿐만이 아니라 일반적인 애플리케이션도 바라던 것입니다.
2424

25-
[WASI (The WebAssembly System Interface)](https://wasi.dev/) is designed for such use cases. Though such applications need to communicate with operating systems, WebAssembly runs on a virtual machine which didn't have a system interface. WASI standardizes it.
25+
[WASI(The WebAssembly System Interface)](https://wasi.dev/)는 이러한 용도를 위해 설계되었습니다. 이러한 애플리케이션은 운영체제와 통신해야 합니다만, 웹어셈블리는 시스템 인터페이스를 가지지 않는 가상 머신 위에서 동작합니다. WASI는 이 인터페이스를 표준화합니다.
2626

27-
WebAssembly/WASI Support in Ruby intends to leverage those projects. It enables Ruby developers to write applications which runs on such promised platform.
27+
Ruby의 웹어셈블리/WASI 지원은 이러한 프로젝트들을 활용하기 위함입니다. 이를 통해 Ruby 개발자들이 약속한 플랫폼에서 움직이는 애플리케이션을 작성할 수 있습니다.
2828

29-
### Use case
29+
### 사용 예시
3030

31-
This support encourages developers can utilize CRuby in WebAssembly environment. An example use case of it is [TryRuby playground](https://try.ruby-lang.org/playground/)'s CRuby support. Now you can try original CRuby in your web browser.
31+
이는 개발자가 웹어셈블리 환경에서 CRuby를 활용할 수 있도록 돕습니다. 하나의 예로, [TryRuby playground](https://try.ruby-lang.org/playground/) CRuby 지원이 있습니다. 이제 CRuby를 웹 브라우저 상에서 직접 사용해볼 수 있습니다.
3232

33-
### Technical points
33+
### 기술적인 부분
3434

35-
Today’s WASI and WebAssembly itself has some missing features to implement Fiber, exception, and GC because it’s still evolving and also for security reasons. So CRuby fills the gap by using Asyncify, which is a binary transformation technique to control execution in userland.
35+
현재 WASI와 웹어셈블리 자체에는 Fiber, 예외 처리, GC를 구현하기 위한 일부 기능이 부족합니다. 이는 여전히 개발 중이라는 점도 있지만, 보안 때문이기도 합니다. 그래서 CRuby는 사용자 공간에서의 실행을 제어하기 위한 바이너리 변환 기술인 Asyncify를 사용해 그 차이를 메꿉니다.
3636

37-
In addition, we built [a VFS on top of WASI](https://github.com/kateinoigakukun/wasi-vfs/wiki/Getting-Started-with-CRuby) so that we can easily pack Ruby apps into a single .wasm file. This makes distribution of Ruby apps a bit easier.
37+
나아가서 Ruby 앱을 간단하게 단일 .wasm 파일로 패키징할 수 있도록 [WASI 상에 VFS](https://github.com/kateinoigakukun/wasi-vfs/wiki/Getting-Started-with-CRuby)를 구현했습니다. 이는 Ruby 앱의 배포를 쉽게 해줄 것입니다.
3838

39-
40-
### Related links
39+
### 관련 링크
4140

4241
* [Add WASI based WebAssembly support #5407](https://github.com/ruby/ruby/pull/5407)
4342
* [An Update on WebAssembly/WASI Support in Ruby](https://itnext.io/final-report-webassembly-wasi-support-in-ruby-4aface7d90c9)
4443

45-
## Regexp timeout
44+
## 정규표현식 타임아웃
4645

47-
A timeout feature for Regexp matching is introduced.
46+
정규표현식 일치 처리에 타임아웃 기능을 도입했습니다.
4847

4948
```ruby
5049
Regexp.timeout = 1.0
5150

5251
/^a*b?a*$/ =~ "a" * 50000 + "x"
53-
#=> Regexp::TimeoutError is raised in one second
52+
#=> 1초 후에 Regexp::TimeoutError 발생
5453
```
5554

56-
It is known that Regexp matching may take unexpectedly long. If your code attempts to match an possibly inefficient Regexp against an untrusted input, an attacker may exploit it for efficient Denial of Service (so-called Regular expression DoS, or ReDoS).
55+
정규표현식 일치는 기대와는 다르게 시간이 오래 걸리는 경우가 있습니다. 신뢰할 수 없는 입력에 대해서 비효율적일 가능성이 있는 정규표현식을 일치시키고 있다면, 공격자는 이를 이용해 효율적으로 서비스 거부 공격(이를 정규표현식 DoS, 또는 ReDoS라고 부릅니다)이 가능합니다.
5756

58-
The risk of DoS can be prevented or significantly mitigated by configuring `Regexp.timeout` according to the requirements of your Ruby application. Please try it out in your application and welcome your feedback.
57+
Ruby 애플리케이션의 요구사항에 맞는 `Regexp.timeout`을 설정해 DoS에 대한 위험을 예방하거나 상당히 완화할 수 있습니다. 애플리케이션에 직접 설정해보세요. 피드백도 환영합니다.
5958

60-
Note that `Regexp.timeout` is a global configuration. If you want to use different timeout settings for some special Regexps, you may want to use `timeout` keyword for `Regexp.new`.
59+
`Regexp.timeout`은 전역 설정임에 주의하세요. 일부의 특수한 정규표현식에 대해서만 다른 타임아웃 설정을 사용하고 싶다면, `Regexp.new``timeout` 키워드를 사용할 수 있습니다.
6160

6261
```ruby
6362
Regexp.timeout = 1.0
6463

65-
# This regexp has no timeout
64+
# 이 정규표현식은 타임아웃 설정이 없습니다.
6665
long_time_re = Regexp.new("^a*b?a*$", timeout: nil)
6766

6867
long_time_re =~ "a" * 50000 + "x" # never interrupted
6968
```
7069

71-
The original proposal is https://bugs.ruby-lang.org/issues/17837
70+
기능 제안 티켓: https://bugs.ruby-lang.org/issues/17837
7271

7372

74-
## Other Notable New Features
73+
## 그 이외의 주목할 만한 새 기능
7574

76-
### No longer bundle 3rd party sources
75+
### 서드파티 소스 코드를 더이상 내장하지 않음
7776

78-
* We no longer bundle 3rd party sources like `libyaml`, `libffi`.
77+
* `libyaml`이나 `libffi`와 같은 서드파티의 소스 코드를 내장하지 않기로 결정했습니다.
7978

80-
* libyaml source has been removed from psych. You may need to install `libyaml-dev` with Ubuntu/Debian platfrom. The package name is different each platforms.
79+
* psych에 포함되어 있던 libyaml의 소스 코드는 삭제되었습니다. Ubuntu/Debian 환경이라면 직접 `libyaml-dev`를 설치해야합니다. 이 패키지의 이름은 각 환경마다 다를 수 있습니다.
8180

82-
* libffi will be removed from `fiddle` at preview2
81+
* `fiddle`에 포함되어 있던 libffi는 preview2에서 삭제될 예정입니다.
8382

84-
### Language
83+
### 언어
8584

86-
* Anonymous rest and keyword rest arguments can now be passed as
87-
arguments, instead of just used in method parameters.
88-
[[Feature #18351]]
85+
* 익명 나머지 인수, 익명 나머지 키워드 인수가 파라미터로서뿐만 아니라,
86+
인수로서도 사용할 수 있게 됩니다. [[Feature #18351]]
8987

9088
```ruby
9189
def foo(*)
@@ -96,8 +94,8 @@ The original proposal is https://bugs.ruby-lang.org/issues/17837
9694
end
9795
```
9896

99-
* A proc that accepts a single positional argument and keywords will
100-
no longer autosplat. [[Bug #18633]]
97+
* 1개의 위치 인수와 나머지를 키워드로 받는 프록은 인수를 자동으로 전개하지
98+
않습니다. [[Bug #18633]]
10199

102100
```ruby
103101
proc{|a, **k| a}.call([1, 2])
@@ -107,23 +105,21 @@ The original proposal is https://bugs.ruby-lang.org/issues/17837
107105
# => [1, 2]
108106
```
109107

110-
* Constant assignment evaluation order for constants set on explicit
111-
objects has been made consistent with single attribute assignment
112-
evaluation order. With this code:
108+
* 상수 대입에서의 상수 평가 순서가 단일 속성 대입 시의 평가 순서와
109+
일관성을 가지게 됩니다. 다음 코드의 경우,
113110

114111
```ruby
115112
foo::BAR = baz
116113
```
117114

118-
`foo` is now called before `baz`. Similarly, for multiple assignments
119-
to constants, left-to-right evaluation order is used. With this
120-
code:
115+
`foo`는 이제 `baz`보다 먼저 호출됩니다. 마찬가지로 상수의 다중 대입에서도
116+
왼쪽에서 오른쪽으로 평가됩니다. 다음 코드의 경우,
121117

122118
```ruby
123119
foo1::BAR1, foo2::BAR2 = baz1, baz2
124120
```
125121

126-
The following evaluation order is now used:
122+
아래와 같은 순서로 평가됩니다.
127123

128124
1. `foo1`
129125
2. `foo2`
@@ -132,29 +128,28 @@ The original proposal is https://bugs.ruby-lang.org/issues/17837
132128

133129
[[Bug #15928]]
134130

135-
* Find pattern is no longer experimental.
131+
* 검색 패턴은 이제 정식 기능입니다.
136132
[[Feature #18585]]
137133

138-
* Methods taking a rest parameter (like `*args`) and wishing to delegate keyword
139-
arguments through `foo(*args)` must now be marked with `ruby2_keywords`
140-
(if not already the case). In other words, all methods wishing to delegate
141-
keyword arguments through `*args` must now be marked with `ruby2_keywords`,
142-
with no exception. This will make it easier to transition to other ways of
143-
delegation once a library can require Ruby 3+. Previously, the `ruby2_keywords`
144-
flag was kept if the receiving method took `*args`, but this was a bug and an
145-
inconsistency. A good technique to find the potentially-missing `ruby2_keywords`
146-
is to run the test suite, for where it fails find the last method which must
147-
receive keyword arguments, use `puts nil, caller, nil` there, and check each
148-
method/block on the call chain which must delegate keywords is correctly marked
149-
as `ruby2_keywords`. [[Bug #18625]] [[Bug #16466]]
134+
* `*args`와 같은 나머지 파라미터를 받는 메서드에서 `foo(*args)`를 통해 키워드 인수를
135+
위임하고 싶은 경우, 반드시 `ruby2_keywords`를 사용해야 합니다. 다르게 말하면,
136+
`*args`를 사용해 키워드 인수를 위임하고 싶은 모든 메서드는 예외 없이
137+
`ruby2_keywords`를 사용해야 합니다. 이 변경으로 라이브러리가 Ruby 3 이상을
138+
요구하게 되었을 때 다른 위임 방식으로의 마이그레이션이 간단해집니다.
139+
지금까지 메서드가 `*args`를 넘겨받았을 때, `ruby2_keywords` 플래그가 유지되었습니다만,
140+
이는 의도치 않은 동작이었으며, 일관성이 없었습니다. 빠져있었던 `ruby2_keywords`
141+
찾아내기 위한 좋은 방법 중 한 가지로 테스트를 실행한 뒤, 실패하는 각각의 테스트에서
142+
키워드 인수를 받는 마지막 메서드를 찾고, 그곳에서 `puts nil, caller, nil`를 사용하세요.
143+
그리고 나서 호출 체인의 각 메서드/블록이 키워드를 위임할 때 `ruby2_keywords`
144+
올바르게 사용하고 있는지 확인하세요. [[Bug #18625]] [[Bug #16466]]
150145

151146
```ruby
152147
def target(**kw)
153148
end
154149
155-
# Accidentally worked without ruby2_keywords in Ruby 2.7-3.1, ruby2_keywords
156-
# needed in 3.2+. Just like (*args, **kwargs) or (...) would be needed on
157-
# both #foo and #bar when migrating away from ruby2_keywords.
150+
# 의도치 않게 Ruby 2.7-3.1에서 ruby2_keywords 없이 동작했습니다만,
151+
# Ruby 3.2+에서는 ruby2_keywords가 필요합니다. ruby2_keywords를 사용하지 않는 경우,
152+
# #foo, #bar 양쪽에 (*args, **kwargs)나 (...)이 필요합니다.
158153
ruby2_keywords def bar(*args)
159154
target(*args)
160155
end
@@ -166,65 +161,65 @@ The original proposal is https://bugs.ruby-lang.org/issues/17837
166161
foo(k: 1)
167162
```
168163

169-
## Performance improvements
164+
## 성능 향상
170165

171166
### YJIT
172167

173-
* Support arm64 / aarch64 on UNIX platforms.
174-
* Building YJIT requires Rust 1.58.1+. [[Feature #18481]]
168+
* arm64, aarch64 상의 UNIX 환경을 지원합니다.
169+
* YJIT 빌드하기 위해서는 Rust 1.58.1 이상을 요구합니다. [[Feature #18481]]
175170

176-
## Other notable changes since 3.1
171+
## 3.1 이후로 주목할 만한 변경
177172

178173
* Hash
179-
* Hash#shift now always returns nil if the hash is
180-
empty, instead of returning the default value or
181-
calling the default proc. [[Bug #16908]]
174+
* `Hash#shift`는 이제 해시가 비어있다면
175+
기본 값이나 기본 프록을 호출한 결과 값을 반환하는 대신
176+
언제나 nil을 반환합니다. [[Bug #16908]]
182177

183178
* MatchData
184-
* MatchData#byteoffset has been added. [[Feature #13110]]
179+
* `MatchData#byteoffset`이 추가되었습니다. [[Feature #13110]]
185180

186181
* Module
187-
* Module.used_refinements has been added. [[Feature #14332]]
188-
* Module#refinements has been added. [[Feature #12737]]
189-
* Module#const_added has been added. [[Feature #17881]]
182+
* `Module.used_refinements`가 추가되었습니다. [[Feature #14332]]
183+
* `Module#refinements`가 추가되었습니다. [[Feature #12737]]
184+
* `Module#const_added`가 추가되었습니다. [[Feature #17881]]
190185

191186
* Proc
192-
* Proc#dup returns an instance of subclass. [[Bug #17545]]
193-
* Proc#parameters now accepts lambda keyword. [[Feature #15357]]
187+
* `Proc#dup`은 서브클래스의 인스턴스를 반환합니다. [[Bug #17545]]
188+
* `Proc#parameters`는 이제 람다 키워드를 받습니다. [[Feature #15357]]
194189

195190
* Refinement
196-
* Refinement#refined_class has been added. [[Feature #12737]]
191+
* `Refinement#refined_class`가 추가되었습니다. [[Feature #12737]]
197192

198193
* Set
199-
* Set is now available as a builtin class without the need for `require "set"`. [[Feature #16989]]
200-
It is currently autoloaded via the `Set` constant or a call to `Enumerable#to_set`.
194+
* Set은 이제 `require "set"`할 필요 없이 사용 가능한 내장 클래스입니다. [[Feature #16989]]
195+
현재는 `Set` 상수를 사용하거나 `Enumerable#to_set`을 호출하면 자동으로 로드됩니다.
201196

202197
* String
203-
* String#byteindex and String#byterindex have been added. [[Feature #13110]]
204-
* Update Unicode to Version 14.0.0 and Emoji Version 14.0. [[Feature #18037]]
205-
(also applies to Regexp)
206-
* String#bytesplice has been added. [[Feature #18598]]
198+
* `String#byteindex``String#byterindex`가 추가되었습니다. [[Feature #13110]]
199+
* 유니코드 버전이 14.0.0, 에모지 버전이 14.0으로 갱신되었습니다. [[Feature #18037]]
200+
(이는 정규표현식에도 적용됩니다)
201+
* `String#bytesplice`가 추가되었습니다. [[Feature #18598]]
207202

208203
* Struct
209-
* A Struct class can also be initialized with keyword arguments
210-
without `keyword_init: true` on `Struct.new` [[Feature #16806]]
204+
* `keyword_init: true` 없이 `Struct.new`에 키워드 인수를 넘겨
205+
Struct 클래스를 초기화할 수 있습니다. [[Feature #16806]]
211206

212-
## Compatibility issues
207+
## 호환성 문제
213208

214-
Note: Excluding feature bug fixes.
209+
주의: 기능 버그 수정은 포함되어 있지 않습니다.
215210

216-
### Removed constants
211+
### 삭제된 상수
217212

218-
The following deprecated constants are removed.
213+
폐기 예정이었던 상수가 삭제됩니다.
219214

220-
* `Fixnum` and `Bignum` [[Feature #12005]]
215+
* `Fixnum`, `Bignum` [[Feature #12005]]
221216
* `Random::DEFAULT` [[Feature #17351]]
222217
* `Struct::Group`
223218
* `Struct::Passwd`
224219

225-
### Removed methods
220+
### 삭제된 메서드
226221

227-
The following deprecated methods are removed.
222+
폐기 예정이었던 메서드가 삭제됩니다.
228223

229224
* `Dir.exists?` [[Feature #17391]]
230225
* `File.exists?` [[Feature #17391]]
@@ -236,41 +231,40 @@ The following deprecated methods are removed.
236231

237232
## Stdlib compatibility issues
238233

239-
* `Psych` no longer bundles libyaml sources.
240-
Users need to install the libyaml library themselves via the package
241-
system. [[Feature #18571]]
234+
* `Psych`는 더 이상 `libyaml` 소스 코드를 포함하지 않습니다.
235+
이용자는 패키지 매니저를 사용해서 스스로 `libyaml` 라이브러리를 설치해야합니다. [[Feature #18571]]
242236

243-
## C API updates
237+
## C API 변경
244238

245-
### Removed C APIs
239+
### 삭제된 C API
246240

247-
The following deprecated APIs are removed.
241+
다음 폐기 예정인 API가 삭제됩니다.
248242

249-
* `rb_cData` variable.
250-
* "taintedness" and "trustedness" functions. [[Feature #16131]]
243+
* `rb_cData` 변수.
244+
* "taintedness""trustedness" 함수. [[Feature #16131]]
251245

252-
### Standard libraries updates
246+
### 표준 라이브러리 갱신
253247

254-
* The following default gem are updated.
248+
* 다음 기본 gem이 갱신되었습니다.
255249

256250
* TBD
257251

258-
* The following bundled gems are updated.
252+
* 다음 내장 gem이 갱신되었습니다.
259253

260254
* TBD
261255

262-
* The following default gems are now bundled gems. You need to add the following libraries to `Gemfile` under the bundler environment.
256+
* 다음 기본 gem은 이제 내장 gem입니다. bundler 환경에서는 `Gemfile`에 다음 라이브러리를 추가해야 합니다.
263257

264258
* TBD
265259

266-
See [NEWS](https://github.com/ruby/ruby/blob/{{ release.tag }}/NEWS.md)
267-
or [commit logs](https://github.com/ruby/ruby/compare/v3_1_0...{{ release.tag }})
268-
for more details.
260+
더 자세한 내용은 [NEWS](https://github.com/ruby/ruby/blob/{{ release.tag }}/NEWS.md)
261+
[커밋 로그](https://github.com/ruby/ruby/compare/v3_1_0...{{ release.tag }})
262+
확인해 주세요.
269263

270-
With those changes, [{{ release.stats.files_changed }} files changed, {{ release.stats.insertions }} insertions(+), {{ release.stats.deletions }} deletions(-)](https://github.com/ruby/ruby/compare/v3_1_0...{{ release.tag }}#file_bucket)
271-
since Ruby 3.1.0!
264+
이러한 변경사항에 따라, Ruby 3.1.0 이후로 [파일 {{ release.stats.files_changed }}개 수정, {{ release.stats.insertions }}줄 추가(+), {{ release.stats.deletions }}줄 삭제(-)](https://github.com/ruby/ruby/compare/v3_1_0...{{ release.tag }}#file_bucket)
265+
이루어졌습니다!
272266

273-
## Download
267+
## 다운로드
274268

275269
* <{{ release.url.gz }}>
276270

@@ -293,11 +287,11 @@ since Ruby 3.1.0!
293287
SHA256: {{ release.sha256.zip }}
294288
SHA512: {{ release.sha512.zip }}
295289

296-
## What is Ruby
290+
## Ruby는
297291

298-
Ruby was first developed by Matz (Yukihiro Matsumoto) in 1993,
299-
and is now developed as Open Source. It runs on multiple platforms
300-
and is used all over the world especially for web development.
292+
Ruby1993년에 Matz(마츠모토 유키히로) 씨가 처음 개발했고,
293+
현재는 오픈 소스로서 개발되고 있습니다. 여러 플랫폼에서 동작하며,
294+
특히 웹 개발에서 전 세계적으로 이용되고 있습니다.
301295

302296

303297

0 commit comments

Comments
 (0)