Skip to content

Commit fd432cb

Browse files
committed
Translate "Ruby 2.7.0-preview2 Released" (ko)
1 parent e6d41d3 commit fd432cb

File tree

1 file changed

+99
-84
lines changed

1 file changed

+99
-84
lines changed
Lines changed: 99 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,38 @@
11
---
22
layout: news_post
3-
title: "Ruby 2.7.0-preview2 Released"
3+
title: "루비 2.7.0-preview2 릴리스"
44
author: "naruse"
5-
translator:
5+
translator: "yous"
66
date: 2019-10-22 12:00:00 +0000
7-
lang: en
7+
lang: ko
88
---
99

10-
We are pleased to announce the release of Ruby 2.7.0-preview2.
10+
루비 2.7.0-preview2 릴리스를 알리게 되어 기쁩니다.
1111

12-
A preview version is released to gather feedback for the final release planned to release on December. It introduces a number of new features and performance improvements, most notably:
12+
프리뷰 버전은 12월에 예정된 최종 릴리스에 대한 의견을 모으기 위해서 릴리스됩니다.
13+
이는 많은 새 기능과 성능 향상을 포함하고 있습니다. 특히 눈에 띄는 것은 다음과 같습니다.
1314

14-
* Compaction GC
15-
* Pattern Matching
16-
* REPL improvement
17-
* Separation of positional and keyword arguments
15+
* 압축 GC
16+
* 패턴 매칭
17+
* REPL 개선
18+
* 위치 인자와 키워드 인자 분리
1819

19-
## Compaction GC
20+
## 압축 GC
2021

21-
This release introduces Compaction GC which can defragment a fragmented memory space.
22+
이 릴리스는 단편화된 메모리를 최적화할 수 있는 압축 GC를 도입합니다.
2223

23-
Some multi-threaded Ruby programs may cause memory fragmentation, leading to high memory usage and degraded speed.
24+
몇몇 멀티 스레드를 이용하는 루비 프로그램은 메모리 단편화를 일으킬 수 있고,
25+
이는 과다한 메모리 사용량과 성능 저하로 이어질 수 있습니다.
2426

