Å·±¦ÓéÀÖ

Jump to ratings and reviews
Rate this book

Programming Ruby 1.9 & 2.0

Rate this book
Would you like to go from first idea to working code much, much faster? Do you currently spend more time satisfying the compiler instead of your clients or end users? Are you frustrated with demanding languages that seem to get in your way, instead of getting the work done? Are you using Rails, and want to dig deeper into the underlying Ruby language? If so, then we’ve got a language and book for you!

Ruby is a fully object-oriented language, much like the classic object-oriented language, Smalltalk. Like Smalltalk, it is dynamically typed (as opposed to Java or C++), but unlike Smalltalk, Ruby features the same conveniences found in modern scripting languages such as Perl and Python.

The combination of the power of a pure object-oriented language with the convenience of a scripting language makes Ruby a favorite tool of intelligent, forward-thinking programmers.

The Pickaxe contains four major sections:

An acclaimed tutorial on using Ruby.
The definitive reference to the language.
Complete documentation of all built-in classes, modules, and methods.
Complete descriptions of all 97 standard libraries.
This is the reference manual for Ruby, including a description of all the standard library modules, a complete reference to all built-in classes and modules (including all the new and changed methods introduced by Ruby 1.9, 1.9.2, 1.9.3, and 2.0¹). It also includes all the new and changed syntax and semantics introduced since Ruby 1.8. Learn about the new parameter passing rules, local variable scoping in blocks, fibers, and the new block declaration syntax, among other exciting new features.

876 pages, ebook

First published December 15, 2000

122 people are currently reading
1,316 people want to read

About the author

Dave Thomas

11Ìýbooks160Ìý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
684 (34%)
4 stars
811 (40%)
3 stars
384 (19%)
2 stars
77 (3%)
1 star
25 (1%)
Displaying 1 - 30 of 71 reviews
Profile Image for Manuel Menezes de Sequeira.
AuthorÌý3 books21 followers
August 21, 2011
If you are an experienced programmer wanting to learn Ruby, this book is for you. A word of warning, though: go take a look at Chapter 27, Metaprogramming. That's the place where the object model of Ruby is explained. Without it, the rest of the book will seem to rely a bit too much on your faith. Unless, of course, you enjoy discovering the truth behind the magic for yourself. I'm sure it is possible and fun, but if you cannot spend the extra time, do take a peek at that chapter.

Another warning: the book (or at least it's ebook version) has quite a few typos, especially in Part 4.
421 reviews82 followers
January 8, 2012
This enormous book covers most of what you want to know about Ruby, and everything you never wanted to know. Its overview of the language is decent but seems poorly organized. It jumps back-and-forth between basic and advanced. Beginners would feel lost, while more advanced programmers have to skip around carefully. But if you don't skip around too much, you'll find nuggets that explain things much better than any other Ruby book. It also covers tangential subjects that you won't find in most Ruby books--RDoc, RSpec, Shoulda, IRB, and writing C extensions. The best part of this book is the reference manual at the end. It's more thorough and organized than any other Ruby book I've seen.
Profile Image for Jeff Standard.
42 reviews4 followers
June 28, 2013
I was disappointed with the so-called Pickaxe Bible. If you're looking for purely a reference book with some decent explanations, this book is great. It seems pretty exhaustive for beginner-advanced applications of Ruby and takes care to remain somewhat "framework" neutral by always listing both popular frameworks as well as alternatives. However, a few things stopped this from being a great book: lack of applicable examples and inconsistent formatting. The examples were usually very contrived, it would have been great to spend more time giving examples of situations where you may want to use a certain language feature and give an example the reader can work along with. The code examples were also inconsistently formatted. Sometimes you'd have a 3-class example to clearly explain functionality, other times it would be a string of code snippets that felt like with a bit more effort they could have been woven into a more coherent example.

A tutorial this book is not, but as a reference for those who have programmed before and want to answer the question "how do I do XXX in Ruby", this book fits the bill.
Profile Image for Jenifer Hanen.
AuthorÌý1 book8 followers
October 17, 2007
Ok, so I have been teaching myself Ruby since last fall and I am in love with it.

Javascript: too wordy, too many f*%king loops and punctuation, mostly front end, can be used for some programming.

PHP: too many functions, hard to find the one you want, less wordy and loopy than javascript. Back end web programming.

Ruby: Beautiful. Elegant. Simple. Bless it. Very little punctuation, loops only where you need them and a not an overload of built in functions/methods. Back end, needs a compiler. Still beautiful.

But Ruby on Rails can be a bit troublesome, opinionated, and locked into the framework. Don't get me started on deployment. Makes PHP look downright friendly.

Good book to get you started by experts in Rails.

Profile Image for Le Dat.
22 reviews4 followers
June 9, 2020
Old but gold, back to the time where lamdba is frequently called Proc, reflection for the term metaprogramming, not surprising surprisingly Profiler. For me the diamonds are `Object-Oriented Design Libraries` and `Sharing Data Between Ruby and C` makes me think about native approachs POROs more than the go-get a library.

It provides a ground surface for new developer who wanted to step into Ruby, a beautiful interpreter language supporting OOP-first in its design. The patch for this book should be Ancestry chain to know deeper about the inheritance and newer Enum map-reduce for FP paradigm.

There are many ways to achieve a purpose in Ruby, the freedom of choice, to sail a ship into the ocean, to know the vast ocean, to gain the knowledge. Writing Ruby is a joy!
9 reviews3 followers
January 16, 2009
Actually I'm reading a downloaded PDF of the third edition that covers Ruby 1.9. This is my first exposure to this language; I like it. I'm happy to say goodbye to PHP (fuck that language, it is made of garbage).

Um...right, about the book: I like it, seems pretty clear and goes through the language using several different strategies. Seems to function well as both a beginner's guide, in depth tutorial, and reference: a rare feat. Even the Perl "camel book" (3rd edition in particular) doesn't really nail that, although it tries.
Profile Image for David.
AuthorÌý1 book114 followers
February 14, 2018
This book is huge and exhaustive, but it's very well organized. I went from knowing absolutely nothing about Ruby to writing useful programs for myself by the end of Chapter 4 (about 50 pages).

Ruby is a big language and I think it warrants a big book. Big human languages (like English) allow concise and elegant speech. Big programming languages allow the same. But they do take longer to learn. Fortunately, Ruby has two things going for it in this regard:

1) It borrows a lot from other languages, so the more languages you know, the quicker you'll pick up Ruby.

