You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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는 많은 기능과 성능 향상을 포함하고 있습니다.
13
13
14
14
15
-
## WASI based WebAssembly support
15
+
## WASI 기반 웹어셈블리 지원
16
16
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를 사용하지 않는 기본적인 테스트와 부트스트랩 테스트 스위트를 통과합니다.
18
18
19
19

20
20
21
-
### Background
21
+
### 배경
22
22
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/)는 본래 웹 브라우저에서 프로그램을 안전하고 빠르게 실행하기 위해서 만들어졌습니다. 하지만 그 목적 중 하나인 프로그램을 다양한 환경에서 안전하고 효율적으로 실행하는 것은 웹뿐만이 아니라 일반적인 애플리케이션도 바라던 것입니다.
24
24
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는 이 인터페이스를 표준화합니다.
26
26
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 개발자들이 약속한 플랫폼에서 움직이는 애플리케이션을 작성할 수 있습니다.
28
28
29
-
### Use case
29
+
### 사용 예시
30
30
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를 웹 브라우저 상에서 직접 사용해볼 수 있습니다.
32
32
33
-
### Technical points
33
+
### 기술적인 부분
34
34
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를 사용해 그 차이를 메꿉니다.
36
36
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 앱의 배포를 쉽게 해줄 것입니다.
38
38
39
-
40
-
### Related links
39
+
### 관련 링크
41
40
42
41
*[Add WASI based WebAssembly support #5407](https://github.com/ruby/ruby/pull/5407)
43
42
*[An Update on WebAssembly/WASI Support in Ruby](https://itnext.io/final-report-webassembly-wasi-support-in-ruby-4aface7d90c9)
44
43
45
-
## Regexp timeout
44
+
## 정규표현식 타임아웃
46
45
47
-
A timeout feature for Regexp matching is introduced.
46
+
정규표현식 일치 처리에 타임아웃 기능을 도입했습니다.
48
47
49
48
```ruby
50
49
Regexp.timeout =1.0
51
50
52
51
/^a*b?a*$/=~"a"*50000+"x"
53
-
#=> Regexp::TimeoutError is raised in one second
52
+
#=> 1초 후에 Regexp::TimeoutError 발생
54
53
```
55
54
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라고 부릅니다)이 가능합니다.
57
56
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에 대한 위험을 예방하거나 상당히 완화할 수 있습니다. 애플리케이션에 직접 설정해보세요. 피드백도 환영합니다.
59
58
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`키워드를 사용할 수 있습니다.
61
60
62
61
```ruby
63
62
Regexp.timeout =1.0
64
63
65
-
#This regexp has no timeout
64
+
#이 정규표현식은 타임아웃 설정이 없습니다.
66
65
long_time_re =Regexp.new("^a*b?a*$", timeout:nil)
67
66
68
67
long_time_re =~"a"*50000+"x"# never interrupted
69
68
```
70
69
71
-
The original proposal ishttps://bugs.ruby-lang.org/issues/17837
70
+
기능 제안 티켓:https://bugs.ruby-lang.org/issues/17837
72
71
73
72
74
-
## Other Notable New Features
73
+
## 그 이외의 주목할 만한 새 기능
75
74
76
-
### No longer bundle 3rd party sources
75
+
### 서드파티 소스 코드를 더이상 내장하지 않음
77
76
78
-
*We no longer bundle 3rd party sources like `libyaml`, `libffi`.
77
+
*`libyaml`이나 `libffi`와 같은 서드파티의 소스 코드를 내장하지 않기로 결정했습니다.
79
78
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`를 설치해야합니다. 이 패키지의 이름은 각 환경마다 다를 수 있습니다.
81
80
82
-
*libffi will be removed from `fiddle` at preview2
81
+
*`fiddle`에 포함되어 있던 libffi는 preview2에서 삭제될 예정입니다.
83
82
84
-
### Language
83
+
### 언어
85
84
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]]
89
87
90
88
```ruby
91
89
deffoo(*)
@@ -96,8 +94,8 @@ The original proposal is https://bugs.ruby-lang.org/issues/17837
96
94
end
97
95
```
98
96
99
-
*Aproc that accepts a single positional argument and keywords will
100
-
no longer autosplat. [[Bug#18633]]
97
+
*1개의 위치 인수와 나머지를 키워드로 받는 프록은 인수를 자동으로 전개하지
98
+
않습니다. [[Bug#18633]]
101
99
102
100
```ruby
103
101
proc{|a, **k| a}.call([1, 2])
@@ -107,23 +105,21 @@ The original proposal is https://bugs.ruby-lang.org/issues/17837
107
105
# => [1, 2]
108
106
```
109
107
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
+
일관성을 가지게 됩니다. 다음 코드의 경우,
113
110
114
111
```ruby
115
112
foo::BAR = baz
116
113
```
117
114
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
+
왼쪽에서 오른쪽으로 평가됩니다. 다음 코드의 경우,
121
117
122
118
```ruby
123
119
foo1::BAR1, foo2::BAR2 = baz1, baz2
124
120
```
125
121
126
-
The following evaluation order is now used:
122
+
아래와 같은 순서로 평가됩니다.
127
123
128
124
1. `foo1`
129
125
2. `foo2`
@@ -132,29 +128,28 @@ The original proposal is https://bugs.ruby-lang.org/issues/17837
132
128
133
129
[[Bug#15928]]
134
130
135
-
*Find pattern is no longer experimental.
131
+
*검색 패턴은 이제 정식 기능입니다.
136
132
[[Feature#18585]]
137
133
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
-
(ifnot 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 requireRuby3+. 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`를 사용해야 합니다. 이 변경으로 라이브러리가 Ruby3 이상을
138
+
요구하게 되었을 때 다른 위임 방식으로의 마이그레이션이 간단해집니다.
139
+
지금까지 메서드가 `*args`를 넘겨받았을 때, `ruby2_keywords` 플래그가 유지되었습니다만,
140
+
이는 의도치 않은 동작이었으며, 일관성이 없었습니다. 빠져있었던 `ruby2_keywords`를
141
+
찾아내기 위한 좋은 방법 중 한 가지로 테스트를 실행한 뒤, 실패하는 각각의 테스트에서
142
+
키워드 인수를 받는 마지막 메서드를 찾고, 그곳에서 `puts nil, caller, nil`를 사용하세요.
143
+
그리고 나서 호출 체인의 각 메서드/블록이 키워드를 위임할 때 `ruby2_keywords`를
144
+
올바르게 사용하고 있는지 확인하세요. [[Bug#18625]] [[Bug #16466]]
150
145
151
146
```ruby
152
147
def target(**kw)
153
148
end
154
149
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)나 (...)이 필요합니다.
158
153
ruby2_keywords def bar(*args)
159
154
target(*args)
160
155
end
@@ -166,65 +161,65 @@ The original proposal is https://bugs.ruby-lang.org/issues/17837
0 commit comments