25-
The `GC.compact` method is introduced for compacting the heap. This function compacts live objects in the heap so that fewer pages may be used, and the heap may be more CoW friendly. [[Feature #15626]](https://bugs.ruby-lang.org/issues/15626)
27+
`GC.compact` 메서드는 힙 공간을 압축합니다.
28+
이 함수는 더 적은 페이지를 사용하고, 힙이 CoW(Copy on Write)에 유리하도록 힙 내부에 살아있는 객체들을 압축합니다.
29+
[[Feature #15626]](https://bugs.ruby-lang.org/issues/15626)
2630

27-
## Pattern Matching [Experimental]
31+
## 패턴 매칭 [실험적]
2832

29-
Pattern matching, widely used feature in functional programming languages, is introduced as an experimental feature. [[Feature #14912]](https://bugs.ruby-lang.org/issues/14912)
30-
It can traverse a given object and assign its value if it matches a pattern.
33+
함수형 언어에서 널리 사용되는 기능인 패턴 매칭이 실험적으로 도입되었습니다.
34+
[[Feature #14912]](https://bugs.ruby-lang.org/issues/14912)
35+
이는 주어진 객체를 순회하다가 패턴이 일치하는 경우 그 값을 대입합니다.
3136

3237
{% highlight ruby %}
3338
case JSON.parse('{...}', symbolize_names: true)
@@ -37,28 +42,29 @@ in {name: "Alice", children: [{name: "Bob", age: age}]}
3742
end
3843
{% endhighlight %}
3944

40-
For more details, please see [Pattern matching - New feature in Ruby 2.7](https://speakerdeck.com/k_tsj/pattern-matching-new-feature-in-ruby-2-dot-7).
45+
더 자세한 설명은 [Pattern matching - New feature in Ruby 2.7](https://speakerdeck.com/k_tsj/pattern-matching-new-feature-in-ruby-2-dot-7)을 확인해 주세요.
4146

42-
## REPL improvement
47+
## REPL 개선
4348

44-
`irb`, bundled interactive environment (REPL; Read-Eval-Print-Loop), now supports multi-line editing. It's powered by `reline`, `readline`-compatible pure Ruby implementation.
45-
It also provides rdoc integration. In `irb` you can display the reference for a given class, module, or method. [[Feature #14683]](https://bugs.ruby-lang.org/issues/14683), [[Feature #14787]](https://bugs.ruby-lang.org/issues/14787), [[Feature #14918]](https://bugs.ruby-lang.org/issues/14918)
46-
Besides, source lines shown at `binding.irb` and inspect results for core-class objects are now colorized.
49+
루비에 포함되어 있는 상호작용 환경(REPL; Read-Eval-Print-Loop)인 `irb`가 이제 여러 줄 편집을 지원합니다.
50+
이는 `reline`, `readline`과 호환되는 순수 루비 구현으로 동작합니다.
51+
또한 rdoc 통합도 제공됩니다. `irb`에서 주어진 클래스, 모듈, 메서드의 레퍼런스를 볼 수 있습니다.
52+
[[Feature #14683]](https://bugs.ruby-lang.org/issues/14683), [[Feature #14787]](https://bugs.ruby-lang.org/issues/14787), [[Feature #14918]](https://bugs.ruby-lang.org/issues/14918)
53+
그뿐만 아니라, `binding.irb`에서 보이는 소스 코드나 코어 클래스 객체의 inspect 결과에 색이 추가되었습니다.
4754

4855
<video autoplay="autoplay" controls="controls" muted="muted" width="576" height="259">
4956
<source src="https://cache.ruby-lang.org/pub/media/irb_improved_with_key_take2.mp4" type="video/mp4">
5057
</video>
5158

52-
## Separation of positional and keyword arguments
59+
## 위치 인자와 키워드 인자 분리
5360

54-
Automatic conversion of keyword arguments and positional arguments is
55-
deprecated, and conversion will be removed in Ruby 3. [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183)
61+
키워드 인자와 위치 인자의 자동 변환이 폐기 예정 상태가 되었습니다.
62+
이 변환은 루비 3에서 제거될 예정입니다. [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183)
5663

57-
* When a method call passes a Hash at the last argument, and when it
58-
passes no keywords, and when the called method accepts keywords, a
59-
warning is emitted. To continue treating as keywords, add a double
60-
splat operator to avoid the warning and ensure correct behavior in
61-
Ruby 3.
64+
* 메서드 호출이 마지막 인자로 Hash를 넘기며 아무 키워드도 넘기지 않는데,
65+
호출된 메서드는 키워드를 받을 때 경고가 발생합니다.
66+
계속 키워드로 취급되도록 하려면, 이중 스플랫(double splat) 연산자를 추가해서
67+
경고를 피하고 루비 3에서 올바르게 동작하도록 하세요.
6268

6369
{% highlight ruby %}
6470
def foo(key: 42); end; foo({key: 42}) # warned
@@ -67,11 +73,9 @@ deprecated, and conversion will be removed in Ruby 3. [[Feature #14183]](https:
6773
def foo(**kw); end; foo(**{key: 42}) # OK
6874
{% endhighlight %}
6975

70-
* When a method call passes keywords to a method that accepts keywords,
71-
but it does not pass enough required positional arguments, the
72-
keywords are treated as a final required positional argument, and a
73-
warning is emitted. Pass the argument as a hash instead of keywords
74-
to avoid the warning and ensure correct behavior in Ruby 3.
76+
* 메서드 호출이 키워드를 넘기고 호출된 메서드도 키워드를 받을 때,
77+
필요한 위치 인자가 부족한 경우 키워드들을 마지막 위치 인자로 간주하고 경고가 발생합니다.
78+
경고를 피하고 루비 3에서 올바르게 동작하도록 하려면 인자를 키워드 대신 해시로 넘기세요.
7579

7680
{% highlight ruby %}
7781
def foo(h, **kw); end; foo(key: 42) # warned
@@ -80,36 +84,34 @@ deprecated, and conversion will be removed in Ruby 3. [[Feature #14183]](https:
8084
def foo(h, key: 42); end; foo({key: 42}) # OK
8185
{% endhighlight %}
8286

83-
* When a method accepts specific keywords but not a keyword splat, and
84-
a hash or keywords splat is passed to the method that includes both
85-
Symbol and non-Symbol keys, the hash will continue to be split, and
86-
a warning will be emitted. You will need to update the calling code
87-
to pass separate hashes to ensure correct behavior in Ruby 3.
87+
* 메서드가 키워드 스플랫(splat)은 받지 않고 특정 키워드는 받을 때,
88+
심볼과 심볼이 아닌 키를 모두 포함한 해시 또는 키워드 스플랫을 메서드에 넘긴 경우 경고가 발생합니다.
89+
루비 3에서 올바르게 동작하려면 메서드를 호출하는 코드가 별도의 해시를 넘기도록 업데이트해야 합니다.
8890

8991
{% highlight ruby %}
9092
def foo(h={}, key: 42); end; foo("key" => 43, key: 42) # warned
9193
def foo(h={}, key: 42); end; foo({"key" => 43, key: 42}) # warned
9294
def foo(h={}, key: 42); end; foo({"key" => 43}, key: 42) # OK
9395
{% endhighlight %}
9496

95-
* If a method does not accept keywords, and is called with keywords,
96-
the keywords are still treated as a positional hash, with no warning.
97-
This behavior will continue to work in Ruby 3.
97+
* 메서드가 키워드를 받지 않는데 키워드와 함께 호출되면,
98+
키워드는 위치 인자에 해당하는 해시로 인식되고, 경고가 발생하지 않습니다.
99+
이 동작은 루비 3에서도 유지될 것입니다.
98100

99101
{% highlight ruby %}
100102
def foo(opt={}); end; foo( key: 42 ) # OK
101103
{% endhighlight %}
102104

103-
* Non-symbols are allowed as a keyword argument keys if method accepts
104-
arbitrary keywords. [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183)
105+
* 메서드가 임의의 키워드를 받으면 심볼이 아닌 키도 키워드 인자로 허용됩니다.
106+
[[Feature #14183]](https://bugs.ruby-lang.org/issues/14183)
105107

106108
{% highlight ruby %}
107109
def foo(**kw); p kw; end; foo("str" => 1) #=> {"str"=>1}
108110
{% endhighlight %}
109111

110-
* <code>**nil</code> is allowed in method definitions to explicitly mark
111-
that the method accepts no keywords. Calling such a method with keywords
112-
will result in an ArgumentError. [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183)
112+
* 메서드가 키워드를 받지 않음을 명시하기 위해 메서드 정의에서 `**nil`을 사용할 수 있습니다.
113+
이러한 메서드를 키워드와 함께 호출하면 ArgumentError가 발생합니다.
114+
[[Feature #14183]](https://bugs.ruby-lang.org/issues/14183)
113115

114116
{% highlight ruby %}
115117
def foo(h, **nil); end; foo(key: 1) # ArgumentError
@@ -119,10 +121,10 @@ deprecated, and conversion will be removed in Ruby 3. [[Feature #14183]](https:
119121
def foo(h, **nil); end; foo({"str" => 1}) # OK
120122
{% endhighlight %}
121123

122-
* Passing an empty keyword splat to a method that does not accept keywords
123-
no longer passes an empty hash, unless the empty hash is necessary for
124-
a required parameter, in which case a warning will be emitted. Remove
125-
the double splat to continue passing a positional hash. [[Feature #14183]](https://bugs.ruby-lang.org/issues/14183)
124+
* 키워드를 받지 않는 메서드에 빈 키워드 스플랫을 넘겼을 때, 더 이상 빈 해시를 넘기지 않습니다.
125+
파라미터가 필요한 경우 빈 해시를 넘기지만, 경고가 발생합니다.
126+
위치 인자로서 해시를 넘기려면 이중 스플랫(double splat)을 제거하세요.
127+
[[Feature #14183]](https://bugs.ruby-lang.org/issues/14183)
126128

127129
{% highlight ruby %}
128130
h = {}; def foo(*a) a end; foo(**h) # []
@@ -131,28 +133,32 @@ deprecated, and conversion will be removed in Ruby 3. [[Feature #14183]](https:
131133
h = {}; def foo(a) a end; foo(h) # {}
132134
{% endhighlight %}
133135

134-
## Other Notable New Features
136+
## 이외의 주목할 만한 새 기능
135137

136-
* A method reference operator, <code>.:</code>, is introduced as an experimental feature. [[Feature #12125]](https://bugs.ruby-lang.org/issues/12125), [[Feature #13581]]( https://bugs.ruby-lang.org/issues/13581)
138+
* 메서드 참조 연산자 `.:`가 실험적으로 도입되었습니다.
139+
[[Feature #12125]](https://bugs.ruby-lang.org/issues/12125), [[Feature #13581]]( https://bugs.ruby-lang.org/issues/13581)
137140

138-
* Numbered parameter as the default block parameter is introduced as an experimental feature. [[Feature #4475]](https://bugs.ruby-lang.org/issues/4475)
141+
* 번호 지정 파라미터가 기본 블록 파라미터로서 실험적으로 도입되었습니다.
142+
[[Feature #4475]](https://bugs.ruby-lang.org/issues/4475)
139143

140-
* A beginless range is experimentally introduced. It might not be as useful
141-
as an endless range, but would be good for DSL purpose. [[Feature #14799]](https://bugs.ruby-lang.org/issues/14799)
144+
* 시작 값을 지정하지 않는 범위 연산자가 실험적으로 추가됩니다.
145+
종료 지정이 없는 범위 연산자처럼 유용하지 않을 수도 있습니다만, DSL 용도로는 유용할 것입니다.
146+
[[Feature #14799]](https://bugs.ruby-lang.org/issues/14799)
142147

143148
{% highlight ruby %}
144149
ary[..3] # identical to ary[0..3]
145150
rel.where(sales: ..100)
146151
{% endhighlight %}
147152

148-
* `Enumerable#tally` is added. It counts the occurrence of each element.
153+
* `Enumerable#tally`가 추가됩니다. 이는 각 요소가 몇 번 출현했는지를 셉니다.
149154

150155
{% highlight ruby %}
151156
["a", "b", "c", "b"].tally
152157
#=> {"a"=>1, "b"=>2, "c"=>1}
153158
{% endhighlight %}
154159

155-
* Calling a private method on `self` is now allowed. [[Feature #11297]](https://bugs.ruby-lang.org/issues/11297) [[Feature #16123]](https://bugs.ruby-lang.org/issues/16123)
160+
* `self`에 private 메서드를 호출하는 것이 허용됩니다.
161+
[[Feature #11297]](https://bugs.ruby-lang.org/issues/11297) [[Feature #16123]](https://bugs.ruby-lang.org/issues/16123)
156162

157163
{% highlight ruby %}
158164
def foo
@@ -161,8 +167,9 @@ deprecated, and conversion will be removed in Ruby 3. [[Feature #14183]](https:
161167
self.foo
162168
{% endhighlight %}
163169

164-
* `Enumerator::Lazy#eager` is added. It generates a non-lazy enumerator
165-
from a lazy enumerator. [[Feature #15901]](https://bugs.ruby-lang.org/issues/15901)
170+
* `Enumerator::Lazy#eager`가 추가됩니다.
171+
지연 열거자(lazy enumerator)에서 지연 없는 열거자를 생성합니다.
172+
[[Feature #15901]](https://bugs.ruby-lang.org/issues/15901)
166173

167174
{% highlight ruby %}
168175
a = %w(foo bar baz)
@@ -171,54 +178,61 @@ deprecated, and conversion will be removed in Ruby 3. [[Feature #14183]](https:
171178
p e.map {|x| x + "?" } #=> ["FOO!?", "BAR!?", "BAZ!?"]
172179
{% endhighlight %}
173180

174-
## Performance improvements
181+
## 성능 향상
175182

176-
* JIT [Experimental]
183+
* JIT [실험적]
177184

178-
* JIT-ed code is recompiled to less-optimized code when an optimization assumption is invalidated.
185+
* 최적화 가정이 유효하지 않은 경우 JIT으로 컴파일된 코드는 최적화 레벨이 낮은
186+
코드로 재컴파일됩니다.
179187

180-
* Method inlining is performed when a method is considered as pure. This optimization is still experimental and many methods are NOT considered as pure yet.
188+
* 순수하다고 판단된 메서드를 인라인으로 삽입하게 됩니다.
189+
이 최적화는 아직 실험적이며 많은 메서드는 아직 순수하다고 판단되지 않는 상태입니다.
181190

182-
* Default value of `--jit-min-calls` is changed from 5 to 10,000
191+
* `--jit-min-calls`의 기본값이 5에서 10,000으로 변경됩니다.
183192

184-
* Default value of `--jit-max-cache` is changed from 1,000 to 100
193+
* `--jit-max-cache`의 기본값이 1,000에서 100으로 변경됩니다.
185194

186-
* `Symbol#to_s`, `Module#name`, `true.to_s`, `false.to_s` and `nil.to_s` now always return a frozen String. The returned String is always the same for a given object. [Experimental] [[Feature #16150]](https://bugs.ruby-lang.org/issues/16150)
195+
* `Symbol#to_s`, `Module#name`, `true.to_s`, `false.to_s`, `nil.to_s`가 이제 항상 얼린 문자열을 반환합니다.
196+
주어진 객체에 대해 항상 동일한 문자열이 반환됩니다. [실험적]
197+
[[Feature #16150]](https://bugs.ruby-lang.org/issues/16150)
187198

188-
* The performance of `CGI.escapeHTML` is improved. [GH-2226](https://github.com/ruby/ruby/pull/2226)
199+
* `CGI.escapeHTML`의 성능이 향상되었습니다. [GH-2226](https://github.com/ruby/ruby/pull/2226)
189200

190-
## Other notable changes since 2.6
201+
## 그 이외의 2.6 이후로 주목할 만한 변경
191202

192-
* Some standard libraries are updated.
203+
* 표준 라이브러리를 업데이트했습니다.
193204
* Bundler 2.1.0.pre.1
194205
* RubyGems 3.1.0.pre.1
195206
* CSV 3.1.2 ([NEWS](https://github.com/ruby/csv/blob/v3.1.2/NEWS.md))
196207
* Racc 1.4.15
197208
* REXML 3.2.3 ([NEWS](https://github.com/ruby/rexml/blob/v3.2.3/NEWS.md))
198209
* RSS 0.2.8 ([NEWS](https://github.com/ruby/rss/blob/v0.2.8/NEWS.md))
199210
* StringScanner 1.0.3
200-
* Some of other libraries that have no original version are also updated.
211+
* 기존 버전이 없는 다른 몇몇 라이브러리도 업데이트되었습니다.
201212

202-
* `Proc.new` and `proc` with no block in a method called with a block is warned now.
213+
* 블록을 넘긴 메서드의 호출 안에서 블록이 없는 `Proc.new``proc`을 사용하면 경고가 발생합니다.
203214

204-
* `lambda` with no block in a method called with a block errs.
215+
* 블록을 넘긴 메서드의 호출 안에서 블록이 없는 `lambda`는 에러가 발생합니다.
205216

206-
* Update Unicode version and Emoji version from 11.0.0 to 12.0.0. [[Feature #15321]](https://bugs.ruby-lang.org/issues/15321)
217+
* 유니코드와 에모지의 버전을 11.0.0에서 12.0.0으로 업데이트했습니다.
218+
[[Feature #15321]](https://bugs.ruby-lang.org/issues/15321)
207219

208-
* Update Unicode version to 12.1.0, adding support for U+32FF SQUARE ERA NAME REIWA. [[Feature #15195]](https://bugs.ruby-lang.org/issues/15195)
220+
* 유니코드를 일본의 새로운 연호 레이와를 가리키는 코드(U+32FF SQUARE ERA NAME REIWA)에 대한 지원을 추가한 12.1.0으로 업데이트했습니다.
221+
[[Feature #15195]](https://bugs.ruby-lang.org/issues/15195)
209222

210-
* `Date.jisx0301`, `Date#jisx0301`, and `Date.parse` support the new Japanese era. [[Feature #15742]](https://bugs.ruby-lang.org/issues/15742)
223+
* `Date.jisx0301`, `Date#jisx0301`, `Date.parse`에서 새 일본 연호를 지원합니다.
224+
[[Feature #15742]](https://bugs.ruby-lang.org/issues/15742)
211225

212-
* Require compilers to support C99 [[Misc #15347]](https://bugs.ruby-lang.org/issues/15347)
213-
* Details of our dialect: <https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/C99>
226+
* 루비 빌드에 C99를 지원하는 컴파일러를 요구합니다. [[Misc #15347]](https://bugs.ruby-lang.org/issues/15347)
227+
* 이에 대한 자세한 정보: <https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/C99>
214228

215-
See [NEWS](https://github.com/ruby/ruby/blob/v2_7_0_preview2/NEWS) or [commit logs](https://github.com/ruby/ruby/compare/v2_6_0...v2_7_0_preview2) for more details.
229+
[NEWS](https://github.com/ruby/ruby/blob/v2_7_0_preview2/NEWS)[커밋 로그](https://github.com/ruby/ruby/compare/v2_6_0...v2_7_0_preview2)에서 더 자세한 설명을 확인할 수 있습니다.
216230

217-
With those changes, [3670 files changed, 201242 insertions(+), 88066 deletions(-)](https://github.com/ruby/ruby/compare/v2_6_0...v2_7_0_preview2) since Ruby 2.6.0!
231+
이러한 변경사항에 따라, 루비 2.6.0 이후로 [파일 3670개 수정, 201242줄 추가(+), 88066줄 삭제(-)](https://github.com/ruby/ruby/compare/v2_6_0...v2_7_0_preview2)가 이루어졌습니다!
218232

219-
Enjoy programming with Ruby 2.7!
233+
루비 2.7을 즐겨주시기 바랍니다!
220234

221-
## Download
235+
## 다운로드
222236

223237
* <https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.0-preview2.tar.bz2>
224238

@@ -248,6 +262,7 @@ Enjoy programming with Ruby 2.7!
248262
SHA256: 81a240bead4438b064cb4cde562b483b82ec8e414bac057a6df43df5a247545c
249263
SHA512: 1a8d4503374d31abf43182e2af6902ea6e5295f55d539415c8268b1d6a0fa83a975648c225ae986e687d5283dc2d180cf1e608841485506e4b0ac5efc154949a
250264

251-
## What is Ruby
265+
## 루비는
252266

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

0 commit comments

Comments
 (0)