루비

루비 2.6

루비 2.6은 Ruby의 최신 안정 버전입니다. 수많은 기능과 개선은 루비를 위한 점점 다양해지고 늘어난 수요를 위해 포함됩니다. 페도라 29에 루비 2.5에서 페도라 30에 루비 2.6까지 주요 최신화를 통해 페도라는 최상의 루비 개발 기반이 되었습니다.

주목 할 만한 다음 변경이 포함합니다:

  • An initial implementation of a Just-In-Time (JIT) compiler is now available. The JIT compiler aims to improve performance of any Ruby program execution. Unlike ordinary JIT compilers for other languages, Ruby’s JIT compiler does JIT compilation in a unique way, which prints C code to a disk and spawns common C compiler process to generate native code.

    The main purpose of this JIT release is to provide a chance to check if it works for your platform and to find out security risks before the 2.6 release. JIT compiler is supported when Ruby is built by GCC, Clang, or Microsoft VC++, which needs to be available on runtime. Otherwise you can’t use it for now.

    As of Ruby 2.6.0 preview3, we achieved 1.7x faster performance than Ruby 2.5 on CPU-intensive non-trivial benchmark workload called Optcarrot. The performance on memory-intensive workload like Rails application are going to be improved as well.

  • A new RubyVM::AST experimental module is now available. This module has a parse method which parses a given ruby code of string and returns AST (Abstract Syntax Tree) nodes, and a parse_file method which parses a given ruby code file and returns AST nodes. A RubyVM::AST::Node class is also introduced. You can get location information and children nodes from Node objects. This feature is experimental. Compatibility of the structure of AST nodes are not guaranteed.

  • 새로운 기능:

    • 새로운 별명 `then`을 `Kernel#yield_self`으로 추가합니다.

    • `Random.bytes`을 추가합니다.

    • Binding#source_location`을 추가합니다. 이 방법은 a 2-element array of `FILE and `LINE`와 같은 바인딩 원천 위치를 반환합니다.

    • 잘못을 반환하는 대신에 추가 :exception option to let `Kernel.#system`발생된 오류를 나타냅니다.

    • 현재`rescue`가 없는`else`로 인하여 구문 오류가 발생합니다.[EXPERIMENTAL]

    • 상수 이름은 비-ASCII가 대문자로 시작 할 수도 있습니다.

    • 무한 범위 `(1 ..)`가 도입되었습니다. 끝이 없는 것처럼 동작합니다.

다음 성능 개선은 다음과 같이 만들어졌습니다:

  • 더 이상`$ SAFE`에 대해 신경 쓸 필요가 없기 때문에`Proc # call` 가속하였습니다. lc_fizzbuzz 기준 40 % 속도 향상을 나타냅니다.

  • Sped up block.call where block is passed block parameter. Ruby 2.6 improves the performance of passed block calling. There can observed 2.6x improvement with micro-benchmarks.

  • Transient Heap (theap) has been introduced. theap is managed heap for short-living memory objects which are pointed by specific classes. For example, making small and short-living Hash object is twice as fast. With the rdoc benchmark, 6-7% performance improvement is observed.

Other notable changes since version 2.5:

  • $SAFE is a process global state and we can set 0 again.

  • Passing safe_level to ERB.new is deprecated. trim_mode and eoutvar arguments are now keyword arguments.

  • Merged RubyGems 3.0.0.beta2.

  • Merge Bundler as default gem.

See the upstream release announcement for more detailed information about this release.