2) It's nicely designed and fairly consistent, so once you learn something, you can often apply it to other parts of the language.

Chapter 9 was my first big "ooooh!" moment with the language: modules and mixins. (By the way, I think "module" is a really poor choice of word for this functionality and "mixin" has always sounded silly to me. That term dates back to the Flavors object system for Lisp and was taken from the ice cream industry.) But who cares what it's called - it's simple and its pragmatic and it works. Import a module's methods into a class and now the class has those methods. I like this kind of system.

My book was the Second Edition, covering Ruby 1.8. (And yes, it's sat on my shelf since it was current, I'm embarrassed to say.) Some things had changed, but the authors did a great job of correctly predicting the changes. If you see an older copy of this for sale cheap and you want to learn Ruby, don't hesitate to buy it. It's still completely relevant in 2018.

I did actually read the entire second half of the book (the built-in class/module and standard library reference). Of course, it was slow and boring and I'm still going to have to look most of this stuff up later when I need it. However, I strongly believe there is a huge advantage to knowing something is *possible* even if you don't remember quite how to do it. In our modern era of instant reference material online, knowing *what* to look up, what it's *called* is more than half the battle.

Ruby has so much stuff built in, it's almost ridiculous (in a good way). A lot of it is very Unix-oriented (no wonder Ruby can be such a pain to install on Windows - it wants to bring an entire POSIX environment with it!). Ruby clobbers Perl in every possible category and looks good doing it. I can't believe it took me this long to join the fun!

I use Ruby almost daily now. It and this book were everything I could have (reasonably) asked for.

Weird trivia: the entire last 40+ pages starting at Appendix D, continuing through the Index and including the page of advertisements for other Pragmatic Bookshelf titles was repeated at the end of my book. The binding is clearly the correct size, so I imagine a lot of copies went out this way. Epic copy/paste mistake?
Profile Image for Ian Bowman.
89 reviews2 followers
March 2, 2025
There are many great programming books but this is the best, most applicable, most practical, most comprehensive and even most readable programming book I've ever read. 5
Profile Image for bimri.
AuthorÌý2 books9 followers
November 30, 2023
Ruby is such an elegant language. Exhibited so, from these authors who've done a good job with introducing the it to programmers. First time programmers won't enjoy this book! But, it sure gets one up to speed with the language. It is also the only recommended book 📙 from the Ruby official website.
Profile Image for Antonio.
96 reviews
June 20, 2016

Ruby is the fastest growing and most exciting dynamic language out there. If you need to get working programs delivered fast, you should add Ruby to your toolbox.

This book is the only complete reference for both Ruby 1.9 and Ruby 2.0, the very latest version of Ruby.

2013 marks the 20th anniversary of the Ruby language. We're proud that throughout its history, we've continued to cover the latest version of Ruby.

