0 Usuarios y 1 Visitante están viendo este tema.
1.Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Lexical StructureSyntactic StructureFile StructureProgram EncodingProgram ExecutionDatatypes and Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41The Structure and Execution of Ruby Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25A Tour of RubyTry RubyAbout This BookA Sudoku Solver in RubyNumbersTextArraysHashesRangesSymbolsTrue, False, and NilObjectsExpressions and Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85Literals and Keyword LiteralsVariable ReferencesConstant ReferencesMethod InvocationsAssignmentsOperatorsStatements and Control Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117Defining Simple MethodsMethod NamesMethods and ParenthesesMethod ArgumentsProcs and LambdasClosuresMethod ObjectsFunctional ProgrammingMethods, Procs, Lambdas, and Closures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175ConditionalsLoopsIterators and Enumerable ObjectsBlocksAltering Control FlowExceptions and Exception HandlingBEGIN and ENDThreads, Fibers, and ContinuationsDefining a Simple ClassMethod Visibility: Public, Protected, PrivateSubclassing and InheritanceObject Creation and InitializationModulesLoading and Requiring ModulesSingleton Methods and the EigenclassMethod LookupConstant LookupReflection and Metaprogramming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265Types, Classes, and ModulesEvaluating Strings and BlocksVariables and ConstantsMethodsHooksTracingObjectSpace and GCCustom Control StructuresMissing Methods and Missing ConstantsDynamically Creating MethodsAlias Chainingvi | Table of Contents8.12 Domain-Specific Languages9.296The Ruby Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30310.5Invoking the Ruby InterpreterThe Top-Level EnvironmentPractical Extraction and Reporting ShortcutsCalling the OSSecurity