Ruby

Ruby 3.3 Introduces Range#overlap? method

Compare two ranges and see if they overlap each other. overlap? returns true if two ranges overlap each other, otherwise false.

Ruby 3.3 resolves the Range#size bug for rational endpoints

Ruby 3.3 addresses a bug in the Range#size method related to rational endpoints, ensuring accurate counting. Learn how this fix enhances functionality and resolves issues in working with ranges.

Sort Your Rails Models By The Order of their Associations

Sort your Rails models by the order of their belongs_to associations using ActiveRecord::Reflection.

Ruby adds a new core class called Data to represent simple immutable value objects

The Data class helps define simple classes for value-alike objects that can be extended with custom methods.

Rails "ActionController::Parameters.to_h" can now receive a block

ActionController::Parameters.to_h will now receive a block just like Hash#to_h and achieve parity. This gives the ability to customize the way parameters are passed to the controller.

The Ultimate Guide to Gemfile and Gemfile.lock

In-depth overview of what a Gemfile is and how a Gemfile works.

Ruby 3.1 introduces Variable Width Allocation for Strings

In this blog let us understand how Variable Width Allocation works in Ruby

How does Ruby manage memory?

Each programming language has its version of memory management so, let us look into how Ruby does this under the hood.

Ruby Fibers 101

Ruby 3 focuses more on concurrency with the introduction of Ruby Fibers and the Fiber Scheduler Interface.

Ruby 3.1 adds error highlighting gem

With changes in Ruby 3.1, we will be able to know which object is nil when an error gets raised.