Three Ruby Links #5

If I were to recommend three Ruby articles published last week to read, here is what I would recommend.

If I were to recommend three articles published last week to read, here is what I would recommend:

Victor has a way of digging deeper into how Ruby works and explaining many details. This article feels like detective work with well-thought-out explanations exploring the question: How come Ruby does not have global methods, and still some methods appear to be top-level methods?

2️⃣ “Monkey Patch Detection in Ruby” by Aaron Patterson

Aaron explains how CRuby detects if a method is mokey patched and walks us through the C code that takes care of this logic. If you have never looked at how CRuby code looks, this is a very good, simple, and powerful article to start understanding just a bit of the C code that powers CRuby.

3️⃣ “What is Rack” by Younès Serraj

Excerpt from “What is Rack?”

This is a well written article where Younès explains what is Rack, how does the rack gem works and then goes to show to you with code examples how to implement your own Rack application. A good read to understand how Rack servers, Rack applications and Rack middleware communicate with each other to serve a rick web application.

In case you wonder what is Rack - the protocol here is a defition from the rack gem:

“A Rack application is a Ruby object (not a class) that responds to call. It takes exactly one argument, the environment and returns a non-frozen Array of exactly three values: The status, the headers, and the body”

You can find a lot more articles to read in the full edition of Short Ruby Newsletter at https://newsletter.shortruby.com/p/edition-110

PS: I am moving this series of articles called 3 Ruby Links here on the main newsletter page. You can find the previous recommendations on my notes website.

Reply

or to participate.