Ruby it block parameter: Examples and Common Traps

Learn when Ruby's implicit it parameter helps, how local names and nested blocks affect it, and when a named parameter is clearer.

Learn when Ruby's implicit it parameter helps, how local names and nested blocks affect it, and when a named parameter is clearer.

Read file creation timestamps on Linux with Ruby, understand the Ruby 4.0 API change and handle unavailable metadata without inventing a date.

Find out whether a Ruby 4.0 CGI loading error needs the full cgi gem, the smaller escape library or a correction to the runtime and bundle.

Learn what changed when Set became a Ruby 4.0 core class, with tested membership examples, set operations, migration checks and an output exercise.

Search an array from the right with Ruby 4.0 rfind, handle false and nil correctly, and choose between an element, an index and all matches.

Choose between whitespace trimming, Ruby 4.0 character selectors, exact-prefix removal and whole-string deletion, with tested boundary examples.

Trace a parcel quote from worker to coordinator in Ruby 4.0. A worked example shows which messages survive closing a Ractor port and when a receive raises an error.

Move an existing Ruby application from 3.4 to 4.0 with focused dependency checks, tested examples, a staging plan and a clear return path.

A practical tour of Ruby 4.0's collection helpers, core classes and experimental runtime features, with small tested examples and checks for existing projects.

Choose Ruby ebooks by experience level, edition and format, with free reading options, a practical exercise and an expandable reading guide.