Jump to ratings and reviews
Rate this book

Eloquent Ruby, Second Edition

Rate this book
The updated edition of the Ruby classic, published by the Pragmatic Bookshelf. Currently in beta.

370 pages, ebook

Published June 1, 2026

Loading...
Loading...

About the author

Russ Olsen

6 books81 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
1 (100%)
4 stars
0 (0%)
3 stars
0 (0%)
2 stars
0 (0%)
1 star
0 (0%)
Displaying 1 - 1 of 1 review
Profile Image for Jean Tessier.
168 reviews31 followers
Read
November 6, 2026
A quick look promises a nice style guide for writing Ruby code. Language communities adopt a common style over time. Basic formatting has broad rules, with guidelines on when to break them. Each topic is efficiently explained, often with surprising depth.

I really like how Ruby's control structures discourage the use of the NOT operator. It keeps things simple for humans to read and understand.

Strings represent data and have many methods for their manipulation and transformation. Symbols represent concepts and the only thing they really need is comparison. It makes no sense to take a substring of a symbol; that would be another, different symbol. The author recommends using double quotes for strings most of the time. I have been using double quotes only when I need interpolation. Am I doing a bad?

The 'x' suffix on regular expressions was new to me and introduced a very nice pattern of documenting regular expressions inlined comments. And there was an interesting parallel between regular expressions and pattern matching: match a string or form and pull some bits out of it.

Any nontrivial program can go wrong in a nearly infinite number of ways. […] static types […] will leave you with a slightly smaller — but still practically infinite — number of ways for your code to be broken. (p. 116)


I was surprised they didn't mention end-less methods, which were introduced earlier. While they showed an example with guard clauses, they didn't mention this pattern either.

I couldn't finish the book at this time. I am not using Ruby for work right now, and I need to learn about AI agents. But the next chapters delve into larger and larger chunks of code, from methods to blocks to modules. It even goes into metaprogramming, gems, and DSLs.

Remember, Guidelines Not Rules (p. 373)

Displaying 1 - 1 of 1 review