---
title: "Matz talks about Ruby 3.0 and beyond"
publication: "Ruby Weekly"
issue: 556
published_at: "2021-06-10"
canonical_url: "https://rubyweekly.com/issues/556"
---

Plus a JSX-inspired way to write view components directly in Ruby. |        

#​556 — June 10, 2021 

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

Jemma is back with another tip of the week - check it out at the end of this issue. The only problem is I can never remember the syntax for heredocs off the top of my head as it is.. :-)
__
_Peter Cooper and Glenn Goodrich_  

Ruby Weekly 

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

▶[Matz's Euruko Keynote: Beyond Ruby 3.0](https://www.youtube.com/watch?v=Dp12a3KGNFw) — The founder and chief designer of our favorite language recently gave a virtual keynote and focused on what Ruby has achieved with version 3, and where efforts are headed next. It’s quite long but easily skimmed, or you can enjoy Matheus Richard's [Twitter notes](https://twitter.com/matheusrich/status/1400973905628647427) of what Matz covered. Ruby 3.1 is due Christmas 2021 but will be a ‘conservative’ release with few new features. 

Yukihiro 'Matz' Matsumoto   

[A Review of Ruby Installers and Ruby Switchers](https://eregon.me/blog/2021/06/04/review-of-ruby-installers-and-switchers.html) — I remember when RVM was the only game in town, but now there are a few options for Ruby managers, so understanding their pros and cons is important. 

Benoit Daloze   [![\](https://copm.s3.amazonaws.com/fa6cc746.png)](https://www.founderquestpodcast.com/episodes) 

▶[Are You Listening to FounderQuest Yet?](https://www.founderquestpodcast.com/episodes) — It’s a weekly podcast about three Ruby developers bootstrapping a software business on their own terms...and murderbots, ninjas, garlic scapes, and (checks notes) something called Big Mouth Billy Bass. Don’t miss out. 

FounderQuest sponsor   

[Performance, Stress, and Load Tests in Rails](https://blog.appsignal.com/2021/06/09/performance-stress-and-load-tests-in-rails.html) — A break down of approaches to performance testing Rails apps and what sort of metrics you might want to collect, followed by a practical example of actually doing it. 

Paweł Dąbrowski   

[An Update from the Maintainer of Prawn](https://github.com/prawnpdf/prawn/discussions/1210) — [Prawn](https://github.com/prawnpdf/prawn) is a popular Ruby PDF generation library originally created by Gregory Brown but now maintained by Alexander Mankuta. Here he shares a little history, how he considers Prawn to be ‘complete’, and the stresses and realities of being an open source maintainer. 

Alexander Mankuta   

[Building a New Programming Language In Ruby: The Interpreter](https://www.honeybadger.io/blog/building-interpreter-ruby/) — Having written the parser and lexer in previous posts, the interpreter now rounds out the final execution need for the ‘Stoffle’ language. 

Alex Braha Stoll   

[Removing Assets Dependencies from Rails Apps for Runtime](https://nts.strzibny.name/removing-nodejs-dependency-from-a-rails-application/) — Once assets are generated, we don’t need the gems that did the generation, but Rails keeps them around in production. Josef gets rid of them. 

Josef Strzibny   

▶[Can Active Storage Serve Images for the Modern Web?](https://devchat.tv/ruby-rogues/can-active-storage-serve-images-for-the-modern-web-by-mark-hutter-ruby-501/) — Dave Kimura and Luke Stutters talk with Mark Hutter about Active Storage and his experience building a large image driven application. 

Ruby Rogues Podcast podcast   

▶[Ten Rails Tips and Tricks](https://www.driftingruby.com/episodes/10-tips-and-tricks) — These are always great. 

Drifting Ruby   

[A Handful of Sidekiq Good Practices](https://longliveruby.com/articles/sidekiq-good-practices) 
Paweł Dąbrowski   

[Some Reasons Why Bugs Might Feel 'Impossible' to Resolve](https://jvns.ca/blog/2021/06/08/reasons-why-bugs-might-feel-impossible/) 
Julia Evans  

🛠 Code and Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/fbwerqyvalbv83jifltd.jpg)](https://github.com/camertron/rux)   

[Rux 1.0: A JSX-Inspired Way to Render View Components in Ruby](https://github.com/camertron/rux) — If you’re a fan of the React approach of including templates directly within normal code, this might intrigue you. There’s [rux-rails](https://github.com/camertron/rux-rails) to take it into Rails, too. 

Cameron Dutro   

[ZipTricks: Compact ZIP File Writing/Reading Library](https://github.com/WeTransfer/zip_tricks) — Boasts support for streaming out archive creation so you can create large ZIP archives (such as of customer data, perhaps) without eating up all your RAM. 

WeTransfer   

[Autoscale Your Heroku App For Free, Forever](https://railsautoscale.com/free-autoscaling/) — Introducing the Rails Autoscale free tier. Web and worker dynos included, up to 20 autoscale events per month. 

Rails Autoscale sponsor   

[SearchKick 4.5: Intelligent Search Made Easy with Elasticsearch](https://github.com/ankane/searchkick) — A mature library that uses Elasticsearch to provide ‘smart’ and fuzzy search as well as autocomplete functionality that learns from what your users are searching for. 

Andrew Kane   

[Pagy 4.8: A Popular Pagination Gem](https://github.com/ddnexus/pagy) — It’s been a couple of years since we’ve linked to Pagy but it’s still getting updated, works with all Rack-based frameworks and is storage/ORM agnostic, so what’s not to like? 

Domizio Demichelis   

[🥑 30+ Releases Later, Avo Admin Gets Better Everyday.
Rails ❤️ Avo](https://avohq.io) 

Avo Admin for Rails sponsor   

[CSV 3.2.0: CSV Reading and Writing Library](https://github.com/ruby/csv) — Formerly part of the Ruby standard library, this is now maintained as a separate gem. 

Ruby Core Team   

[JRuby 9.2.18.0 Released](https://www.jruby.org/2021/06/08/jruby-9-2-18-0.html) — An update to the Ruby 2.5.x compatible branch. 

JRuby Core Team   

[childprocess 4.1: Cross-Platform Library for Managing Child Processes](https://github.com/enkessler/childprocess) — This latest release adds ARM64-macos support. 

Eric Kessler   

[Loofah 2.10.0: Nokogiri-Powered HTML/XML Manipulation and Sanitization](https://github.com/flavorjones/loofah) 
Mike Dalessio    

Jobs  

[Senior Software Engineer](https://grnh.se/bf97c4df4us) — Snapdocs is a [Unicorn](https://snapdocs.com/press/snapdocs-named-to-the-2020-cb-insights-fintech-250-list-of-fastest-growing-fintech-startups/) now with over $1.5B valuation. Join our growing distributed team in the US and help us disrupt the mortgage and real-estate industry. 
Snapdocs   

[Ruby on Rails Engineer Positions](https://bit.ly/3mDSB9L) — We’re growing teams in Europe and North America, we’re also one of the fastest growing SaaS companies globally. Tech : Postgres, AWS, React, Redux. 
Workday   

[Find Ruby Jobs with Hired](https://hired.com/join/?utm_source=newsletter&utm_medium=sponsor&utm_campaign=%28b2c%29%28l-all%29%28r-all%29%28cooper-rubyweekly%29&utm_content=find-your-next-job) — Take 5 minutes to build your free profile & start getting interviews for your next job. Companies on Hired are actively hiring right now. 
Hired         

💡**Tip of the Week** 

**Heredoc Method Chaining**   

Ruby's [Heredocs](https://ruby-doc.org/core-3.0.0/doc/syntax/literals_rdoc.html#label-Here+Documents+-28heredocs-29) allow us to easily write multiline strings, or big blocks of text. Oftentimes, when writing these heredocs, we need to do some sort of string manipulation. We often do this string manipulation as a separate method call after we've initialized the string using a heredoc. This might look something like: 

```
string = <<~EOF  
  This is a multiline string
  but we don't actually want
  any newlines in the final version
EOF

string.gsub!("\n", " ")
``` 

_**=> "This is a multiline string but we don't actually want any newlines in the final version "**_ 

_(Please note, the odd formatting above is due to our code blocks not supporting wrapping ;-) Email is a tricky format!)_ 

However, less well known is that we can actually call methods on the heredoc itself. As you may have noticed, syntactically this won't work by calling the method after the closing identifier. Instead, any methods can be called right after the opening identifier. In this case, this would look like this: 

```
string = <<~EOF.gsub("\n", " ")
  This is a multiline string
  but we don't actually want
  any newlines in the final version
EOF
``` 

_**=> "This is a multiline string but we don't actually want any newlines in the final version "**_ 

We can also _chain together_ methods on the heredoc in a similar fashion: 

```
string = <<~EOF.gsub("\n", " ").upcase
  This is a multiline string
  but we don't actually want
  any newlines in the final version
EOF
``` 

_**=> "THIS IS A MULTILINE STRING BUT WE DON'T ACTUALLY WANT ANY NEWLINES IN THE FINAL VERSION "**_ 

In the case above, we replaced the newlines with spaces and converted the string to upper case.    

This week’s tip was written by [Jemma Issroff](https://twitter.com/jemmaissroff).          

Curated by [Peter Cooper](https://twitter.com/peterc), [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
