The Ruby Programming Language

By David Flanagan, Yukihiro Matsumoto
January 2008
Pages: 446
ISBN 10: 0-596-51617-7 | ISBN 13: 9780596516178
Press Release
starstarstarstarstar (5) (Average of 5 Customer Reviews)

Buy 2 Get 1 Free Free ShippingGuarantee

Description

Bestselling author David Flanagan teams up with Ruby creator Yukihiro "Matz" Matsumoto and writer/cartoonist/programmer why the lucky stiff to bring you the authoritative guide to Ruby. Covering versions 1.9 and 1.8, this book helps you learn Ruby's lexical structure, primary expressions, conditionals, syntax, classes, the data it manipulates, and more. For experienced programmers who want to look at this language in depth, this guide is invaluable.
Full Description

The Ruby Programming Language is the authoritative guide to Ruby and provides comprehensive coverage of versions 1.8 and 1.9 of the language. It was written (and illustrated!) by an all-star team:
  • David Flanagan, bestselling author of programming language "bibles" (including JavaScript: The Definitive Guide and Java in a Nutshell) and committer to the Ruby Subversion repository.


  • Yukihiro "Matz" Matsumoto, creator, designer and lead developer of Ruby and author of Ruby in a Nutshell, which has been expanded and revised to become this book.


  • why the lucky stiff, artist and Ruby programmer extraordinaire.
This book begins with a quick-start tutorial to the language, and then explains the language in detail from the bottom up: from lexical and syntactic structure to datatypes to expressions and statements and on through methods, blocks, lambdas, closures, classes and modules.

The book also includes a long and thorough introduction to the rich API of the Ruby platform, demonstrating -- with heavily-commented example code -- Ruby's facilities for text processing, numeric manipulation, collections, input/output, networking, and concurrency. An entire chapter is devoted to Ruby's metaprogramming capabilities.

The Ruby Programming Language documents the Ruby language definitively but without the formality of a language specification. It is written for experienced programmers who are new to Ruby, and for current Ruby programmers who want to challenge their understanding and increase their mastery of the language.




Featured customer reviews

Write a Review


A Fine Piece Of Technical Writing,  April 03 2009
Rating: StarStarStarStarStar
Submitted by Andrew Garber   [Respond | View]

Regardless of whether you're a fan of Ruby, The Ruby Programming Language is one of the finest pieces of technical writing that I have ever laid eyes on. The book is extremely well organized, and details every nook and cranny of the language.


Matz Gets It Right!,  October 06 2008
Rating: StarStarStarStarStar
Submitted by Dave Walz-Burkett   [Respond | View]

This book does for Ruby what Kernighan & Ritchie's "The C Programming Language" did for C. It provides a concise, accessible introduction to the Ruby programming language.

Starting out with a tour of Ruby, you are then taken on a deeper dive into chapters on "Structure and Execution", "Datatypes and Objects", "Expressions and Operators", and "Statements and Control Structures". Some of the real power of Ruby is revealed in chapters on "Methods, Procs, Lambdas, and Closures", "Classes and Modules", and "Reflection and Metaprogramming".

The book closes with chapters on "The Ruby Platform" and "The Ruby Environment". The chapter on the Ruby Platform is like a condensed API guide to Ruby's core library. The chapter on the Ruby Environment will help you navigate through the Ruby interpreter's command-line arguments and environment variables as well as a grab-bag of extra Ruby topics that were not covered earlier in the book.

The book is well organized and easy to read. Each chapter is peppered with code samples. If you are serious about learning Ruby, get this book! It sits on my bookshelf, next to a copy of the Pickaxe book and The Ruby Way. Bonus: each chapter of the book starts with a work of art by why the lucky stiff!


re: Horrible font issue in the PDF Version,  March 25 2008
Submitted by Anonymous Reader   [Respond | View]

Keith, thanks for fixing this issue.

P.S. you seem to have a small typo in the last sentence of your O'Reilly bio:

Additionally, Keith is helps run the Bay Area Functional Programmers


Read all reviews


Keith Fahlgren photo re: Horrible font issue in the PDF Version,  March 25 2008
Submitted by Keith Fahlgren | O'Reilly AuthorO'Reilly Blogger   [Respond | View]

Based on reader complaints, we've gone back to the font foundry and gotten an OTF version of the problematic constant-width fonts. A new PDF that resolves the Preview-rendering issues has been released and all customers that had previously purchased this PDF should have been notified via email.


re: Horrible font issue in the PDF Version,  March 24 2008
Submitted by Anonymous Reader   [Respond | View]

Allen, do you have anything to update on this issue? My bug against Preview is: rdar://problem/5815379

Thanks.


re: Horrible font issue in the PDF Version,  March 21 2008
Rating: StarStarStarStarStar
Submitted by boo   [Respond | View]

What has changed in the pdfs recently? I have the same problem with the Shortcuts edition on PyParsing which I bought today, but don't have the problem with the pdf of the Ruby Cookbook, which I bought around the time of its release in mid-2006, nor any of the other pdfs I have bought from O'Reilly (Rails Cookbook, Designing Web Navigation, etc...).






A Must-Have For Serious Ruby Developers,  March 04 2008
Rating: StarStarStarStarStar
Submitted by Larry   [Respond | View]

