---
title: "Ruby 3.4 to get the 'it' factor"
publication: "Ruby Weekly"
issue: 681
published_at: "2023-12-07"
canonical_url: "https://rubyweekly.com/issues/681"
---

Plus big news from Ruby Central, IRB gets history, and better mailer previews for Rails apps. |        

#​681 — December 7, 2023 

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

Together with [![pgAnalyze\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,e_trim,w_350,h_100/e_make_transparent/co_white,e_outline:7/lhwcvgc1asd4fzaahty4.png)](https://pganalyze.com/ebooks/efficient-search-in-rails-with-postgres?utm_source=RubyWeeklyPrimary12072023)   

Ruby Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/ard1ojyjjrmewyyj4xne.jpg)](https://bugs.ruby-lang.org/issues/18980#note-47)  

[Ruby 3.4 Will Have '`it`'](https://bugs.ruby-lang.org/issues/18980#note-47) — There’s never been any doubt: Ruby has _it._ But now as well as the ‘it’ factor, it really will have `it`. Confused? `it` is a nicer looking shortcut to the first parameter in a block (a la `_1`) – e.g. `arr.each { puts it }`. Ruby 3.3 will warn on `it` with 3.4 (due in a year’s time) getting the real deal. 

Takashi Kokubun   

[“Useless Ruby Sugar”: Endless (One-Line) Methods](https://zverok.space/blog/2023-12-01-syntax-sugar5-endless-methods.html) — Victor continues his fantastic series on controversial, newer elements of Ruby syntax with a look at single line method definitions, as supported by Ruby 3.0 and higher, e.g. `def double(x) = x * 2`. 

Victor Shepelev   

💡 Lucian Ghinda shows off [a use case for such `end`-less methods](https://allaboutcoding.ghinda.com/an-endless-method-use-case).  [![\](https://copm.s3.amazonaws.com/96497bb9.png)](https://pganalyze.com/ebooks/efficient-search-in-rails-with-postgres?utm_source=RubyWeeklyPrimary12072023) 

[Free eBook: Efficient Search in Rails with Postgres](https://pganalyze.com/ebooks/efficient-search-in-rails-with-postgres?utm_source=RubyWeeklyPrimary12072023) — In this eBook, Leigh Halliday explains how to speed up a search query from seconds to milliseconds — walking through using exact matches, similarity matches with trigrams, partial matches with ILIKE, and natural language matches. 

pganalyze sponsor   

[Ruby Central's Mega November 2023 News Roundup](https://rubycentral.org/news/october-2023-monthly-update/) — Did you know _Ruby Central_ has its own newsletter? The non-profit that runs RubyConf, RailsConf, and supports projects like Bundler and RubyGems has had a busy month, but perhaps the biggest news is they’ve [hired Samuel Giddins as a _Security Engineer in Residence_](https://rubycentral.org/news/ruby-central-welcomes-new-software-engineer-in-residence-sponsored-by-aws/) to help work on the security of the RubyGems supply chain. 

Ruby Central   

- 🕰 [IRB v1.10.0](https://github.com/ruby/irb/releases/tag/v1.10.0) has been released with [a new `history`/`hist` command](https://github.com/ruby/irb/pull/761) to look at previous inputs.
- 💎 Kevin Newton is doing a blog series called [Advent of Prism](https://kddnewton.com/2023/11/30/advent-of-prism-part-0) where he goes deep into how the Prism Ruby parser (formerly known as YARP) works.
- 🗞 JetBrains' popular (commercial) Ruby IDE has a new release in the shape of [RubyMine 2023.3.](https://blog.jetbrains.com/ruby/2023/12/rubymine-2023-3/) It has an 'AI Assistant' baked in, supports custom paths in Rails apps and engines, improved RBS support, and more.
- ▶️ 37signals' Jorge Manrubia has a (rather extensive) [demo of how page refreshes with morphing](https://dev.37signals.com/page-refreshes-with-morphing-demo/) look when using Turbo 8.
- 📈 [Basecamp runs 18% faster with YJIT,](https://dev.37signals.com/yjit-is-fast/) says 37signals' Jacopo Beschi.
- 📅 [RailsConf 2024](https://www.railsconf.org/) is in Detroit, Michigan next May and tickets are available.
- ☀️ [Tropical.rb](https://www.tropicalrb.com/) is a Rails conference taking place in São Paulo, Brazil in April 2024 – it already has some well known keynoters lined up._Maravilhoso!_
- √ Ruby 3.3 fixes [a `Range#size` bug with rational endpoints](https://blog.saeloun.com/2023/12/04/ruby-3-3-range-size-method-rational-endpoint/).  

📕 Articles & Tutorials  

[How to Add a `man` Page to Your Ruby Project](https://postmodern.github.io/blog/2023/12/05/how-to-add-a-man-page-to-your-ruby-project.html) — If you run `git clone --help` it displays its own man page, and if you want similar functionality for _your_ Ruby CLI, here’s how to make it happen. 

Postmodern   

[When Static Types Make Your Code Shorter](https://evanhahn.com/when-static-types-make-your-code-shorter/) — _“I was recently porting some code from Ruby to Crystal and was surprised by something: the Crystal code was shorter because it used static types.”_ 

Evan Hahn   

[Pressure Kills Cognition](https://link.testdouble.com/pressure-kills-cognition-rw) — Free up space for deep work. Burst capacity for today's deadlines and strategies to make tomorrow's goals attainable. 

Test Double sponsor   

▶[Adding Hotkeys to a Rails App](https://www.driftingruby.com/episodes/hotkeys) — Using [stimulus-hotkeys.](https://github.com/leastbad/stimulus-hotkeys) 

Drifting Ruby   

[Optimizing Performance by Implementing a Dual Database Setup](https://blog.saeloun.com/2023/12/06/rails-dual-database-setup/) — Adding a replica DB to a Rails app to split up the read/write load. 
Harshaan Nihal Khan   

[Understanding the Rails Router: Why, What, and How](https://www.writesoftwarewell.com/understanding-rails-router-why-what-how/) 
Akshay Khot   

[How to Use Shoulda Matchers with RSpec](https://blog.appsignal.com/2023/12/06/how-to-use-shoulda-matchers-with-rspec-for-ruby-on-rails.html) 
Kingsley Chijioke  

🛠 Code & Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/ddtdsw3phsorgyiuud9d.jpg)](https://github.com/harrison-broadbent/better_mailer_previews)   

[Better Mailer Previews: A Way to Preview ActionMailer Email Templates](https://github.com/harrison-broadbent/better_mailer_previews) — A Rails engine that builds on top of native Rails mailer previews with enhancements including seeing live, _resizable_ previews, and the ability to forward previews to an email address. 

Harrison Broadbent   

[rack-mini-profiler 3.3: A Profiler for Rack Apps in Dev or Production](https://github.com/MiniProfiler/rack-mini-profiler) — A popular piece of middleware that adds a ‘speed badge’ to pages in your app to show off database, call-stack and memory profiling data. 

Sam Saffron, Nate Berkopec et al.   

[Do You DIY? 🧐 BYO Error Monitoring Stack for Ruby 👷‍♀️🛠️](https://www.honeybadger.io/blog/diy-ruby-error-handling/?utm_source=rubyweekly&utm_medium=email&utm_campaign=ruby) — Learn Ruby's built-in errors, how to use log levels and tagging to customize the log output, display errors, and more. 

Honeybadger sponsor   

[acts_as_tenant 1.0: Easy Multi-Tenancy for Rails in a Shared DB Setup](https://github.com/ErwinM/acts_as_tenant) — Adds the ability to scope models to a tenant where tenants are represented by a separate tenant model, e.g. `Account`. 

Chris Oliver   

[re2 2.5: Ruby Bindings to Google's RE2 Regex Library](https://github.com/mudge/re2) — A safe, thread-friendly alternative to backtracking regular expression engines. We featured this just a month ago but [v2.5.0](https://github.com/mudge/re2/releases/tag/v2.5.0) features [improved documentation](https://github.com/mudge/re2#readme) and introduces new `full_match`/`full_match?` and `partial_match`/`partial_match?` methods to expose more of RE2’s underlying interface. 

Paul Mucur   

[BasedUUID: URL-Friendly, Base32-Encoded UUIDs](https://github.com/pch/based_uuid) — The rationale is to have a more manageable, ‘double-clickable’ UUID format – the result is a 26-character, base32-encoded (no `i`, `l`, `o`, or `u`), lowercase string (with an optional prefix) like `51yr0ebuck1sp00l0lkk7cssd1`. 

Piotr Chmolowski   

[Spaced: A Way to Isolate and Namespace Methods in Classes](https://github.com/joelmoss/spaced) — An interesting idea. Rather than nesting modules or classes, you define methods within a `namespace` block which makes them available through a chained method on the class’s instance objects. 

Joel Moss   

[ruby-install 0.9.3: Install CRuby, JRuby, TruffleRuby and More](https://github.com/postmodern/ruby-install/releases/tag/v0.9.3) — A tool to install arbitrary versions of several Ruby implementations. v0.9.3 includes three significant bug fixes for macOS users. 

Postmodern   

[Dentaku: Math and Logic Formula Parser and Evaluator](https://github.com/rubysolo/dentaku) — Allows run-time binding of values to variables referenced in user supplied formulas. Intended to safely evaluate untrusted expressions. 

Solomon White   

[Pay 7.0: A Payments Engine for Rails Apps](https://github.com/pay-rails/pay) — Supports Stripe, Paddle, Braintree, as well as a ‘fake’ processor for trials, freebies, testing, etc. 

Chris Oliver    

Jobs  

[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=easy-job-hunting) — Hired makes job hunting easy-instead of chasing recruiters, companies approach you with salary details up front. Create a free profile now. 
Hired      

- [Ruby on Jets 5.0](https://blog.boltops.com/2023/12/05/jets-5-improvements-galore/) – The Ruby serverless framework. A huge release that deserves a bigger writeup.. but watch this space.
- [Brakeman 6.1](https://github.com/presidentbeef/brakeman) – Static analysis security vuln scanner for Rails apps.
- [Active Delivery 1.1](https://github.com/palkan/active_delivery) – Framework for centralized notifications.
- [attr_json 2.3](https://github.com/jrochkind/attr_json) – JSON-hash-backed ActiveRecord attributes.
- [Chewy 7.3.5](https://github.com/toptal/chewy) – Object Document Mapper for Elasticsearch.
- [Futurism 1.3](https://github.com/stimulusreflex/futurism) – Lazy-load Rails partials via CableReady.
- [Rubanok 0.5](https://github.com/palkan/rubanok) – Parameters-based transformation DSL.
- [Passwordless 1.2](https://github.com/mikker/passwordless) – Rails auth without passwords.
- [Arbre 2.0](https://github.com/activeadmin/arbre) – Generate HTML directly in Ruby.
- [Statesman 12.0](https://github.com/gocardless/statesman) – State machine library.         

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

[Change your email](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 

Other weekly newsletters we publish include [Postgres Weekly](https://postgresweekly.com/), [React Status](https://react.statuscode.com/), [Frontend Focus](https://frontendfoc.us/), and [JavaScript Weekly](https://javascriptweekly.com/).
