Metaprogramming Ruby is by far my favorite Ruby book. First, it does not treat the reader as a brand new programmer. The basics of Ruby are obvious to anyone that has programmed before, and can be picked up as examples are given. Thankfully this is not included in this book. What is included are the main differences between Ruby and other object-oriented languages such as Java, Python, and C++. This is an area which most other Ruby books completely lack. If you are curious how Ruby pulls off it's magic (particularly if you are amazed at the tricks in Rails or ActiveRecord), or just wish to leverage Ruby's strongest features, then this is the book you want to pick up. If you are new to Ruby, but not to programming, start with Metaprogramming Ruby. It is much more succinct and useful (the summary of "spells" at the end of the book is gold) than the much longer The Ruby Way or Pick Axe.Why not 5 stars? The author's boss-employee schtick to explain the concepts along with the excessive amount of lame nerd humor got a bit annoying and for me took away from an otherwise excellent read. This is a book fills a long-standing whole in the Ruby community by laying out a cohesive explanation of the Dark Art we call "meta-programming". So much of Ruby metaprogramming is tribal knowledge and it can be difficult to acquire. Even more difficult is understanding the underlying rationale for various bits of meta-magic. This book does a good job of boiling down Ruby metaprogramming into a list of "spells", then explains each one in the context of a running narrative.For any Ruby programming struggling to grok eigenclasses, singleton methods, dynamic dispatch and other cool tricks, this book will be your ready guide.
What do You think about Metaprogramming Ruby (2010)?
This should definitely be your second book after learning the basics of learning Ruby.
—Marinapitta
Really great look at how to really manipulate the Ruby language to do what you need.
—doscastillas
Great book showcasing many of ruby's strengths.
—Ajit