Like the book says in the beginning: "Ruby is not a simple language... and this book is not a simple book. It is intended for experienced programmers... and are willing to read carefully and thoughtfully to achieve this goal."
Ruby is still relatively new, so there are not a ton of books from which to choose. But you gotta figure that one by the creator of the language (Y. Matsumoto) and the author of the popular "Java in a Nutshell" (D. Flanagan) is bound to be good - and it is.
It's a simple, no-nonsense text that will answer just about any question you might have about the Ruby programming language. This and the more-conversational-in-tone "The Ruby Way" by Hal Fulton make for an unbeatable pair.


re: Horrible font issue in the PDF Version,  March 01 2008
Submitted by Anonymous Reader   [Respond | View]

Allen,

Thanks for your commitment to this important issue. Those links were certainly interesting.

After reading them all, I promptly cleared every known Mac OS X font cache and rebooted. As almost all users from the various links had reported some level of resolution with this same procedure, I was hopeful. Alas, it was not to be, and upon reboot Preview was still unwilling to render TheSans Mono Condensed properly.

Knowing absolutely nothing about PDF creation but unwilling to accept this subpar fate for an otherwise exceptional work, I downloaded Acrobat Professional 8 Trial from Adobe.

One short hour later it was installed and ten minutes after that, The Ruby Programming Language PDF was rendering perfectly in Preview on Mac OS X.

Great news and it was a simple fix. I just exported the PDF as a PostScript "Level 2" file, including "Embedded and Referenced fonts" and then simply regenerated the PDF from the exported PS with Acrobat Distiller.

Again, pardon my ignorance of the document creation process in general. Here's a link to the screenshot showing both your original and the regenerated version rendered side-by-side:

http://socialface.com/failure/image/82798

If we could get a little closer to what the problem is, it would certainly be easier to file a bug against Preview...

Your level of dedication truly is what separates O'Reilly from the competition, thanks again.




Allen Noren photo re: Horrible font issue in the PDF Version,  February 29 2008
Submitted by Allen Noren | O'Reilly AuthorO'Reilly Blogger   [Respond | View]

I sent your latest reply to Keith Fahlgren in our production/tools group. He corrected me regarding my use of "standards" and provided some documentation. Regarding my standards comment, Keith wrote:

"Not "web standards", but "Type1 font embedding in the PDF standard."

In regards to your offer of sending some notification to Apple, Keith wrote:

"Well, that hasn't done anything in the past. I'm tired of this problem, so here's a very cursory review of Preview font embedding problems via Google:

http://discussions.apple.com/thread.jspa?messageID=6458458
http://lists.apple.com/archives/quartz-dev/2007/Oct/msg00022.html
http://discussions.apple.com/thread.jspa?messageID=6523267

Here's my current fave:

http://nmg.livejournal.com/128612.html




re: Horrible font issue in the PDF Version,  February 29 2008
Submitted by Anonymous Reader   [Respond | View]

Hi Allen,

Thanks for the response and thanks for working hard to make this single PDF work with Preview like every single other publisher has managed to do for every single other PDF I have.

I think it's unfortunate you failed at this mission, though, honestly. The book itself is could easily become the seminal Ruby book (replacing the PickAxe??) and it seems a cruel injustice to see it marred on the Mac this way, where Ruby itself has found such a strong community.

_why's contributions alone merit an extra effort at compatibility from all of us, so what I'd like to do is ask you which specific standard Apple isn't supporting that would cause this one font to render incorrectly?

In return for you help, I'll personally file a bug with Apple as well as pass this around to some people and see if we can't get some attention on the issue.

Thanks again, Allen.


Allen Noren photo Re: Horrible font issue in the PDF Version,  February 29 2008
Submitted by Allen Noren | O'Reilly AuthorO'Reilly Blogger   [Respond | View]

Hello Anonymous,

We worked hard to make our PDFs work with Preview, but since Apple does not support PDF standards, it was a no-win situation for us and, as you note, we list Acrobat as the preferred reader.

Thanks for taking the time to write to us.

--Allen


Horrible font issue in the PDF Version,  February 29 2008
Rating: StarStarStarStarStar
Submitted by Anonymous Reader   [Respond | View]

Trying to read the PDF with Preview on Mac OS X is almost impossible. In particular, the code examples come out severely messed up bold.

It's incredibly distracting and unfortunately, as O'Reilly does suggest, viewing the PDF with Adobe Reader works fine.

SO yes, before you buy this as a PDF, understand you're going to need to view with Adobe Reader...............


Media reviews
"The book covers Ruby 1.8 and 1.9 and with its esteemed authors and technical approach, is sure to become a new 'Bible' for Ruby developers. In programming book style, I’m going to refer to it as the 'Hummingbird' book in future, due to the woodcut pictures of hummingbirds on the front...The Hummingbird deserves to be on your bookshelf, whether you’re a seasoned developer looking to learn Ruby, or an existing Ruby developer who just wants a great core-language reference."
-- Peter Cooper, Ruby Inside


"...a simple, no-nonsense text that will answer just about any question you might have about the Ruby programming language."
-- Larry Hannay, Amazon.com


"One long-time Rails developer sent me an email with their first impressions of The Ruby Programming Language: "I have been finding the book very useful, and I'm glad I did get it sooner rather than later." Matz said "Ruby is designed to make programmers happy." It looks like similar design thinking went into this book."
-- Brian DeLacey, Slashdot.org



Read all reviews

See larger cover

"...with its esteemed authors and technical approach, is sure to become a new 'Bible' for Ruby developers."
--Peter Cooper, Ruby Inside