What's New in Ruby 2.6

Sam Backus

@SamBackus

Samuel.Backus@gmail.com

Happy Holidays!

Follow along

$ rbenv install 2.6.0

or 

$ rvm install 2.6.0

Speed improvements!

  • Proc#call is 1.4x faster
  • block.call is 2.4x faster when passed a block
  • Transient Heap is introduced, making small and short lived hash objects 2x faster.
  • Native implementations of coroutines to improve context switching performance of Fiber significantly.

Speed improvements!

New JIT compiler

slower startup time

faster runtime

New JIT compiler

New JIT compiler

New JIT compiler

How to use: Just specify --jit in command line or $RUBYOPT environment variable

RubyVM::AbstractSyntaxTree

yield_self aliased to then

Kernel#yield_self

Endless ranges (1..)

Enumerable#chain 

and

Enumerator#+

Add function composition operators << and >> to Proc and Method

Array#union 

Array#difference

Array#filter is a new alias for Array#select

Merge Bundler as Default gem

You no longer need  to gem install bundler

References: 

Copy of Ruby 2.6

By Sam Backus

Copy of Ruby 2.6

What's new in Ruby 2.6

  • 295