The Ruby Programming Language

By David Flanagan, Yukihiro Matsumoto

The Ruby Programming Language is the authoritative consultant to Ruby and offers accomplished insurance of models 1.8 and 1.9 of the language. It used to be written (and illustrated!) by way of 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, author, dressmaker and lead developer of Ruby and writer of Ruby in a Nutshell, which has been accelerated and revised to develop into this book.
  • why the fortunate stiff, artist and Ruby programmer extraordinaire.

This booklet starts with a quick-start educational 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, sessions 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 complete 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 really is written for skilled programmers who're new to Ruby, and for present Ruby programmers who are looking to problem their realizing and bring up their mastery of the language.

Show description

Preview of The Ruby Programming Language PDF

Similar Computers books

Networks: An Introduction

The clinical examine of networks, together with machine networks, social networks, and organic networks, has acquired an important volume of curiosity within the previous few years. the increase of the net and the large availability of cheap desktops have made it attainable to collect and learn community facts on a wide scale, and the advance of quite a few new theoretical instruments has allowed us to extract new wisdom from many alternative types of networks.

LaTeX: A Document Preparation System (2nd Edition)

LaTex is a software program method for typesetting records. since it is principally stable for technical files and is obtainable for nearly any computing device approach, LaTex has turn into a lingua franca of the medical global. Researchers, educators, and scholars in universities, in addition to scientists in undefined, use LaTex to supply professionally formatted papers, proposals, and books.

Building a WordPress Blog People Want to Read

Having your individual weblog is not only for the nerdy anymore. this present day, it kind of feels everyone—from multinational agencies to a neighbor up the street—has a weblog. all of them have one, partly, as the fogeys at WordPress make it effortless to get one. yet to truly construct a superb blog—to create a web publication humans are looking to read—takes inspiration, making plans, and a few attempt.

AutoCAD 2008 For Dummies

A gradual, funny advent to this fearsomely advanced software program that is helping new clients commence developing second and 3D technical drawings straight away Covers the hot positive factors and improvements within the most recent AutoCAD model and gives insurance of AutoCAD LT, AutoCAD's lower-cost sibling subject matters coated comprise making a easy format, utilizing AutoCAD DesignCenter, drawing and enhancing, operating with dimensions, plotting, utilizing blocks, including textual content to drawings, and drawing on the net AutoCAD is the best CAD software program for architects, engineers, and draftspeople who have to create distinct 2nd and 3D technical drawings; there are greater than five million registered AutoCAD and AutoCAD LT clients

Extra info for The Ruby Programming Language

Show sample text content

It truly is attainable, even though, to examine the worth again through this operator to profit anything concerning the kind of the expression at the righthand aspect. desk 4-3 lists the potential go back values of this operator. desk 4-3. go back values of the outlined? operator Operand expression kind go back price connection with outlined neighborhood variable "local-variable" connection with outlined block neighborhood variable (Ruby 1. eight in basic terms) "local-variable(inblock)" connection with outlined international variable "global-variable" particular common expression worldwide variables, $&, $+, $`, $', and $1 to $9, while outlined following a winning fit (Ruby 1. eight in simple terms) identify of variable, as a string connection with outlined consistent "constant" connection with outlined example variable "instance-variable" connection with outlined classification variable "class variable" (note no hyphen) nil "nil" (note it is a string) actual, fake "true", "false" four. 6 Operators | 113 Operand expression style go back worth self "self" yield whilst there's a block to yield to (see additionally Kernel technique block_given? ) "yield" tremendous whilst in context the place it's allowed "super" task (assignment isn't really played) "assignment" technique invocation, together with operators outlined as equipment (method isn't really truly invoked and needn't have right variety of arguments; see additionally item. respond_to? ) "method" the other legitimate expression, together with literals and integrated operators "expression" Any expression that makes use of an undefined variable or approach identify, or that makes use of yield or great the place they don't seem to be allowed nil The outlined? operator has very low priority. so that you can try out no matter if variables are outlined, use and rather than &&: outlined? a and outlined? b outlined? a && outlined? b # This works # Evaluated as: outlined? ((a && outlined? b)) four. 6. thirteen assertion Modifiers rescue, if, until, whereas, and till are conditional, looping, and exception-handling statements that have an effect on the flow-of-control of a Ruby software. they could even be used as assertion modifiers, in code like this: print x if x during this modifier shape, they are often thought of operators during which the worth of the righthand expression impacts the execution of the lefthand expression. (Or, with regards to the rescue modifier, the exception prestige of the lefthand expression impacts the execution of the righthand operand. ) it isn't relatively important to explain those key terms as operators. they're documented, in either their assertion and expression modifier shape, in bankruptcy five. The keyword phrases are indexed in desk 4-2 just to exhibit their priority relative to different operators. be aware that all of them have very low priority, yet that the rescue assertion modifier has larger priority than task. four. 6. 14 Nonoperators such a lot of Ruby’s operators are written utilizing punctuation characters. Ruby’s grammar additionally makes use of a few punctuation characters that aren't operators. even though we’ve noticeable (or will see) a lot of this nonoperator punctuation somewhere else during this booklet, let’s assessment it the following: 114 | bankruptcy 4: Expressions and Operators () Parentheses are an not obligatory a part of technique definition and invocation syntax.

Download PDF sample

Rated 4.49 of 5 – based on 49 votes