By David Flanagan, Yukihiro Matsumoto

The Ruby Programming Language is the authoritative consultant to Ruby and gives entire insurance of types 1.8 and 1.9 of the language. It was once written (and illustrated!) via an all-star team:

  • David Flanagan, bestselling writer of programming language "bibles" (including JavaScript: The Definitive Guide and Java in a Nutshell) and committer to the Ruby Subversion repository.
  • Yukihiro "Matz" Matsumoto, writer, dressmaker and lead developer of Ruby and writer of Ruby in a Nutshell, which has been extended and revised to turn into this book.
  • why the fortunate stiff, artist and Ruby programmer extraordinaire.

This ebook starts with a quick-start instructional to the language, after which explains the language intimately from the ground up: from lexical and syntactic constitution to datatypes to expressions and statements and on via tools, blocks, lambdas, closures, periods and modules.

The ebook additionally features a lengthy and thorough advent to the wealthy API of the Ruby platform, demonstrating -- with heavily-commented instance code -- Ruby's amenities for textual content processing, numeric manipulation, collections, input/output, networking, and concurrency. a whole bankruptcy is dedicated to Ruby's metaprogramming capabilities.

The Ruby Programming Language records the Ruby language definitively yet with out the formality of a language specification. it truly is written for knowledgeable programmers who're new to Ruby, and for present Ruby programmers who are looking to problem their knowing and elevate their mastery of the language.

Show description

Read Online or Download The Ruby Programming Language PDF

Similar Computers books

Database Modeling and Design: Logical Design, 4th Edition (The Morgan Kaufmann Series in Data Management Systems)

Database structures and database layout know-how have passed through major evolution lately. The relational facts version and relational database platforms dominate enterprise functions; in flip, they're prolonged through different applied sciences like information warehousing, OLAP, and knowledge mining. How do you version and layout your database program in attention of recent expertise or new enterprise wishes?

Computer Networking: A Top-Down Approach (6th Edition)

&>Computer Networking maintains with an early emphasis on application-layer paradigms and alertness programming interfaces (the most sensible layer), encouraging a hands-on adventure with protocols and networking ideas, ahead of operating down the protocol stack to extra summary layers. This e-book has turn into the dominant publication for this direction a result of authors’ reputations, the precision of clarification, the standard of the artwork application, and the worth in their personal vitamins.

The Guru's Guide to Transact-SQL

In view that its creation over a decade in the past, the Microsoft SQL Server question language, Transact-SQL, has develop into more and more renowned and extra strong. the present model activities such complicated positive aspects as OLE Automation help, cross-platform querying amenities, and full-text seek administration. This e-book is the consummate advisor to Microsoft Transact-SQL.

Data Structures and Problem Solving Using Java (4th Edition)

Facts constructions and challenge fixing utilizing Java takes a realistic and new angle to info buildings that separates interface from implementation. it truly is compatible for the second one or 3rd programming path.   This booklet offers a realistic advent to info buildings with an emphasis on summary pondering and challenge fixing, in addition to using Java.

Extra info for The Ruby Programming Language

Show sample text content

2 four. three four. four four. five four. 6 Literals and key-phrase Literals Variable References consistent References approach Invocations Assignments Operators 86 87 88 89 ninety two a hundred v 5. Statements and regulate buildings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 five. 1 five. 2 five. three five. four five. five five. 6 five. 7 five. eight 6. Defining easy equipment procedure Names tools and Parentheses approach Arguments Procs and Lambdas Closures procedure items practical Programming 177 a hundred and eighty 183 185 192 2 hundred 203 205 sessions and Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 7. 1 7. 2 7. three 7. four 7. five 7. 6 7. 7 7. eight 7. nine eight. 118 127 a hundred thirty a hundred and forty 146 154 one hundred sixty five 166 equipment, Procs, Lambdas, and Closures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . a hundred seventy five 6. 1 6. 2 6. three 6. four 6. five 6. 6 6. 7 6. eight 7. Conditionals Loops Iterators and Enumerable items Blocks changing keep watch over circulate Exceptions and Exception dealing with commence and finish Threads, Fibers, and Continuations Defining an easy classification approach Visibility: Public, safe, deepest Subclassing and Inheritance item construction and Initialization Modules Loading and Requiring Modules Singleton equipment and the Eigenclass strategy look up consistent look up 214 232 234 241 247 252 257 258 261 mirrored image and Metaprogramming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265 eight. 1 eight. 2 eight. three eight. four eight. five eight. 6 eight. 7 eight. eight eight. nine eight. 10 eight. eleven forms, periods, and Modules comparing Strings and Blocks Variables and Constants equipment Hooks Tracing ObjectSpace and GC customized keep an eye on buildings lacking equipment and lacking Constants Dynamically growing tools Alias Chaining vi | desk of Contents 266 268 271 272 277 279 281 281 284 287 290 8. 12 Domain-Specific Languages nine. 296 The Ruby Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 nine. 1 nine. 2 nine. three nine. four nine. five nine. 6 nine. 7 nine. eight nine. nine Strings standard Expressions Numbers and Math Dates and occasions Collections documents and Directories Input/Output Networking Threads and Concurrency 304 310 321 325 328 350 356 366 373 10. The Ruby surroundings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389 10. 1 10. 2 10. three 10. four 10. five Invoking the Ruby Interpreter The Top-Level atmosphere useful Extraction and Reporting Shortcuts Calling the OS safety 390 395 403 405 409 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 desk of Contents | vii Preface This booklet is an up-to-date and increased model of Ruby in a Nutshell (O’Reilly) by way of Yukihiro Matsumoto, who's larger referred to as Matz. it truly is loosely modeled after the vintage The interval (Prentice corridor) via Brian Kernighan and Dennis Ritchie, and goals to rfile the Ruby language comprehensively yet with no the formality of a language specification. it's written for knowledgeable programmers who're new to Ruby, and for present Ruby programmers who are looking to take their figuring out and mastery of the language to the subsequent point. You’ll discover a advisor to the constitution and association of this ebook in bankruptcy 1. Acknowledgments David Flanagan sooner than the rest, i have to thank Matz for the attractive language he has designed, for his support realizing that language, and for the Nutshell that this e-book grew out of.

Rated 4.53 of 5 – based on 36 votes