- Series: In a Nutshell (O'Reilly)
- Paperback: 230 pages
- Publisher: O'Reilly Media; 1 edition (November 2001)
- Language: English
- ISBN-10: 0596002149
- ISBN-13: 978-0596002145
- Product Dimensions: 6 x 0.6 x 9 inches
- Shipping Weight: 11.4 ounces (View shipping rates and policies)
- Average Customer Review: 8 customer reviews
- Amazon Best Sellers Rank: #1,826,787 in Books (See Top 100 in Books)
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Ruby In A Nutshell 1st Edition
Use the Amazon App to scan ISBNs and compare prices.
The Amazon Book Review
Author interviews, book reviews, editors picks, and more. Read it now
Frequently bought together
Customers who bought this item also bought
Text: English (translation)
About the Author
Yukihiro Matsumoto ("Matz"), the creator of Ruby, is a professional programmer who worked for the Japanese open source company, netlab.jp. Matz is also known as one of the open source evangelists in Japan. He's released several open source products, including cmail, the emacs-based mail user agent, written entirely in emacs lisp. Ruby is his first piece of software that has become known outside of Japan.
Top customer reviews
When I pick up a reference book, I am looking for more than "s[n..m] returns a partial string". Well, duh. I want to know what will happen when I break the obvious boundary conditions. What will happen if n, m, or both n and m are out of bounds? And more than knowing what will happen, I want to know what is *specified* to happen. Sure, I can fire up irb and find out for myself, but is the observed behavior a coincidence, or is it the intended behavior that will be supported in future versions of Ruby?
There are also many errors in this book. For example, a[n..m] (where a is an Array) also "returns a partial string". Really?
Once upon a time, O'Reilly Nutshell books were the definitive reference manual for any technology. Unfortunately, they don't seem to be applying any editorial review of these books to give them a consistent level of quality. Color me disappointed.
Page 12: "A symbol is an object corresponding to an identifier or variable." Uh, what? That's the complete explanation for this language construct.
Page 64: "arr.slice(n, len) Deletes the partial string specified and returns it." Followed by an example obviously copied from String::slice on page 54, which has the exact same example code except using 's' instead of 'a'. But page 64 is supposed to be describing arrays, not strings, so the description and example are just plain wrong.
It goes on and on. I had high hopes for this book given my past experience with O'Reilly Nutshell books, but this book is just not ready to go to print yet, and obviously has been very poorly proofread. Sadly it's been printed and it's out there in the world, so your best bet is to just avoid it until O'Reilly publishes a 2nd edition that fixes all of these mistakes.
I keep this book by my side when programming Ruby because, like most O'Reilly Cookbooks, the answers to the basics are a quick flip of the pages away. I also use The Ruby Way which is also good in a text book kind of way -- it offers examples.
All the basic functions and Classes are documented in this Cookbook. Its as if the originator of the language, the author Yukihiro Matsumoto, squeezed all the fluff out of the documentation and only served up the critical calling conventions for all important statements, functions and Classes.
For updates on the functions you can also use online resources or the Help file that comes with the program itself.
This review was written in February of 2004 and version 2.0 of Ruby is said to be a complete re-write. But that release will not be out for another year or so. I would then guess that this book would be valid through 2005.
Sugar Land, TX
But once you have an understanding of the basic ideas of Ruby, then you're going to want a reference of all the standard Ruby "objects", and what methods are supported by each class of objects. "Ruby in a Nutshell" calls itself "a desktop quick reference", and I think it does a good job of it. It covers a lot of ground, and tries to do it in as few words as necessary.
As to the language itself, I'd say that programmers familiar with Java or Objective-C would find Ruby an easy language to pick up, and to use for projects you might otherwise use Perl for. I haven't tried to use Python yet, so I can not compare Ruby to that language.
Coverage of semantics is very limited and examples are few and far between.