---
title: "The Ruby 2.7 edition"
publication: "Ruby Weekly"
issue: 482
published_at: "2020-01-02"
canonical_url: "https://rubyweekly.com/issues/482"
---

Ruby 2.7 is here, and here's our roundup.       

#482 — January 2, 2020 

[Read on the Web](https://rubyweekly.com/issues/482)   

🎉 As expected, after over a year of development, Ruby 2.7 came out on Christmas Day complete with a variety of new features, tweaks, and the usual bug fixes. Enjoy this special round-up issue focused on the new release before we get back to usual service on January 9 😄
_P.S. Be sure to check out the end of the issue to see my personal favorite 2.7 feature!_  

Ruby Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/v1577978329/i5z0oevrlh31ojna3jog.jpg)](https://www.ruby-lang.org/en/news/2019/12/25/ruby-2-7-0-released/)   

[Ruby 2.7.0 Released](https://www.ruby-lang.org/en/news/2019/12/25/ruby-2-7-0-released/) — What better place to start than the official news announcement? This post covers some of the new features briefly and provides download links to the source releases. Here’s [the 2.7.0 tarball](https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.0.tar.gz) if you want it yourself. 

Yui Naruse   

[Digging Into Ruby 2.7's Changes](https://rubyreferences.github.io/rubychanges//2.7.html) — Built up from the official news and release notes, this is a deeper look at what each of the new Ruby 2.7 features and changes really _mean_, complete with short code examples. If you want to read just one post that covers all of the changes in _just enough_ depth, this is the one. 

Ruby References   [![\](https://copm.s3.amazonaws.com/e4c4134b.png)](https://pganalyze.com/blog/automated-postgres-explain-plan-visualization-and-insights?utm_source=RubyWeeklyPrimary) 

[Introducing Automated Postgres EXPLAIN Plan Insights on pganalyze](https://pganalyze.com/blog/automated-postgres-explain-plan-visualization-and-insights?utm_source=RubyWeeklyPrimary) — Other tools might show what happened in the database, pganalyze equips engineering teams with the insights to understand why it happened. Check out our new EXPLAIN insights features to get simple visualizations of costliest plan nodes, slow sorts, and more. 

pganalyze sponsor   

[An Update on Ruby's JIT Development Progress](https://t.co/IfKFWdhwyf) — It was hoped that the experiments done on JIT compilation for Ruby in Ruby 2.6 onwards would yield major benefits by now, but while a lot of work has been done, Rails still poses a problem. Here’s the story. 

k0kubun   

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/jl1q1wcnntdtpz7a9lwe.jpg)](https://www.youtube.com/watch?v=wo4eZ2iVIyo)   

▶[Pattern Matching: The Big New Feature in Ruby 2.7](https://www.youtube.com/watch?v=wo4eZ2iVIyo) — Pattern matching has been introduced as an experimental feature in Ruby 2.7. This presentation from RubyConf looked at the current syntax and the policies around its design. 

Kazuki Tsujimoto   

▶[A Practical Demo of Ruby 2.7's Pattern Matching Features](https://www.youtube.com/watch?v=vtJyl2DIZcA) — A 15 minute screencast that goes beyond the theory and into the practicalities of using Ruby 2.7’s pattern matching support to tighten up code around extracting data from YAML files. 

Context Free   

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/pilwegzteockxuu4h0sn.jpg)](https://blog.saeloun.com/2019/12/04/ruby-2-7-adds-new-operator-for-arguments-forwarding.html)   

[Ruby 2.7's New `...` Shorthand Syntax for Argument Forwarding](https://blog.saeloun.com/2019/12/04/ruby-2-7-adds-new-operator-for-arguments-forwarding.html) — In short, you can use the syntax `...` in parameter or argument lists to basically ‘pass through’ (or forward) arguments from one method to another. _“It acts similar to calling `super` without any arguments.”_ 

Narendra Rajput       

🛤 Smaller Things Ruby 2.7 Added / Changed 

A round-up of less obvious things that Ruby 2.7 has introduced 😄 

- [Ruby now requires a C99 compliant compiler to compile it](https://bugs.ruby-lang.org/issues/15347)
- [`Enumerator#produce`](https://blog.saeloun.com/2019/11/27/ruby-2-7-enumerator-produce.html)
- [Ruby 2.7 allows calling a private method with `self.`](https://blog.saeloun.com/2019/12/24/ruby-2-7-allows-calling-a-private-method-with-self.html)
- [`Time#inspect` and `Time#to_s` have been separated](https://blog.saeloun.com/2019/12/23/ruby-2-7-time-inspect.html)
- [`Module#autoload?`'s `inherit` argument](https://blog.saeloun.com/2019/10/24/ruby-2-7-adds-inherit-as-optional-argument-to-module-autload.html)
- [`Array#intersection` is a new alias for `Array#&`](https://blog.saeloun.com/2019/10/14/ruby-adds-array-intersection.html)
- If you use `require 'open-uri'` and `open` to do HTTP requests at all, you now need to use `URI.open` directly to avoid warnings.      

[What's New in IRB in Ruby 2.7?](https://blog.saeloun.com/2019/09/23/new-irb-features.html) — IRB, the trusty Ruby REPL, isn’t something we often see getting updated with new Ruby releases, but Ruby 2.7 changes it quite a bit by introducing a few niceties like syntax highlighting and multi-line editing. [Pry](http://pryrepl.org/) may, however, remain the power user’s REPL of choice. 

Prajakta Tambe   

[The Delegation Challenge of Ruby 2.7](https://eregon.me/blog/2019/11/10/the-delegation-challenge-of-ruby27.html) — Ruby 2.7 introduces a deprecation/warning around the behavior of arguments that will require a lot of code is updated to work with Ruby 3.0 (due at the end of 2020). You might find the [pull request](https://github.com/rails/rails/pull/38105) where Action Mailer is fixing the warnings to be of interest. 

Benoit Daloze   

[Managing Warnings Emitted by Ruby 2.7](https://prathamesh.tech/2019/12/26/managing-warnings-emitted-by-ruby-2-7/) — Due to deprecations and syntax changes, Ruby 2.7 will output some warnings where you wouldn’t have seen any before. If you need to curb these (temporarily!) here’s how to turn down the volume. 

Prathamesh Sonpatki   

[RubyGems 3.1.2 Released](https://blog.rubygems.org/2019/12/20/3.1.2-released.html) 

Hiroshi Shibata  

🎩 My favorite Ruby 2.7 feature!  

It's going to seem like such a small thing, but perhaps the most valuable addition to Ruby 2.7 for me is `Enumerable#tally`! 

![](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/v1577983492/tiscufr4hy4xr9d96gt7.png)   

This hugely speeds up a common (for me, at least) operation which I might previously have done with something like `arr.group_by(&:itself).map { |k, v| [k, v.size] }.to_h` 

If you want to learn a little more about how it works, Brandon Weaver has [this introductory post.](https://medium.com/@baweaver/ruby-2-7-enumerable-tally-a706a5fb11ea)        

Curated by [Glenn Goodrich](https://twitter.com/ruprict) and [Cooperpress](https://cooperpress.com/). 

[Change your email address](https://rubyweekly.com/edit_subscription/*|UID|*) or[Stop getting this newsletter](https://rubyweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