Would you like to go from first idea to working code much, much faster? Do you currently spend more time satisfying the compiler instead of your clients or end users? Are you frustrated with demanding languages that seem to get in your way, instead of getting the work done? Are you using Rails, and want to dig deeper into the underlying Ruby language? If so, then we've got a language and book for you!

Ruby is a fully object-oriented language, much like the classic object-oriented language, Smalltalk. Like Smalltalk, it is dynamically typed (as opposed to Java or C++), but unlike Smalltalk, Ruby features the same conveniences found in modern scripting languages such as Perl and Python.

The combination of the power of a pure object-oriented language with the convenience of a scripting language makes Ruby a favorite tool of intelligent, forward-thinking programmers.

The Pickaxe contains four major sections:

An acclaimed tutorial on using Ruby. * The definitive reference to the language. * Complete documentation of all built-in classes, modules, and methods. * Complete descriptions of all 97 standard libraries.

This is the reference manual for Ruby, including a description of all the standard library modules, a complete reference to all built-in classes and modules (including all the new and changed methods introduced by Ruby 1.9, 1.9.2, 1.9.3, and 2.0). It also includes all the new and changed syntax and semantics introduced since Ruby 1.8. Learn about the new parameter passing rules, local variable scoping in blocks, fibers, and the new block declaration syntax, among other exciting new features.

About Ruby 2.0

Ruby 2.0 is a minor update to Ruby 1.9, unlike the more major updates from Ruby 1.8 to Ruby 1.9.

The major language changes in Ruby 2.0 are the addition of keyword arguments and the change to use UTF-8 as the default source file encoding.

There are a number of additions to the standard library, including:

@Enumerator::Lazy@, which adds support for lazy access to potentially infinite lists. * Refinements allow you to encapsulate changes to third-party classes, and scope their application to individual source files, preventing your changes from polluting the global application.

You'll also find that Ruby 2 is faster, and has memory management improvements that make it more server-friendly.

All told, there are over 110 sections of the book that have been flagged and cross-linked to indicate 2.0 content.

What You Need

This book assumes you have a basic understanding of object-oriented programming.

In general, Ruby programmers tend to favor the the command line for running their code, and they tend to use text editors rather than IDEs.

Ruby runs on Windows, Linux, and Macs.

About the Author

Dave Thomas is a cornerstone of the Ruby community, and is personally responsible for many of its innovative directions and initiatives. He and original co-author Andy Hunt are founders of the Pragmatic Programmers and the Pragmatic Bookshelf.

Andy Hunt is a programmer turned consultant, author and publisher. He co-authored the best-selling book “The Pragmatic Programmer�, was one of the 17 founders of the Agile Alliance, and co-founded the Pragmatic Bookshelf, publishing award-winning and critically acclaimed books for software developers.

Chad Fowler is co-director of Ruby Central, Inc., and remains an active, driving force in the Ruby community.

Profile Image for wyclif.
187 reviews
August 21, 2012
A tour de force journey through the dynamic, object-oriented language known as Ruby, with over 200 pages of new material and full descriptions of all the standard library modules. Covers strings, classes, blocks, and regular expressions with thorough examples. This book has such a reputation as the definitive reference for learning Ruby that it is simply called "The Pickaxe Book" in the programming community. There are many Ruby tutorials and references on the web, but the beauty of this book is that it is both well-written and provides a compendium of what you really need to know about Ruby that can't be easily sourced and collected. This is the ultimate book for both learning Ruby and use as a desk reference.
Profile Image for Piotr Zurek.
11 reviews5 followers
May 5, 2013
It is the "go to" Ruby book for a reason. If you want to learn Ruby (why wouldn't you?) you pretty much HAVE to read it. A number for things that I didn't quite understand earlier, have just "clicked" when reading this book. I definitely feel like knowledge I got from it was worth the time spend reading this book.

If you're a complete complete Ruby novice (like me) you will want to read straight through the first 3 parts. Part 4 is a dry Ruby Library Reference, so you may want to leave that out until you need something specific from it.
If you know a bit about Ruby and programming in general you may simply refer to specific chapters for help in understanding specific topics. The chapter on metaprogramming is a doozy. :-)
45 reviews4 followers
March 2, 2008
Very nice introduction to a very cool programming language. I like the way the author's started out explaining the language from the point-of-view of describing a hypothetical project that they were going to implement in Ruby and stuck with that metaphor throughout the book (even in the more arcane 'Interfacing Ruby with C' sections). The last 200 pages or so is also essentially a very nice 'Ruby in a Nutshell' type reference so you get 2 books for the price of one: (a) A good tutorial on the Ruby language and (b) A nice reference to put beside your desk. Overall, a very readable book on Ruby.
Profile Image for Fernando Fernandes.
121 reviews8 followers
November 28, 2014
This book lacks structure and organization. It constantly jumps from simple to complex examples and it's hard to get the author's intention. It's just too confusing. In parallel, I'm reading Apple's Swift book. It's impossible not to compare. I'm not talking about the language, but how the books were structured. Apple targets the reader, making the programmer comfortable with the language. This book is the opposite. It made me feel uncomfortable with Ruby. I might use it as a reference book, but with the Internet, I doubt I'll be searching for anything here. Well, time to reactivate my TeamTree House account...
Profile Image for Katherine.
149 reviews
August 11, 2012


