Ruby

Ruby 3.4 **nil No Longer Raises TypeError

When double splat ** operator used with nil, it is treated similarly to **{}, which passes no keywords and does not call any conversion methods.

A Quick Guide to Ruby's Time and DateTime

Let's examine when to use the Time class and when to use the DateTime class

What is New in Ruby 3.3: Key Features

Ruby 3.3 boasts performance boosts with faster YJIT, M:N threads, RJIT compiler, Prism parser, and IRB improvements.

Ruby 3.3: String.dup Now as Fast as String#+

Ruby 3.3 optimizes String.dup to match the speed of String#+, allowing developers to choose based on preference without sacrificing performance.

Rubygems :file Option for Ruby Version

Rubygems introduced a :file option so that we can read the Ruby version from a file.

Ruby 3.3 Range#reverse_each Improvements

Range#reverse_each can now process beginless ranges with an Integer endpoint and raises TypeError for endless ranges.

Ruby 3.3 Duplicate Keyword Argument Fix

Ruby 3.3 fixes inconsistent warnings for duplicate keyword arguments

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 Fixes Range#size Rational Bug

Ruby 3.3 fixes Range#size to correctly count elements when the endpoint is a Rational number.

Sort Rails Models By Association Order

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