Bought the new version from Pragprog. Added a few errors on the errata list. Don't read this with an iPad. Go try the code samples. Some may not work on 1.9.3. Overall I am happy to have spent time reading "what I assume to have always known" about Ruby. It remains to be the most fascinating language I use. I am happy with how this book is written even if it is obviously not perfect (but looking forward to revisions). Their credits to the Japanese programmers who improve the language is good. Ruby 2.0 would even be better because of GC improvements.
Profile Image for Mark.
11 reviews6 followers
June 22, 2010
The 'pickaxe,' oft-cited as the definitive guide for aspiring Ruby hackers. I'd have to agree. The edition I have was updated for the current release of Ruby and contains some gems about the inner-workings of the language that I found fascinating. Read it if you are a dyed-in-the-wool Rubyist or even a dispassionate student of computer languages. You'll no doubt find something worthwhile here.
17 reviews
July 14, 2020
This was a hard read to me and it took so much of will to finish it so I am not too sure if I would like to ever re-read that book or even answer affirmative to the question if I would read it at all if I knew how hard it was. Don't get me wrong, there is useful information, it is a known classic and it provides an overview of the language, but the writing style is sometimes too abstract or just doesn't spark interest (for me).
Profile Image for Michael Minutillo.
AuthorÌý1 book6 followers
October 21, 2009
This book was the beginning of a great journey through the ruby language for me which changed my style of programming quite significantly. The writing style is clear and easy to follow whilst at the same time managing to convey a lot of information in a concise way. I wish all programming books were written this way.
Profile Image for Amar Pai.
960 reviews98 followers
Shelved as 'who-am-i-kidding-will-never-read'
July 2, 2012
I've never made it through one of these books. I always end up reading random snippets on the web instead. It's fine though, half of it is just library documentation anyway. (as is always the case).

I just need to figure out how to make irb give me decent documentation... cheat? ri? rdoc? how can this not be built in?!
Profile Image for Marko Jevtić.
39 reviews2 followers
March 15, 2015
Wonderfully written book that really serves its purpose. As a person who wanted a quick and painless introduction to a new programming language, I can say that this book didn't disappoint.

Most impressive part of the book is the complete list of classes and libraries that are included in the latest (right now it's Ruby 2.0) version of the language.
Profile Image for Burak Dede.
25 reviews5 followers
April 18, 2015
Ok clearly its written for programmers at least know some other language. Book contains spot on reference and comparisons to other languages when introducing ruby features. Other than that its not a holy bible book as ruby community insist, if you are experienced I would consider Well Grounded Rubyist but this book has much better formed examples.
Profile Image for RJ.
151 reviews5 followers
Read
February 1, 2009
Programming Ruby: s' Guide, Second Edition by Dave Thomas (2004)
10 reviews2 followers
July 21, 2009
The key reference for understanding the Ruby programming language. If you want to be up-to-speed on Ruby you've got to have this book. I also have the PDF version which is great to have if you're not by your bookshelf.
AuthorÌý9 books1 follower
July 26, 2010
This is the book I learned Ruby from, once upon a time, and while it has its detractors I still think it's a good tutorial (especially if you know some other programming language, like Java). Probably not a good choice if you've never done any programming.
51 reviews2 followers
August 23, 2016
A true "gem" of a language. This book is important because it kickstarted global awareness of a Japanese programming language towards a constantly growing legion of fans.

Would highly recommend starting off with this one + then getting "The Ruby Programming Language"
Profile Image for Arun.
207 reviews64 followers
January 16, 2024
Read only Part 1 (Facets of Ruby) explaining Ruby 3.3 version of the languages. Rest of the part's are akin to reference than tutorial so can be skimmed through as needed. Overall I got what I needed for a gig.
Displaying 1 - 30 of 71 reviews

Can't find what you're looking for?

Get help and learn more about the design.