’
By Developers, For Developers
PDF Pg | Paper Pg | Type | Description | Fixed on | Comments |
---|---|---|---|---|---|
137 | TYPO | “Although threads can no take advantage” => “Although | 2007-12-13 | ||
137 | TYPO | “but only every operates a single thread” => “but only ever operates a single thread” | 2007-12-13 | ||
79 | TYPO | “You can create an Enumerator object by calling the to_enumethod” should say “to_enum method” | 2007-12-14 | ||
160 | TYPO | “manually scheduling threads without involved any …” should read “involving” | 2007-12-14 | ||
162 | TYPO | “it uses native operating system, but only ever operates a single thread at a time” should (I think) read “uses native operating system threads” | 2007-12-14 | ||
162 | TYPO | “You’ll never see two thread in the same application” should read “threads” | 2007-12-14 | ||
162 | TYPO | “By calling join on each of the requestor threads” should be “requester”, according to my dictionary (Chambers), but this may just be a US versus Australian/British English difference. | 2007-12-14 | ||
75 | TYPO | “What’s more, these rules changes significantly with Ruby 1.9” should read either “change” or “changed”. | 2007-12-14 | ||
19 | TYPO | “…(an implementation in Java from runs of the JVM),..” should be “that” instead of “from” | 2007-12-14 | ||
161 | TYPO | Towards the middle of the page, there’s a sentence, “For now, the code is the block is not executed.” It looks like it should read, “The code in the block”. | 2008-01-09 | ||
60 | SUGGEST | Change “def MyLogger.create” to “def self.create” - since somewhere before this page you wrote that this is the new/preferred/modern idiom. | 2008-01-09 | ||
20 | TYPO | In note 1 at the bottom of the page, the phrase “Development versions of the software had off minor version numbers…”. The word ‘off’ should be ‘odd’. | 2008-01-09 | ||
161 | TYPO | In “We could fix this by writing a class which reads the file and yields each successive work.” “work” should be “word”. | 2008-01-09 | ||
42 | OK | The 1.9 note on the new literal hash syntax says “in fact hashes are so frequently used that 1.9 introduces a new hash syntax.” I don’t think thats the motivation. The real motivation is for use of hashes as keyword parameters to methods. I’d suggest changing this to something like “Ruby 1.9 has introduced an additional syntax for hashes which is more compact …” | 2008-01-09 | ||
109 | SUGGEST | At the bottom of this page (tagged with 1.9): “Do this by prefixing the array argument (which must follow all the regular arguments)” then on the next page examples which include splat parameters anywhere in the parameter list, and the following: As of Ruby 1.9, splat arguments can appear anywhere in the parameter list, and you can intermix splat and regular arguments. | 2008-01-09 | ||
42 | TYPO | First paragraph: “Ruby also guarantees that n matter…” — should be “no” not “n” | 2008-01-09 | ||
112 | SUGGEST | This describes a 1.9 feature, but doesn’t have the little icon on the side of the page. Should add… | 2008-01-09 | ||
149 | SUGGEST | “Alternatively, the module could use a module-level hash, indexed by the current object ID, to store instance-specific data without using Ruby instance variables.” It should be useful to add a warning for this way : the instance-specific data will not be removed if the GC kill the object… | 2008-01-09 | ||
87 | SUGGEST | While the code at the bottom of the page works (samples/tutstdtypes_12.rb), it’s not clear (to me at least) why. Why does there have to be a comma between the two opening ’<< PS Submission form doesn’t seem to work with Opera | 2008-01-09 | ||
657 | TYPO | The method prototype contains a type “_tring” when you mean “_string.” str.squeeze( < string > ) → squeezed_tring Should be str.squeeze( < string > ) → squeezed_string | 2008-01-09 | ||
65 | ERROR | In the text towards the bottom of the page you say, “You can also prevent anyone from changing a particular object by freezing it (we talk more about freezing objects on page 413). Attempt to alter a frozen object, and Ruby will raise a TypeError exception.” But when you run the example code, a RuntimeError is raised. The above text is incorrect and should read: “You can also prevent anyone from changing a particular object by freezing it (we talk more about freezing objects on page 413). Attempt to alter a frozen object, and Ruby will raise a RuntimeError exception.” | 2008-01-09 | ||
781 | SUGGEST | Chapter 28 (extending ruby) doesn’t discuss the treading model in 1.9, and the big VM lock. I think this is a big change, and should be addressed, so people can write better extensions. Excerpt from ko1: rb_thread_blocking_region( func() is your function which you want to do without GL. YARV ubf (unblocking function) is called when another thread interrupts | 2008-11-12 | ||
28 | ERROR | The release notes say you’ve changed from, the One-Click to the ruby-lang.org version, but this page still points to the One-Click | 2008-01-18 | ||
151 | TYPO | The sentence just after the code example beginning “class Client” ends with “when if the object is deleted”. | 2008-01-18 | ||
1 | OK | Could you please include a few pages on the use of SQLite with Ruby in the 3rd edition of “Programming Ruby”? Or some other database that doesn’t convert all of it’s keys into strings? (You mention MySQL, but it isn’t yet in the index, and the mentions seem to be en passant.) I would prefer SQLite, because I want to have local db files that aren’t system wide. Even using libdb (nee SleepyCat’s Berkeley DB) would be preferable (though I note that Python access to libdb seems to insist that keys be strings unless you are ordering the DB by record number). That said, I realize that there doesn’t seem to be much available on the web about using SQLite with Ruby (i.e., I haven’t found anything useful), so it might not be feasible without writing a C interface. (Dave says: Charles: there’s an Sqlite GEM that gives you a decent interface. The book really doesn’t have time to discuss all available libraries—I’m already in to hernia territory) | 2008-01-18 | ||
24 | SUGGEST | FYI: This is only a suggestion. I really like the book. My criticism is meant only to help you make the book better (at least in my eyes). You could use a more consistent parallel construction when writing about the four parts. That is, start a major paragraph with the PART #. Just skimming the page I can immediately see Parts I, and III, but for II and IV I really have to stop and look to find them. I’m not a great reader and want to find particular technical info without having to read lots of text—so a consistent structure helps me. The change could be as simple as (I’ll do the whole thing): | 2008-01-18 | ||
786 | TYPO | “This kind of hands-off manipulate of Ruby programs from within C code is easy, but it has should say “manipulation” and “two” | 2008-02-10 | ||
42 | TYPO | In first paragraph of section “Symbols”, “reference to the compass points” should be “refer to the compass points”. | 2008-01-27 | ||
163 | SUGGEST | “We could fix this by writing a class which reads the file and yields each successive word.” Should that be “writing a method” instead? | 2008-02-10 | ||
29 | SUGGEST | you should add the “Ruby One-Click Installer for Mac OSX” to your list of osx ruby distributions. see the project on rubyosx.com — furthermore, there is a one-click installer for ruby 1.9 for osx in development, soon to be released on rubyosx.com. (Dave says: I will when it supports 1.9) | 2008-10-14 | ||
80 | TYPO | missing space: to_enummethod should be to_enum method in the paragraph just above the code example | 2008-02-18 | ||
123 | SUGGEST | Putting defined? and the logical operators into one heading is confusing and unnecessary | 2008-02-10 | ||
89 | OK | There is no such thing as “8-bit ASCII”. I understand that Ruby has an encoding “ASCII-8BIT”, but this term is going to confuse readers into thinking there is such a thing. You may have to say early what ASCII-8BIT is about (i.e., ASCII with a promise that non-ASCII characters won’t be interpreted). (Dave says: I believe I go on to explain just that…) | 2008-02-10 | ||
182 | ERROR | The bookmark for Unit Testing, under Part I—-Facets of Ruby takes you to page 182, but the chapter actually starts on 181. | 2008-07-31 | ||
550 | SUGGEST | The description of the private method Object#remove_instance_variable uses an example which implies that the removed instance variable is set to nil. In reality this method actually undefines the instance variable and then calling the attribute reader re-defines it. The example would be better as: class Dummy def remove def var_defined? | 2008-03-19 | ||
229 | TYPO | typo: esxception | 2008-02-18 | ||
425 | TYPO | typo: minnax instead of minmax in method name, also minmax “call template” contains “min” instead of “minmax”. The “call template” is also wrong for minmax_by and min_by. | 2008-02-18 | ||
441 | TYPO | description of identical? method has bogus “in Table 26.3 on the following page” in the text as last sentence. | 2008-02-18 | ||
442 | SUGGEST | Description of File.new is bit unclear with respect to “modestring”. The referenced table (26.6 on p. 478) doesn’t talk about encodings, even though the text suggests it will. Also, what happens with encoding if you use integer as modenum is not explicitly mentioned in the text. (Dave says: IO hasn’t yet been updated. When it is, the table will contain what you need) | 2008-03-10 | ||
453 | ERROR | Return value in “call template” for both world_readable? and world_writable? doesn’t correspond with the return value mentioned in method description. Which one is it, then? “bits or nil” or “true or false” | 2008-02-18 | ||
1 | SUGGEST | Would (Dave says: that turns out to be a tad difficult because of the way the flags are added (don’t ask. I personally just use the search facility in my PDF viewer) | 2008-02-25 | ||
467 | TYPO | In description of Hash.compare_by_identity is typo in sentence “… if hey are the object.” Btw, even with s/hey/they/ it doesn’t make much sense to me. How about adding “same”? | 2008-02-18 | ||
471 | TYPO | Hash.key — typo in description: “hte” (should be “the”). | 2008-02-18 | ||
472 | TYPO | Hash.rassoc description, missing description of what is rassoc looking for: “Searches hsh for the first element whose value is (((blank))), returning…” | 2008-02-18 | ||
227 | TYPO | In the first sentence after the header “Source Encoding is Per-File”, build should be built. | 2008-02-18 | ||
229 | TYPO | “the the” should be “if the” in the sentence that begins “You have to be careful…” | 2008-02-18 | ||
224 | TYPO | Simple typo Ruby actually comes with more encodings that those shown in the output from this code. Should be “more encodings than…” | 2008-02-18 | ||
297 | SUGGEST | Could you give detailed information on the reserved word undef? (Dave says: I’ve made a note to document it in the languages chapter) | 2008-02-25 | ||
346 | TYPO | Fourth paragraph in “self and Method Calling” section reads “If is can’t find the method in the class, it looks in the class’s super class” … should read “If it” | 2008-03-10 | ||
348 | ERROR | IMHO, the graphic on the page should have a link from String.super to Object and another from String.class to Class, but not from String.class to Object. | 2008-03-19 | ||
56 | OK | in the to_s method of KaraokeSong it should be: You just missed the #{} block Best Regards (Dave says: it’s actually correct as is) | 2008-03-19 | ||
57 | TYPO | Looks like we’re missing the initial definitions of accessors for Song artist, name and duration. The text goes straight from “… the first thing we may need is the ability to find out the title and …” to samples/tutclasses_11.rb which shows the accessors being used. It then moves on to describing the ‘attr_reader’ shortcut, but i don’t see the long hand definition anywhere. | 2008-03-19 | ||
356 | TYPO | I am learning about meta-programming, and you have a diagram showing anonymous proxy classes that Ruby uses when mixing in a module at the top of page 356 - Figure 23.4 I don’t know if it is a typo or not, but I don’t think both anonymous classes would be anon1, this implies they are the same object. I could see how that could be possible in _this_case, but not if the albumn class inherited from some class that is not Object. So I think the anon1 that Song now uses as a Proxy class should be called anon2. Mikel | 2008-03-19 | ||
796 | TYPO | End of the second paragraph: …(with other implementations waiting in the wings and ot yet released) | 2008-03-10 | ||
796 | TYPO | Fifth paragraph: three problems here. | 2008-03-10 | ||
7 | SUGGEST | There’s no mention of RubyGems in the Contents. It might be good to have the actual word in the Contents somewhere. | 2008-03-19 | ||
213 | TYPO | Next to last paragraph, second sentence: “It also provides integration into Ruby so that your programs can access gems are libraries. ” s/b “…as libraries.” | 2008-03-19 | ||
361 | TYPO | Other times, though, it isn’t appropriate to use Typo: “or design esthetic” should read “our design esthetic” | 2008-03-19 | ||
364 | TYPO | The return value from Struct.new(…) is a class object. By assigning it to the constant Person, Typo: “we can thereafter use Parent as if” should read “we can thereafter use Person as if” | 2008-03-19 | ||
368 | TYPO | You can also make the turtle raise an lower a pen. | 2008-03-19 | ||
218 | TYPO | Heading: | 2008-03-19 | ||
30 | TYPO | Penultimate paragraph on the page: | 2008-03-19 | ||
195 | TYPO | “As of Ruby 1.9, lock parameters are no longer in the same scope as local variables. This may cause compatibility problems with older code. Run with the -w flag to spot these issues. ” should be: “As of Ruby 1.9, block parameters are no longer in the same scope as local variables. This may cause compatibility problems with older code. Run with the -w flag to spot these issues. ” | 2008-04-11 | ||
62 | TYPO | There is an extra “the” in the sentence: “class methods are defined by placing the either the class name or the predefined name self,” | 2008-04-11 | ||
173 | TYPO | Last line before last example (tutthreads_14.rb) “[…]allowing other to US it[…]” should be | 2008-04-11 | ||
263 | ERROR | samples/web_7.rb | 2008-04-11 | ||
62 | OK |
| 2008-04-11 | ||
67 | OK | sample:tutclasses_32.rb | 2008-04-11 | ||
104 | TYPO | Misspelled word:regaulr -> regular “Once you use named matches in a particular regaulr expression” | 2008-04-11 | ||
99 | TYPO | Last line of penultimate paragraph on the page: | 2008-04-11 | ||
103 | ERROR | samples/tutstdtypes_46.rb The code need: | 2008-04-11 | ||
407 | TYPO | The penultimate sentence in the explanation of []= at the top of the page contains “(Prior to | 2008-04-11 | ||
49 | OK | Perhaps there should be mention of the Python-like syntax when introducing printf: the example given towards the bottom of the page could also be written as ‘puts “Number: %5.2f,\ (Dave says: I think that would add complexity here) | 2008-04-11 | ||
48 | SUGGEST | WHAT SECTION: def call_block SUGGESTION: | 2008-04-11 | ||
123 | TYPO | Sentence missing the word “are”. It should be “First, all the rvalues are evaluated…” Original sentence: | 2008-04-11 | ||
213 | TYPO | “RUbyGems” should be “RubyGems” in the middle of the page. | 2008-04-11 | ||
221 | TYPO | “If Ruby sees the sequence sequence \\xEF\\xBB\\xBF at the start of a source file,” | 2008-04-11 | ||
226 | OK | The code might be:
| 2008-04-11 | ||
226 | TYPO | The checking list should start with capitalized letter(list 2 and 3). | 2008-04-11 | ||
229 | TYPO | “and the second is the internal incoding.” | 2008-04-11 | ||
687 | TYPO | “transcendental functions defined my the math module” | 2008-05-23 | ||
83 | SUGGEST | On page 62 (Class Methods), using “self.method_name” is referred to as the “modern idiom” for defining class methods. Page 83 (Blocks for Transactions), however, defines a class method on “File” using the “ClassName.method_name” syntax. I think it would be better to stick with the “modern idioms”. This may be in other places also (you can use regular expressions (see chapter 6, page 104) to search and replace :). | 2008-05-23 | ||
123 | TYPO | Splats and Assignment, first paragraph, “consitutent” should be “constituent” | 2008-05-23 | ||
359 | TYPO | 2nd to last sentence on the page, missing the word “it”: By assigning it to the constant Person we can thereafter use Person as if were any other class. | 2008-05-23 | ||
173 | ERROR | DEADLOCK! There should be an “unlock” call in the main thread (using “ensure”) of examples “tutthreads_13.rb” and “tutthreads_14.rb”. | 2008-07-31 | ||
211 | TYPO | Based on the sentences on the rest of the page, I believe the directory name should be 1.9.0, not 1.9. % gem environment gemdir | 2008-05-23 | ||
214 | TYPO | “how to we tell” should be “how do we tell” Original sentence: | 2008-05-23 | ||
214 | TYPO | “it’s” should be “its” since you want the possessive version, not the contraction for “it is”. Original sentence: | 2008-05-23 | ||
216 | TYPO | Second paragraph, “executes” should be “executed” | 2008-05-23 | ||
116 | OK | Line 3 of paragraph 5: not sure if this counts as erratum or not, but it seems that a page reference is missing… :) (ps, love the book. many times over.) (Dave says: this gets fixed as I add new content) | 2008-05-23 | ||
443 | OK | It appears that Enumerable’s each_cons and each_slice are identical. If they are, could you make a note in the book that they are synonyms? (Dave says: they are different: slice never repeats elements from the original array, where cons uses a moving window) | 2008-05-23 | ||
413 | OK | I’ve been writing some recursive Ruby 1.9 code lately — I have to be careful to know which methods return new objects and which return references to existing objects. I thought it might help others to point out something interesting about Array#last. ‘last’ with no arguments returns a reference. ‘last’ with arguments returns a new object. On the surface, this seems confusing, but perhaps there is a pattern to be found? Dave, perhaps you could say a few words about this? (Dave says: these kinds of things are optimizations, rather than part of the language. I wouldn’t rely on them, particularly not if you want to run across multiple Ruby implementations.) | 2008-08-19 | ||
43 | TYPO | “the actual numeric values of these contants is irrelevant” -> constants | 2008-05-23 | ||
43 | SUGGEST | I really like your motivation and explanation for Symbols… “Symbols are simply constant names that you don’t have to predeclare.” I would tack the following on to that sentence: “…and will be guaranteed to be unique.” This way, you ‘close the loop’ and connect to your previous statement of “the actual numeric values of these constants is irrelevant (as long as they are unique)” | 2008-05-23 | ||
411 | OK | a = [ “a”, “b”, “c”, “b” ]; a.find_index(“b”) did not work for me: “ArgumentError: wrong number of arguments(1 for 0)” %w(a b c b).find_index {|i| i > “a”} does work (Dave says: are you running a recent 1.9?) | 2008-05-23 | ||
43 | OK | Table 3.1 seems to be in the wrong place. Should it not be better to display the table before the heading “Arrays and Hashes”? (Dave says: we do layout at the very end, so this will get moved at that point) | 2008-05-23 | ||
593 | TYPO | 2nd line reads “…with a roc which will take from zero to n arguements. ” Proc is missing a P | 2008-05-23 | ||
104 | TYPO | The last line of the “Extracting Matches to Local Variables” section ends with “(which macthes am) as $3.” which should be “(which matches am) as $3.” | 2008-05-23 | ||
64 | OK | In the Singleton section there is the following explanation for using an instance variable: “Well, remember we said that just about everything in Ruby is an object? Classes are objects in their own right. Here we’re using an instance variable of the MyLogger object.” I’m just learning Ruby, but to me it seems that last sentence should be: And maybe you could add an extra note about the create() method and the @logger variable not being available from the object that create() spits out? | 2008-05-23 | ||
242 | ERROR | The definition of the DEFAULT prompt mode seems incorrect: Download samples/irb_9.rb Should be: | 2008-05-23 | ||
24 | SUGGEST | In the description of Part II, it says “creating GUI applications using Tk”, however, the release notes for B 1.03 say that the tk chapter has been removed. | 2008-05-23 | ||
32 | TYPO | In the shaded box, titled “The Very Latest Ruby”, the last sentence in the second paragraph should end with “Subversion commands” instead of “CVS commands” as it does now. I’ve also noticed on the ruby-lang.org website, it mentioned that the ruby language developers are using CVS for revision control. Kind of confusing… | 2008-05-23 | ||
34 | OK | to get information for a particular method in GC class, you should include the class name as part of the parameter: suggested fix: ri GC::enable
error found: ri enable
(Dave says: probably only if you have other gems installed containing an enable method.) | 2008-05-23 | ||
78 | TYPO | In the example 2/3 of the way down the page, you write " If a variable appears both in the block and in the surrounding scope", but in the actual code in the .pdf, element and c are only defined inside the block, not outside. Michael Rogers (mprogers@mac.com) (Dave says: this section has been rewritten) | 2008-05-28 | ||
33 | TYPO | “Leopard (OS X 10.5) come with Ruby 1.8 preinstalled. Both work fine out of the box” Come or comes?, Both what? | 2008-06-16 | ||
96 | TYPO | The Complex class extends regular numbers with come convenience methods should be The Complex class extends regular numbers with _s_ome convenience methods | 2008-06-16 | ||
39 | OK | I’d strongly recommend a mention of Mauricio Fernandez’s fastri as a much improved version of the standard ri aitch tee tee pee slash slash eigenclass.org/hiki.rb?making+ruby+ri+faster (Dave says: doesn’t seem to run on 1.9: dave[RUBY3/Book 0:48:25*] fri String ’ | 2008-06-16 | ||
798 | TYPO | “authentification”? Perhaps authentication? Word also appears on page 886: “APOP authentification” | 2008-06-16 | ||
105 | TYPO | “…within and of the ranges…” Something got botched here. Maybe “…within the ranges…” ? (Dave says: if should be “any of the ranges”) | 2008-06-16 | ||
58 | TYPO | In the second paragraph, first sentence there is written “Song object”. This should read “BookInStock object” now that the tutorial has been changed. (Dave says: I’ve removed the whole section) | 2008-06-16 | ||
61 | TYPO | Under the “Writable Attributes” section, in the paragraph right beneath the Java setter/getter example, there is a mention of “song.name”. Instead, this should read “b1.isbn” or “b1.price”. | 2008-06-16 | ||
67 | TYPO | Right under the “produces” italized text the line should read: “Processing data.csv Instead of: “sh: line 0: cd: code/sales.data: No such file or directory” | 2008-06-16 | ||
30 | TYPO | “Type typing echo hello at the prompt and hitting enter (or return, depending on your keyboard.” near the bottom of the page in The Command Prompt section should be … “Type echo hello at the prompt and hitting enter (or return, depending on your keyboard.” | 2008-06-16 | ||
30 | TYPO | OX X in Directories, Folders, and Navigation section should be OS X | 2008-06-16 | ||
38 | ERROR | It shows an example of using ri to find the details of the method of GC as an example. Here “ri enable” command gives lots of alternatives and “ri GC.enable” does not work as pointed out in the book. However “ri::enable” works.. I am using ruby 1.9.0. | 2008-06-16 | ||
31 | TYPO | C: should read … C:\\projects\\time_planner\\readme.txt on Windows. | 2008-06-16 | ||
47 | OK | At the bottom of page 46 it says that keys in a hash must be unique.But in the histogram example in the middle of page 47 you give an example of counting the number of times a key occurs. By rule no key could occur more than once but your example shows the same key occuring 3 times. This is very confusing. (Dave says: the keys represent the things being counted and the value is the actual count, so each key is unique. I’ve reworded the example.) | 2008-06-16 | ||
81 | TYPO | “but, unlink a method, those parameters appear at the start of the both between vertical bars”: | 2008-06-16 | ||
805 | TYPO | “via the RSTRING macros.This is a change in Ruby 1.9—prior to this you manipulates the C structure directly.” | 2008-06-16 | ||
65 | ERROR | In the code example for class CsvReader, the body of the foreach block contains the following line of code: @books_in_stock << BookInStock.new(row[“ISBN”], row[“Amount”]) Then in the second paragraph following the class CsvReader example code, the first sentence refers to: “…the ISBN and Price columns,…”. Perhaps Price should be changed to Amount in the explanation, or “Amount” should be changed to “Price” in the code example? | 2008-06-16 | ||
57 | TYPO | Inconsistent reference to Song (from a previous version of the book, IIRC): “Our experience tells us that during development we’ll be printing out the contents of a Song object many times, and the default formatting leaves something to be desired. Fortunately, Ruby has a standard message, to_s, that it sends to any object it wants to render as a string. The text then goes on to define a to_s method on BookInStock, so I think the reference to Song just didn’t get converted over to BookInStock. | 2008-06-16 | ||
65 | TYPO | At the end of the page : “The first, book_in_stock.rb, will contain the definition of the class
Good Day | 2008-06-16 | ||
73 | SUGGEST | The opening paragraph on Containers talks about examples where containers (like arrays) would be useful. One of those given is “the people in a class”. I’m a seasoned rubyist, but I still hit a minor mental bump processing that. The previous chapter was all about Ruby Classes, and people new to the language may not immediately discern the different context of class as a group of people getting in training. It would read more clearly if that specific example was changed to “people in a room” or “people in a life raft”. | 2008-06-16 | ||
61 | TYPO | Comments in example code on this page and on p.62 says the book price will be discounted by 75% but price will in fact be 75% of the original price i.e. reduction is 25%. Some typos on p.52, last para above code: “followin” should be “following” and “it’s” should be “its”. Also last para on p.60 - “The corresponding instance variables are Enjoying Ruby and the book very much, thanks and best wishes, Michael Drysdale | 2008-06-16 | ||
347 | SUGGEST | The color schema of class illustrations (lime on yellow) correspponds very poorly with the page boundaries color (a tint of red) | 2008-06-30 | ||
52 | TYPO | At the bottom of the page: should be: “The FOLLOWING example shows a method calling it’s associated block twice” (missing a G in following) | 2008-06-30 | ||
58 | TYPO | Start of second paragraph says: should read: (should be BookInStock instead of Song) | 2008-06-30 | ||
60 | SUGGEST | When creating the instance of BookInStock: change the isbn number to an actual isbn number (perhaps the one for this book). Because when the sample output is shown later on the page: It may seem like puts “ISBN = #{book.isbn}” is just printing out the name of the instance variable, not the value of it (obviously the Price right below it shows that it is printing out the value, but for clarity I think using an actual ISBN would be helpful) | 2008-06-30 | ||
61 | TYPO | The last line of the Java code example says: It should read: (setPrice instead of setDuration, looks like a leftover from the Song example) | 2008-06-30 | ||
76 | TYPO | Towards the top of the page, it says: should read: (‘and’ should be ‘end’) | 2008-06-30 | ||
657 | ERROR | String.to_r is not available in the default ruby1.9 installation (ubuntu 7.10) or 1.8.6 (exact versions below). I have verified this with This function may just need to be tagged 1.9 since you are most likely using a later version of 1.9. | 2008-06-30 | ||
108 | OK | show_regexp(a, /[\\d\\]/) # => see [Design Patterns<<->>page 123] I think this would actually yield “No match” and not “see [Design Patterns<< (Dave says: the actual pattern is [\\d\\-]) | 2008-06-30 | ||
135 | OK | the final ‘end’ which ends the ‘else’ of the “If and unless expressions” example need to come before table 8.1 Right now Table 8.1 appears with a random ‘end’ statement immediately after it. (Dave says: we do layout when the content is complete) | 2008-06-30 | ||
52 | TYPO | At the bottom of the page: “it’s associated block twice” should be “its associated block twice” (its, not it’s) | 2008-06-30 | ||
72 | ERROR | In the text, where you have: “We’ll do that later, in 10 on page 155.” | 2008-07-07 | ||
428 | SUGGEST | In the table of contents, the “Array” and similar sections are on the same level than the “Built-in Classes and Modules” section, thus, it is impossible to fold all built-in classes to show only the standard library classes. The built-in classes should be a subsection of the “Built-in Classes and Modules” section. Also, the naming in table of contents is somewhat strange, e.g. “Array” is named in the toc “4-1Array”. In case something is unclear, you can mail me at giga@le-pec.org. Thanks for your hard work. | 2008-10-22 | ||
66 | ERROR | In the book, the output of running the program: $ ruby stock_stats.rb data.csv is an error: produces: To be clear: this error was included in the book’s text at generation time. (Dave says: d’oh—the book ran it with ruby 1.8 in error) | 2008-07-31 | ||
75 | TYPO | “Ruby comes with a library called GServer than implements basic TCP server functionality.” Should be: “Ruby comes with a library called GServer THAT…” | 2008-07-31 | ||
75 | TYPO | “Then, when a client connections,” should be: Then, when a client CONNECTS," | 2008-07-31 | ||
66 | SUGGEST | In stock_stats.rb, STDERR is used to print the file being processed (STDERR.puts “Processing #{csv_file_name}”). Isn’t it better to use STDOUT? (Dave says: I use STDERR for status messages, because STDOUT is typically used to pipe real data between programs) | 2008-07-31 | ||
626 | TYPO | ‘tp’ in the second-to-last line of the description of Process.daemon should be replaced by ‘to’. | 2008-07-31 | ||
81 | TYPO | Closing bracket is missing for : “We were | 2008-07-31 | ||
32 | TYPO | In the paragraph following the shaded box says: | 2008-07-31 | ||
72 | TYPO | Says: | 2008-07-31 | ||
72 | TYPO | The bookmark “Inheritance and Messages” does not lead to that section on page 72 but links to the box “Inheritance and Mixins” on page 78 | 2009-03-30 | ||
74 | TYPO | “We can work out why to_s is available in just about | 2008-07-31 | ||
236 | TYPO | the word “out” should be “our” in the following text block: Now let’s look at the library files. We know we’re going to be defining (at least) three | 2008-07-31 | ||
243 | TYPO | last paragraph, second to last sentance: Using Rake means that the GemSpec will be packaged with a set final “you” should be “your”. | 2008-07-31 | ||
82 | TYPO | Page 82 references “Back on page 100”, but goes to a different page which doesn’t seem to contain the referenced inject method | 2008-07-31 | ||
390 | TYPO | Inside the box at the top of the page, in the third sentence: “a class wih no name” should be “a class with no name”. | 2008-07-31 | ||
96 | TYPO | The code uses the Shape class, but the comment refers to the Square class. | 2008-07-31 | ||
580 | TYPO | Second sentence of Module#constants: Also, the parenthetical comment at the end of the sentence is missing ‘)’. | 2008-07-31 | ||
69 | SUGGEST | I’m somewhat new to ruby, but not to programming. It looks as though there’s an extra “person2” in the code listing on page 69: I think that person2 at the end should go away. | 2008-07-31 | ||
89 | ERROR | Book says: “Combine unshift and push and you have a first-in first-out (FIFO) queue.” But example below it uses shift instead of unshift (and appears to be correct.) So preceding explanation is in error. | 2008-07-31 | ||
66 | TYPO | Simple typo: | 2008-07-31 | ||
184 | SUGGEST | (actually a layout type, but that was not on the list) The footnote on page 184, concerning primitive Thread operations, is not aligned very nicely. | 2008-07-31 | ||
73 | TYPO | “The method superclass method returns the parent of a particular class.” | 2008-07-31 | ||
122 | ERROR | “If you want to include the literal characters ] and - within a character class, put the at the That sentence on the page is missing something. Put the “what” at the start, or escape with a \\. | 2008-07-31 | ||
127 | SUGGEST | The foot note on this pages suggests an exercise to the reader to extend the method to handle Double-Barreld and apostrophied names. I don’t know if it was intentional or not, but the code already handles that. So it’s not much of an exercise ;) | 2008-07-31 | ||
22 | SUGGEST | Middle of page: change | 2008-07-31 | ||
22 | SUGGEST | Below 2nd code sample, text reads: How about: | 2008-07-31 | ||
30 | TYPO | 4th paragraph: “(or return, depending on your keyboard.” open paren without matching close paren | 2008-07-31 | ||
30 | SUGGEST | Last paragraph: change “a graphic tool such as Explorer” to “a graphical tool such as Explorer” | 2008-07-31 | ||
31 | TYPO | 3rd paragraph: “we’ll just using a single dollar sign” should be “we’ll just use a single dollar sign” | 2008-07-31 | ||
32 | TYPO | In code examples on this page, the windows versions of the commands use forward slashes rather than backslashes. I just tried this on a windows xp machine to make sure, and it does not work. | 2008-07-31 | ||
33 | TYPO | 3rd paragraph: change “use apt-get system” to “use the apt-get system” | 2008-07-31 | ||
33 | OK | “MISSING:” tag says, "Currently 1.9 is not available. Autogenerated text on page 20 says this version was built with ruby version 1.9.0. 1.9 is not available as a package. I install via SVN from source | 2008-07-31 | ||
383 | TYPO | The last paragraph (a partial) begins: This example is not particular compelling… It should be: This example is not particularly compelling. | 2008-07-31 | ||
43 | SUGGEST | Last paragraph, last sentence reads: “When a string containing a newline is output, the \ For consistency, how about: | 2008-07-31 | ||
48 | TYPO | Last paragraph ends with a double period (“..”) | 2008-07-31 | ||
51 | OK | After reading the first paragraph on this page, I find myself wondering, “Can the string position be 0? If so, would that evaluate to false in a conditional, even though it matched the regular expression?” Please add a satisfying answer! Dave says: 0 is not false. We cover conditionals elsewhere | 2008-07-31 | ||
51 | OK | Last paragraph, first sentence: “Why are there two kinds of delimiter?” I’m not sure if “delimiter” should be pluralized here or not… | 2008-07-31 | ||
52 | ERROR | 3rd paragraph, last sentence reads, “You can think of yield as being something like a method call that calls out to the block associated with the method containing the yield.” I think it would be more correct if this said, “You can think of yield as being something like a method call that calls out to the block associated with the call to the method containing the yield.” (added “call to the” to emphasize that the block is associated with a method call, not with the method itself) | 2008-07-31 | ||
54 | SUGGEST | 5th paragraph: “When we run it with arguments, we can see them getting passed in” This seems to say that we are getting a behind-the-scenes look at the process of passing them in, which seems a bit confusing to me. How about something like “We can run it to see all the arguments that were passed in” instead? | 2008-07-31 | ||
55 | TYPO | 2nd-to-last paragraph: “a good first step it to” should be “a good first step is to” | 2008-07-31 | ||
56 | SUGGEST | 2nd-to-last paragraph, last line: change “by the time that initialize returns” to “by the time initialize returns” | 2008-07-31 | ||
56 | TYPO | Last paragraph, end of 2nd line: “the two variables here, | 2008-07-31 | ||
58 | TYPO | 2nd paragraph, 2nd-to-last line: “get it’s string representation” should be “get its string representation” | 2008-07-31 | ||
58 | TYPO | 3rd paragraph, end of 2nd line: “and then available” should be “are then available” | 2008-07-31 | ||
58 | OK | 3rd paragraph, last sentence: “each object” doesn’t agree with “those objects”. How about changing “those objects” to “that object”? (Dave says: correct as stands) | 2008-07-31 | ||
60 | SUGGEST | It looks like you’re trying to keep a clean set of numbered “tutclasses_##.rb” files. But it seems a little strange that we have a java class here in an .rb file. | 2008-10-22 | ||
65 | SUGGEST | It looks like you’re trying to have a cleanly numbered set of “tutclasses_##.rb” files, but in the example on this page we’re calling the files by one set of names in the text (book_in_stock.rb, csv_reader.rb, and stock_stats.rb) and another set of names in the caption starting each code sample. I’m very sorry for the inconvenience.) | 2008-10-22 | ||
65 | TYPO | In the second code example, the “def total_value_in_stock” line and the comment right above it are indented too much. | 2008-07-31 | ||
66 | TYPO | 3rd paragraph, 2nd-to-last line: “monlithic” should be “monolithic” and “won;t” should be “won’t” | 2008-07-31 | ||
66 | OK | Not sure about this one, but in last line of first paragraph under “Access Control” heading, how about changing “A good rule of thumb is never to…” to “A good rule of thumb is to never…” (Dave says: I wasn’t raised to arbitrarily split infinitives :) | 2008-07-31 | ||
68 | SUGGEST | Last paragraph, 2nd sentence: 2nd use of “may want to” sounds redundant - consider eliminating it. | 2008-07-31 | ||
69 | OK | 2nd paragraph of “Variables” section, last line: Shouldn’t “string” be capitalized to match the other uses above that are capitalized? (Dave says: if I’d said “take on the properties of String”, then I’d agree. Here I think lower case is better) | 2008-07-31 | ||
70 | SUGGEST | Last paragraph, 3rd line: change “take away that fact that” to “take away the fact that” | 2008-07-31 | ||
73 | TYPO | 2nd-to-last paragraph, 2nd line: “Now also that” should be “Note also that” | 2008-07-31 | ||
74 | OK | I’m curious why “.superclass” is used in the first three code examples on this page, but the fourth uses “.superclass.inspect” - if there’s a reason for this, could you include a short explanation? (Dave says: try it without :) | 2008-07-31 | ||
76 | TYPO | 2nd-to-last paragraph: “So, by the time our initialize method finished, our LogServer object will be…” | 2008-07-31 | ||
76 | SUGGEST | End of 2nd-to-last paragraph: “we start and join to this server.” I understand starting a server, but this has me wondering what it means to “join to” it. | 2008-07-31 | ||
76 | TYPO | Last line: “its our code” should be “it’s our code” | 2008-07-31 | ||
77 | SUGGEST | First line: change “the last few lines of log file” to something like, “the last few lines of the system log file” | 2008-07-31 | ||
77 | ERROR | Start of 2nd paragraph: “The use of the server method” should be, “The use of the serve method” (that’s the name of the method in the code example) | 2008-07-31 | ||
77 | TYPO | 2nd paragraph, 2nd line: “expects it children” should be “expects its children” | 2008-07-31 | ||
77 | OK | 2nd paragraph: might it be clearer if “expects its children to implement” was instead something like, “expects its children to override”? (Dave says: the parent doesn’t contain any implementation, so there’s no overriding) | 2008-07-31 | ||
77 | TYPO | End of 3rd paragraph: “we ll” should be “we’ll” | 2008-07-31 | ||
79 | SUGGEST | First sentence: “Module constants are named just like class constants, with an initial uppercase letter.” | 2008-07-31 | ||
79 | SUGGEST | The last paragraph on this page is somewhat confusing when it talks about modules having “instance methods”. If a module can’t have instances, can we talk about it having instance methods? Would modules with “self.” prefixes become class methods when mixed into a class? Is it legal to have “self.” methods within a module? If so, what do they mean if the module is used directly, rather than as a mixin? This paragraph seems to introduce some comfusing wording and some unanswered questions! (Dave says: they’ll be answered soon…) | 2008-07-31 | ||
81 | SUGGEST | The section “Iterators and the Enumerable Module” seems like it is in the wrong place. It starts: “You’ve probably noticed that the Ruby collection classes support a large number of operations that do various things with the collection: traverse it, sort it, and so on.” | 2008-07-31 | ||
82 | SUGGEST | Last paragraph, 2nd line: change comma after “arithmetic sum” to a semicolon. | 2008-07-31 | ||
83 | TYPO | (very minor) Spacing would look more consistent if “( ‘a’..‘m’).sum” were instead “( ‘a’..‘m’ ).sum” | 2008-07-31 | ||
83 | OK | The body of the middle method (“observers << obj”) looks wrong to me, since there isn’t a observers= setter method. Should this be “@observer_list << obj” instead? Or should there be a setter? If it’s correct as written, an explanation would help. (Dave says: it;’s a call to the observers method defined above it) | 2008-07-31 | ||
85 | TYPO | 2nd-to-last paragraph, 1st line: “In the past, we’re tended to” should be “In the past, WE’VE tended to” | 2008-07-31 | ||
85 | TYPO | 2nd-to-last line: “if code that uses objects of the child class rely on…” should be “if code that uses objects of the child class relies on…” | 2008-07-31 | ||
86 | TYPO | Near top: “Instead need to” should be “Instead WE need to” | 2008-07-31 | ||
86 | TYPO | 3rd paragraph: “And that’s where a combination of mixins and metaprogramming come to the rescue” should be “And that’s where a combination of mixins and metaprogramming COMES to the rescue” | 2008-07-31 | ||
86 | SUGGEST | End of 3rd paragraph: “They let us say” | 2008-07-31 | ||
87 | OK | 2nd paragraph: “classes that gives Ruby its power” should be “classes that GIVE Ruby its power”. (Dave says: I think the subject is singular (not classes)) | 2008-07-31 | ||
87 | OK | 2nd paragraph: change “When paired with collections, these blocks…” to “When paired with collections, blocks…” (‘these’ seems unneccessary) | 2008-07-31 | ||
89 | SUGGEST | Last paragraph: “shift and unshift add and remove elements…” | 2008-07-31 | ||
90 | OK | With this discussion of arrays vs hashes (aka associative arrays) I’m curious about the implementation of arrays vs that of hashes, and whether I should be mindful of performance implications. For example, if I do something like “a[1000000] = 5” would that create a c-style array in memory with a million and one elements, the first million of which are nil? Or should I think of it more like a hash, performance-wise? | 2008-07-31 | ||
91 | SUGGEST | In the last few code samples, the differing numbers of dots (“…..” vs “…”) looks odd to me | 2008-07-31 | ||
94 | TYPO | 2nd line: “the test unit framework” should be “the TestUnit framework” | 2008-07-31 | ||
95 | TYPO | End of 2nd paragraph: “an array or two-element subarrays” should be “an array OF two-element subarrays” | 2008-07-31 | ||
95 | OK | 2nd code example introduced with: “some Ruby programmers might write this more compactly as” (Dave says: try it…) | 2008-07-31 | ||
96 | OK | 2nd paragraph, 2nd line: I think this would be clearer if “in the same scope outside the block” were changed to “in the scope outside the block” (removing “same”) | 2008-07-31 | ||
96 | OK | 3rd paragraph, last line: I think this would make more sense if “square is not defined at that point” were changed to “square is not defined before the block”. | 2008-07-31 | ||
96 | TYPO | 4th paragraph: “unexpected programs” should be “unexpected problems” | 2008-07-31 | ||
97 | OK | Start of “Implementing Errors” section: “A Ruby iterator is simply a method that can invoke a block of code. This isn’t really true (as the ”Blocks for Transactions" section on page 102 explains). How about something a little more descriptive like, “A Ruby iterator is simply a method that invokes a block of code for each item in a set.” (Dave says: the sentence doesn’t imply that every method that invokes a block is an iterator…) | 2008-07-31 | ||
98 | OK | I’m curious about footnote 3’s mention that “the [fibonacci] series is sometimes used in sorting algorithms” - is it used in the analysis of sorting algorithms, or is it somehow used directly by a sorting algorithm? (Polyphase merges using the Fibonacci numbers to schedule the merges) | 2008-07-31 | ||
98 | SUGGEST | 2nd paragraph: change “the value passed to the yield” to “the value passed to yield” | 2008-07-31 | ||
98 | OK | 2nd paragraph describes the ‘each’ method and then an example is given. I feel like we’ve already seen this several times by now. | 2008-07-31 | ||
99 | ERROR | 3rd paragraph: “starting on page 81 we’ll see how defining an each method can…” | 2008-07-31 | ||
99 | TYPO | 4th paragraph, last line: “The following example uses the succ, which increments a string value.” What’s “the” doing here? This sentence is teh suck :) | 2008-07-31 | ||
100 | TYPO | Middle of 2nd paragraph: “There’s one final wrinkle” | 2008-07-31 | ||
99 | SUGGEST | 2nd-to-last paragraph: I think this is saying that either a string or symbol naming the method are equally acceptable when calling inject. It might help if this were made a little more explicit. | 2008-07-31 | ||
99 | ERROR | Last sentence: “The thing that uses the iterator is just a block of code associated with this method.” I think to be correct this should say something like, “The thing that uses the iterator is just a block of code associated with A CALL TO this method.” | 2008-07-31 | ||
101 | SUGGEST | 2nd sentence: change “Instead, they generate” to “Instead, they contain methods that generate” | 2008-07-31 | ||
101 | OK | 4th paragraph: I’m curious at this point how a method can determine whether or not it has been called without a block. After reading more, I saw that this is discussed and answered on page 103. But there is seems to be brought up as though it just came up there for the first time rather than here, two pages earlier. | 2008-07-31 | ||
101 | OK | Last code sample on page: I’m thinking that if I modify a with a call such as, “a[0] = 0” after creating the iterator (with “enum_a = a.each” but before using it (with “enum_a.next”), I will get a different result since I have an iterator that still references the same array a. I think this would fit the description of a closure given a little later. My suggestion is to mention at some point that an Enumerator is a closure and will give this type of behavior (or that it isn’t, if that’s the case). | 2008-07-31 | ||
101 | OK | Last paragraph: I had to read this part a couple times, because the earlier text had me expecting this paragraph to say that loop returns an Enumerator if it is called without a block. Instead, if talked about use of Enumerators within the block passed to loop, and made no mention of whether loop could be called without a block. I’m not sure how this should be modified, if at all, but I thought I’d mention it since it interrupted the flow for me somewhat. | 2008-07-31 | ||
103 | SUGGEST | End of 1st paragraph, suggested change: “whatever parameters it received” to “whatever parameters it RECEIVES” | 2008-07-31 | ||
103 | SUGGEST | 2nd paragraph, last line: “responsibility for closing an open file has been passed…” | 2008-07-31 | ||
103 | SUGGEST | 2nd paragraph, last line: change “user of file objects” to “USERS of file objects” | 2008-07-31 | ||
103 | SUGGEST | End of 2nd paragraph: Changing the end of the statement “responsibility…back to the files themselves” | 2008-07-31 | ||
103 | OK | 3rd paragraph: Twice in this paragraph, we have “file object” instead of “File object” (Dave says: I’m happy with the way it is—I’m talking generically here) | 2008-07-31 | ||
103 | OK | 3rd paragraph, 3rd-to-last line: “…if a block is associated with the current method.” | 2008-07-31 | ||
103 | OK | In code sample, File.new is called. On previous page, File.open was called in the same situation. Wondering if there is a difference between File.new and File.open, and why two different calls are used, or if the two are interchangeable. (Dave says: we’ve already seen both) | 2008-07-31 | ||
103 | SUGGEST | In the code example, a call is made to “block_given?” after the method was just introduced as “Kernel.block_given?”. | 2008-07-31 | ||
103 | OK | In the code sample, we define a class method “my_open” for the File class. I’m wondering at this point if running this code sample will have the effect of adding a new method to the existing File class supplied with Ruby, leaving the rest of the class working as before. (Dave says: try it…) | 2008-07-31 | ||
104 | TYPO | 4th paragraph: “ensure that we closed files even if the code processing that file somehow aborted.” | 2008-07-31 | ||
104 | OK | “proc object” is used instead of the capitalized form “Proc object” twice on page 104 and once each on pages 105, 106 and 107. Wondering if this in intentional since we seem to be referring to the Proc class in all these cases… | 2008-07-31 | ||
104 | TYPO | End of 4th paragraph: “to the called.” should be “to the caller.” | 2008-07-31 | ||
104 | OK | Last paragraph: “Ruby provides not one, but two built-in methods that convert a block to an object. Both lambda and Proc.new…” (Footnote 6 adds that there’s a third, proc, but it is ‘effectively’ deprecated.) …but, there appears to be another one introduced on page 106: -> So, that would make three built-in methods, not two (and not counting the deprecated proc method) right? (Dave says: -> is not a method. Its syntax. Method here means code callable by name, and not technique) | 2008-07-31 | ||
106 | TYPO | Middle of page: “It [the parameter list for ->] can take default values, splat args (described on page 137), and block parameters (arguments starting with an ampersand).” It seems like this should be reworded as, “It can take default values, a splat arg (described on page 137), and a block parameter (argument starting with an ampersand).” unless more than one spat arg is allowed and more than one block parameter is allowed. | 2008-07-31 | ||
107 | OK | 2nd paragraph, last line: “Because the condition is passed as a block,” It looks like the condition in the example is passed as a proc, not a block. | 2008-07-31 | ||
77 | TYPO | 13th paragraph, first line, second phrase: “Do do this, we’ll create a hash object indexed” should be “To do this, we’ll create a hash object indexed” | 2008-07-31 | ||
111 | SUGGEST | 3rd line: change “convert the string” to “convert EACH string” | 2008-07-31 | ||
111 | TYPO | 2nd paragraph, line 4: more“complex” (no space between ‘more’ and the double-quote) | 2008-07-31 | ||
111 | SUGGEST | End of 2nd paragraph: change comma in “the result will be a float, if you mix floats and complex numbers” to a semicolon. | 2008-07-31 | ||
113 | SUGGEST | The sample text in the first heredoc sample would be more correct if “ending” were changed to something like “starting” | 2008-07-31 | ||
114 | SUGGEST | 2nd paragraph: “We’ll have a lot more to say about encoding in 17 on page 247” How about adding the word “Chapter” before the “17” | 2008-07-31 | ||
114 | TYPO | 4th paragraph: “than try to remember these ones.” | 2008-07-31 | ||
115 | SUGGEST | Looks like “Struct” makes an appearance for the first time in this code sample, with no discussion of what it does. I think it’s fairly obvious from context, partly because I remember struct from C and mostly from the output shown. It does make me wonder about the details behind Struct, though. | 2008-07-31 | ||
116 | TYPO | Last line of 2nd paragraph: change “component” to “components” | 2008-07-31 | ||
116 | SUGGEST | In code sample, I notice we’re calling mins.to_i and secs.to_i | 2008-07-31 | ||
120 | SUGGEST | 2nd paragraph: “At least one operand of the match operator must be a regular expression.” | 2008-07-31 | ||
120 | TYPO | 3rd paragraph: “We can use this to write a method…” | 2008-07-31 | ||
120 | OK | 4th paragraph says, “The match also sets the thread-local variables $~ and $1 through $9.” | 2008-07-31 | ||
121 | SUGGEST | Last line: “They can also be negated by putting an up arrow after the first colon.” | 2008-07-31 | ||
123 | OK | Wondering if the “Posix Character Classes” work only for US encodings, and the “Character Properties” do the equivalent thing for all the supported encodings listed? There is very little description on pg 122 explaining this (two short sentences). | 2008-07-31 | ||
123 | OK | In description for [:blank:], does “Blank” mean a single space? And for the descriptions for [:graph:], [:print:], and [:punct:], does “space” mean all whitespace characters? Dave says: Each matches one character position) | 2008-07-31 | ||
124 | SUGGEST | In third, fourth, and last paragraphs, “regular expression” is used as if it means something like, “expression within a regular expression”. Regular expressions were introduced on page 120 as “objects of type Regexp”. This usage sounds a little confusing. | 2008-07-31 | ||
125 | SUGGEST | In code sample, the line: | 2008-07-31 | ||
125 | SUGGEST | End of page: for the \\k’name’ notation, there’s no example given. How about changing the ‘mississippi’ example at the top of the next page to use the single quote form? | 2008-07-31 | ||
126 | OK | In the discussion toward the bottom of this page, I am wondering, what happens if there is a name collision with pre-existing local variables? Would those local variables simply be overwritten by the ones set by the regular expression? | 2008-07-31 | ||
127 | TYPO | 5th paragraph: “They may enter DAVE THOMAS, dave thomas, dAvE tHoMas, and we’d like to store is as Dave Thomas.” Two corrections: add an “or” before “dAvE tHomAs” and change “is” to “it”. | 2008-07-31 | ||
127 | SUGGEST | Last sentence: “we’ll have to wait until 23 on page 366 to see why it works.” | 2008-07-31 | ||
127 | SUGGEST | David Kowis’ comment on the code already handling Double-Barreled names and apostrophes looks to be correct if you’re using dashes separating names and names that have apostrophes in them. If you use underscores and apostrophes that indicate possession, then it doesn’t. mixed_case(“dave_thomas”) # => “Dave_thomas” | 2008-07-31 | ||
128 | TYPO | First sentence: “You can also give sub and gsub a hash as the replacement parameter, in which case it will look up matched groups…” ( sub(/it/, “they”) ) | 2008-07-31 | ||
128 | OK | Page 126 talking about numbered variables such as $3, noted that “Once you use named matches in a particular regular expression, Ruby no longer bothers to capture unnamed groups.” On this page, talking about backslash sequences such as \\3 used within an expression, I assume that same rule holds true? | 2008-07-31 | ||
130 | OK | In the code sample we have: md1[1, 2] # => [“12”, “34”] | 2008-07-31 | ||
233 | TYPO | The third sentence in the paragraph beginning “Ruby has an interesting secret”, change “And than means” to “And that means”. | 2008-07-31 | ||
152 | TYPO | As of Ruby 1.9, his is no longer supported. => “his is” ??? | 2008-07-31 | ||
32 | OK | Under “Variable-Length Argument Lists” heading: (Dave says: I believe ‘the’ is correct) | 2008-07-31 | ||
132 | TYPO | Last paragraph ends with a double period.. | 2008-07-31 | ||
133 | SUGGEST | In the first code example on this page, I am wondering: Is the splat argument being passed automatically in the call to ‘super’ without having to write the argument? This seems to be implied by the text right before the example. Or is it really not being used at all, as its name implies? | 2008-07-31 | ||
137 | SUGGEST | First sentence: “Earlier, we saw that if you put an asterisk in front of a formal parameter…” | 2008-07-31 | ||
138 | TYPO | Last paragraph: “Some languages feature keyword arguments — that is, instead of passing arguments in a given order and quantity, you pass the name of the argument with its value, in any order.” | 2008-07-31 | ||
139 | ERROR | 2nd paragraph: “…as long as they follow any normal argument and precede any array and block arguments.” | 2008-07-31 | ||
142 | TYPO | Last sentence: “…and teh value of the assignment as it’s last parameter.” | 2008-07-31 | ||
144 | SUGGEST | 2nd paragraph: “It then returns that value as the result of the assignment expression.” | 2008-07-31 | ||
145 | OK | “Users of older versions of Ruby should note that these rules have changed in Ruby 1.9.” | 2008-07-31 | ||
146 | OK | Under “Nested Assignments” header: “Ruby treats these terms as if they were a nested assignment statement.” | 2008-07-31 | ||
148 | OK | Middle of page: ‘This is almost, but not quite, the same as var = var || “default value”. It differs in that no assignment is made at all if the variable is already set. In pseudo code, this might be written as var = “default value” unless var or as var || var = “default value”.’ I am left wondering: Is there any situation where this would have an effect. I’m having trouble thinking of one. And, this seems like the kind of thing that might end up compiling down to exactly the same machine instructions. Could this be clarified? (Dave says: it’s subtle and we haven’t covered the ground we need to by this point.) | 2008-07-31 | ||
148 | TYPO | Last line: “descendents” should be “descendants”. | 2008-07-31 | ||
150 | OK | The definition in table 9.1 for === seems a little lacking, like it describes a common use for the operator, but not what it actually does. (Dave says: seems the same as for the other operators—if anything it has more information :) | 2008-07-31 | ||
150 | SUGGEST | On this page: “if is an expression, not a statement—it returns a value.” I’m left a little confused about statements vs expressions. I would think that if is both a statement and an expression, contrary to what it says on this page (150). Could this language be clarified? | 2008-07-31 | ||
152 | SUGGEST | In example at top, change “#{input_line}” to “#{command}” to match the “case command” at the beginning of the example. | 2008-07-31 | ||
76 | TYPO | typo - should be your instead of you in 3rd paragraph from bottom (If you subclass doesn’t need an initialize | 2008-07-31 | ||
152 | SUGGEST | Last paragraph: “Ruby classes are instances of class Class, which defines === to test if the argument is an instance of the class or one of its superclasses.” This sentence is confusing for a few reasons. Instead of “instance of the class”, how about “instance of the receiver”? | 2008-07-31 | ||
154 | SUGGEST | 2nd paragraph, last line: change “one through three and those between…” to “one through three as well as those between…” | 2008-07-31 | ||
155 | TYPO | Before last example: “only those lines that contain a d.” would be more correct if changed to “only those lines that end with a d.” | 2008-07-31 | ||
157 | SUGGEST | 2nd paragraph: “redo repeats the loop from the start” would be a lot clearer if changed to “redo repeats the current iteration of the loop from the start” | 2008-07-31 | ||
157 | SUGGEST | Middle of page: “These keywords can also be used with any of the iterator-based looping mechanisms.” Or are we really just talking about “iterator-based looping mechanisms”? I can’t think of a way to distinguish in code between an “iterator-based looping mechanism” and some other use of a block. | 2008-07-31 | ||
157 | SUGGEST | Last paragraph: “A value may be passed to break and next. When used in conventional loops, it probably makes sense only to do this with break, where it sets the value returned by the loop. (Any value given to next is effectively lost.)” I’m confused by this. Why is any value passed to next lost? If this is true, why is it possible to pass it a value at all? What if we’re in the last iteration through the loop? Couldn’t next finish things off, and potentially return its argument as the return value of the loop? | 2008-07-31 | ||
158 | TYPO | 2nd-to-last paragraph: “that is exists” should be “that it exists” | 2008-07-31 | ||
159 | OK | Last sentence: should “the scoping of variables with blocks” be “the scoping of variables within blocks”? | 2008-07-31 | ||
91 | TYPO | “Do do this” should be “To do this” | 2008-07-31 | ||
159 | OK | The semicolon in “do |val; square|” should be a comma. (Dave says: nope—see the end of the previous page…) | 2008-07-31 | ||
163 | TYPO | Footnote 1: “a descendent” should be “a descendant”. Also, this explanation seems to support my comment on page 152 about = and changing "superclasses" there to "subclasses". It's a clearer explanation of = than those on pages 152 and 150. | 2008-08-19 | ||
168 | SUGGEST | Top paragraph. This made me wonder, “if the second parameter is not supplied, does catch return nil?” After trying it, it looks like this is exactly what happens. | 2008-08-19 | ||
168 | OK | Wondering if an uncaught “throw” is basically equivalent to an unhandled exception? Are they treated the same way by Ruby, with different names to suggest different uses? (errors vs normal control flow) (Dave says: an uncaught throw raises an exception. They aren’t the same) | 2008-08-19 | ||
172 | OK | After testing both examples that use file.each_line and substituting file.each, it looks like they do exactly the same thing. Wondering if there is a difference? (Dave says: they’re the same method) | 2008-08-19 | ||
174 | SUGGEST | Curious about the differing behavior of << shown by the examples on this page, and by the following code:
| 2008-08-19 | ||
176 | SUGGEST | /m at the end of a regular expression makes an appearance here. Looking it up, I see that it makes the dot match newlines. Might be worth a mention, though of course this section is not about regular expressions. | 2008-08-19 | ||
177 | OK | 2nd paragraph: “…in reality Ruby’s fibers are really just…” (Dave basks in redundancy. Sometimes…) | 2008-08-19 | ||
180 | SUGGEST | Code sample: "resp = h.get(‘/’, nil ) | 2008-08-19 | ||
181 | SUGGEST | “Thread Variables” section, talking about “thread-local variables” sounded very similar to “local variables in the scope of the code running in a thread”. I was unsure if this was an entirely new namespace (eg, if in the example there would be a local variable to the thread named mycount). | 2008-08-19 | ||
181 | SUGGEST | Suggested change in footnote: for consistency, change “where the outcome changes” to “when the outcome changes” | 2008-08-19 | ||
182 | SUGGEST | 3rd paragraph: “…an unhandled exception exception simply kills the current thread—all the rest continue to run.” | 2008-08-19 | ||
185 | OK | Attempts to run these examples on my mac causes the following: Looks like adding “require ‘thread’” fixes it. (Dave says: works on my Mac) | 2008-08-19 | ||
186 | ERROR | Looks like Will Bennett’s note about deadlock for page 173, examples 13 and 14, is talking about page 186 in this version. | 2008-08-19 | ||
186 | SUGGEST | Bottom example (Wondering if mutex.sleep 3600 is the same as: …or is it a little more than that?) | 2008-08-19 | ||
187 | SUGGEST | Start of “Running Multiple Processes” section | 2008-08-19 | ||
187 | SUGGEST | Last paragraph: “It returns false if the command was found, but returns an error when it runs. It raises an exception if the command cannot be found.” How about: “It returns false if the command was found, but returned an error when it ran. It raises an exception if the command could not be found.” | 2008-08-19 | ||
187 | SUGGEST | I’m not sure what the “1.9” label next to the last paragraph on this page is referring to. | 2008-08-19 | ||
189 | SUGGEST | Wondering: in the examples on this page, how does Process.wait know which process to wait for? I assume it is waiting specificially for a child process of the current process to terminate? And if there are multiple child processes, will it be triggered by the first one to exit, whichever that may be? | 2008-08-19 | ||
189 | ERROR | output from puts “child” doesn’t show up for the bottom example | 2008-08-19 | ||
191 | TYPO | 3rd paragraph: “check the results are what you expected.” | 2008-08-19 | ||
192 | SUGGEST | 2nd paragraph of “What is unit testing?” section: | 2008-08-19 | ||
192 | SUGGEST | Start of “Assertions == Expected Results” section: | 2008-08-19 | ||
196 | SUGGEST | In the example, I’m puzzled why ARGF.read is used as a sample of a method that returns nil( it didn’t when I tried it). Also, the message in the assertion, “Read next line of input”, would seem to make more sense if it described an error - something like, “read call shouldn’t return nil”. | 2008-08-19 | ||
199 | SUGGEST | 2nd paragraph: “Test::Unit is clever enough to notice that there’s no main program, so it collects up all the test case classes and runs each in turn. | 2008-08-19 | ||
200 | ERROR | 5th paragraph: “It starts by working out the name of the directory from which the test file is run…” | 2008-08-19 | ||
200 | SUGGEST | Bottom paragraph (as well as the example on the next page) suggests requiring test/unit in a test suite file. However, the next page goes on to say that there’s not much point in creating TestSuite objects. So the test suite file is just a list of statements requiring test cases. | 2008-08-19 | ||
201 | SUGGEST | It seems like some other testing libraries, such as RSpec and Shoulda, are gaining significant popularity in the Ruby world. Maybe they’re worth a mention in this chapter? | 2008-08-19 | ||
202 | SUGGEST | in the list next to assert_instance_of and assert_kind_of, the first parameter is called ‘klass’. Wondering what this is? | 2008-08-19 | ||
203 | ERROR | In the sample debug session, the command is “l 1-9” but the output starts with “[1, 10]” (but still prints lines 1 through 9). When I tried it, I got an output of [1, 9]. | 2008-08-19 | ||
205 | SUGGEST | 3rd paragraph: “…you can use arrow keys (as with Emacs) or vi-style key bindings…” | 2008-08-19 | ||
206 | SUGGEST | From the irb example, it looks like running a ruby program in irb starts a new thread, and not a new process. Wondering if this is the case? | 2008-08-19 | ||
206 | TYPO | 2nd caption box: “take at look at all current jobs” should be “take a look at all current jobs” | 2008-08-19 | ||
208 | TYPO | Top example: comment has a funny ‘<<’ character rather than ordinary less-than signs. | 2008-08-19 | ||
210 | SUGGEST | In the benchmarking example, I’m wondering why the first run is a ‘rehersal’. Should it be considered less reliable than the second run, for some reason? | 2008-08-19 | ||
73 | ERROR | My problem may well be that I am still running 1.8.6, but I can’t see why c.say_hello would return two responses. In 1.8.6 at least, it only returns “Hello from #<Child:…>” as seems to be indicated in the text below. | 2008-08-19 | ||
219 | SUGGEST | Toward the end of the ARGV section: “make sure you empty the nonfilename arguments from the ARGV array before reading from the files.” I’m curious if arguments that start with a dash are exempt from this. | 2008-08-19 | ||
221 | OK | Last paragraph: “I have my Ruby installed…”) | 2008-08-19 | ||
222 | TYPO | Start of “RubyGems Integration”: “RubyGems system makes it easy…” | 2008-08-19 | ||
223 | TYPO | 2nd paragraph: “You latest project…” | 2008-08-19 | ||
223 | TYPO | 2nd paragraph: “let’s you construct” should be “lets you construct” | 2008-08-19 | ||
223 | SUGGEST | 4th paragraph: “The -r option tells it to search the remote repository.” | 2008-08-19 | ||
223 | TYPO | 4th paragraph: “And -n option says…” | 2008-08-19 | ||
223 | TYPO | 4th paragraph: “The result show…” | 2008-08-19 | ||
223 | TYPO | Last paragraph: “First, we see that latest version…” | 2008-08-19 | ||
224 | SUGGEST | Middle of page: “The most reliable way to find the documents is…” | 2008-08-19 | ||
225 | TYPO | End of page: ‘xml.preference( “ruby”)’ | 2008-08-19 | ||
226 | TYPO | 2nd paragraph: “the currently Builder” should be “the current Builder” | 2008-08-19 | ||
227 | TYPO | 2nd paragraph: “15.2” should be “Table 15.2” | 2008-08-19 | ||
228 | OK | Wondering why “FileUtils::” prefix shows up in first code sample, but not in the second (for rm command) (Dave says: because Rake provides rm) | 2008-08-19 | ||
228 | TYPO | 3rd-to-last paragraph: “Our code uses it’s rm method. We use the Dir class…” | 2008-08-19 | ||
228 | TYPO | “Let’s package this is code as a task” | 2008-08-19 | ||
229 | TYPO | 4th paragraph ends with “\\sd.” | 2008-08-19 | ||
229 | TYPO | End of 2nd-to-last paragraph: “Here’s for example, is a new task” | 2008-08-19 | ||
230 | TYPO | 2nd-to-last paragraph: “if your interested” should be “if you’re interested” | 2008-08-19 | ||
239 | TYPO | Sidebar is headed ‘require_relative and Ruby 1.8’, but the first sentence refers to Ruby 1.9 (‘In case you’re still running Ruby 1.9,’). | 2008-08-19 | ||
233 | TYPO | 2nd paragraph: “The double colon (:: is…” | 2008-08-19 | ||
233 | TYPO | Footnote 2: “a class, such as String is really just…” | 2008-08-19 | ||
234 | TYPO | Right under “Small Programs” header: “However, it you do this…” | 2008-08-19 | ||
234 | TYPO | 2nd-to-last paragraph: “Here’s a single program…” | 2008-08-19 | ||
235 | TYPO | Near end: “…and the last few lines look up each command line argument…” | 2008-08-19 | ||
236 | TYPO | Near top: “effectivey” should be “effectively” | 2008-08-19 | ||
236 | TYPO | Near middle: “insode” should be “inside” | 2008-08-19 | ||
236 | TYPO | Near middle: “read you code” should be “read YOUR code” | 2008-08-19 | ||
236 | TYPO | Last paragraph: “It’s job” should be “Its job” | 2008-08-19 | ||
200 | OK | The new 1.9 require_relative feature discussed on page 238 should be mentioned here in the discussion about adding paths in tests to the files being tested! (Dave says: I’ve rewritten that section) | 2008-08-19 | ||
238 | TYPO | Output on this page shows an error. | 2008-08-19 | ||
238 | ERROR | For sample file 10, it looks like we’ve skipped 7, 8 and 9 in the numbering | 2008-08-19 | ||
239 | ERROR | The example starting on the bottom of this page should be for the TestFinder class. Instead, it shows the TestOptions class, which we already saw on pages 237-238. | 2008-08-19 | ||
240 | ERROR | Error loading shoulda (also on page 238) | 2008-08-19 | ||
240 | TYPO | Sample files 13 and 14 - did we skip 12? | 2008-08-19 | ||
240 | ERROR | Sample file 13: How about: | 2008-08-19 | ||
241 | SUGGEST | 2nd paragraph: “Now all our files are in place.” | 2008-08-19 | ||
241 | ERROR | Running sample project shows error (undefined method `require_relative’) | 2008-08-19 | ||
241 | SUGGEST | 2nd-to-last paragraph: How about: | 2008-08-19 | ||
241 | TYPO | Last paragraph: “If puts its libraries” should be “It puts its libraries” | 2008-08-19 | ||
243 | SUGGEST | Near top: “…downloaded archive on [url]…” | 2008-08-19 | ||
243 | TYPO | 2nd-to-last paragraph, we see both “Gems are also a great way…” and “Gems is the way to go.” | 2008-08-19 | ||
243 | OK | Last paragraph, we see both “…is to use rake” and “Using Rake…” (Dave says: the first use is the command) | 2008-08-19 | ||
244 | TYPO | A little below middle of page: How about: “The s.executables line tells Gems to install THE anagram command-line script WHEN the Gem gets installed on a user’s machine.” | 2008-08-19 | ||
243 | TYPO | Bottom: “/Users/dave//code/anagram” has a double slash | 2008-08-19 | ||
245 | SUGGEST | Looks like the gem server being discussed is an http server. I’m curious what this does that an ordinary http server doesn’t do (probably something to do with the info you get when listing directories?) | 2008-08-19 | ||
245 | TYPO | Near bottom: “This is particular useful” | 2008-08-19 | ||
246 | SUGGEST | GitHub is very popular now too, and offers gem hosting. Worth a mention here next to RubyForge? | 2008-08-19 | ||
246 | TYPO | In 2nd paragraph we see both, “a rich set of Rake tasks” and “a number of rake tasks” | 2008-08-19 | ||
246 | TYPO | 2nd paragraph: “RUbyForge” should be “RubyForge” | 2008-08-19 | ||
246 | TYPO | Last paragraph: “…while other prefer…” should be “…while others prefer…” | 2008-08-19 | ||
248 | SUGGEST | 3rd paragraph: “In addition, many encodings have aliases…” I’m wondering if you can ask an Encoding object to list its aliases. (There’s a “MISSING: Aliases” tag - not sure if it’s related to that) | 2008-08-19 | ||
249 | TYPO | Right before “What Has Encodings” section: “For UTF-8.” is a sentence by itself that looks like a mistake. | 2008-08-19 | ||
249 | TYPO | Last paragraph: “However, unlike Ruby 1.8, If any…” | 2008-08-19 | ||
250 | TYPO | Bottom paragraph: “These examples illustrates…” | 2008-08-19 | ||
251 | OK | 2nd paragraph: “If you do, Ruby interprets all characters with codes below 128 as regular ASCII, and all other characters as valid constituents of variable names. This is basically a neat hack, as it allows you to compile a file written in an encoding you don’t know—the characters with the high-order bit set will be assumed to be printable.” Since this paragraph is talking about binary data, it would make more sense to me if “characters” was replaced with “bytes” throughout. | 2008-08-19 | ||
251 | TYPO | Bottom: ‘…either an “coding:” comment…’ | 2008-08-19 | ||
251 | SUGGEST | Paragraph near bottom: I’m curious - if a file has both a UTF-8 BOM and a “coding:” comment (that says something other than utf-8) will this cause an error? Or will one take precedence over the other? | 2008-08-19 | ||
252 | SUGGEST | Middle paragraph: “…what encoding to use on literal strings and regular expressions” | 2008-08-19 | ||
252 | SUGGEST | Middle paragraph: “…literal strings and regular expressions.” | 2008-08-19 | ||
253 | SUGGEST | Bottom: “Here we fake that out by creating a ASCII-8BIT string that contains a ISO-8859-1 sequence” | 2008-08-19 | ||
253 | SUGGEST | Last two paragraphs First begins: “Because of this, you cannot use encode to convert a sequence of bytes held in an ASCII-8BIT tagged string to some other encoding.” Second begins: “Finally, you can use encode to convert between two encodings if your source string is ASCII-8BIT.” It goes on to say we do this by passing a second parameter, but the two sentences above directly contradict one another. This could probably be worded more clearly. | 2008-08-19 | ||
261 | SUGGEST | In table 18.1 for “—inspect, —noinspect”: It is not clear here which of these is the default. | 2008-08-19 | ||
261 | SUGGEST | In table 18.1 for “-r load-module”: It would be more helpful to say something like: (Or is it more like running “load ‘load-module’”? Or is there even a difference in this case?) | 2008-08-19 | ||
261 | SUGGEST | Last sentence: “Variables you set, methods you define, and classes you create are all remembered and may be used subsequently.” How about adding a parenthetical “(while in the same session)” to the end | 2008-08-19 | ||
263 | SUGGEST | End of “Tab Completion” section talks about needing to load irb/completion library to enable tab completion. On my machine (a mac) this appears to be enabled by default. Maybe it’s different for the standard ruby distribution, but in case it isn’t, I’m noting that I didn’t have to do anything to use tab completion. | 2008-08-19 | ||
265 | SUGGEST | 3rd paragraph: “For example, to make SIMPLE the default prompt for all your irb sessions…” | 2008-08-19 | ||
266 | TYPO | Top: “Because the things you type to irb…” | 2008-08-19 | ||
266 | TYPO | First example: …and the line “time 1000000.times ”cat“.upcase” | 2008-08-19 | ||
266 | SUGGEST | (referring to the timing example) How about something like “…to get benchmarks.” instead | 2008-08-19 | ||
266 | SUGGEST | Bottom: “Displays lines n initial and n final lines of backtrace.” | 2008-08-19 | ||
267 | SUGGEST | :MATH_MODE description …but loading the mathn library isn’t the same as turning on math mode, is it? There seem to be other things that are different when in math mode. | 2008-08-19 | ||
269 | OK | irb_change_binding description: I’m confused about the case of not passing in a value for obj. When I try this, it doesn’t seem to do anything at all (the same variables that were in scope before are still in scope). Also wondering if self would be nil in this scenario. (Dave says: if you don;t pass a value, self is unchanged) | 2008-08-19 | ||
270 | TYPO | In the definition for the default prompt mode, should the return line (:RETURN => “%s\ | 2008-08-19 | ||
272 | SUGGEST | Why isn’t :SAVE_HISTORY in th list on page 267? | 2008-08-19 | ||
273 | TYPO | 2nd paragraph: “…some HTML format RDoc output…” | 2008-08-19 | ||
275 | TYPO | Caption for Figure 19.2, 4th line: “…and in the command for the new method…” | 2008-08-19 | ||
276 | SUGGEST | Wondering why tags rather than | 2008-08-19 | ||
276 | TYPO | End of 2nd paragraph: “stops it being interpreted.” | 2008-08-19 | ||
276 | TYPO | Last paragraph: “to stop a comment being associated” | 2008-08-19 | ||
276 | SUGGEST | Last paragraph: “method, class, or module.” | 2008-08-19 | ||
277 | TYPO | In Figure 19.4, the line “return Proc.new |n| n*factor” fails on my setup unless I add braces (“return Proc.new {|n| n*factor}” | 2008-08-19 | ||
278 | SUGGEST | Bottom: “Both the following are…” | 2008-08-19 | ||
280 | OK | Description of :nodoc: (Dave says: It says that modules and classes won’t be omitted, not methods.) | 2008-08-19 | ||
280 | SUGGEST | Description of :doc: | 2008-08-19 | ||
281 | SUGGEST | Description of :title: | 2008-08-19 | ||
281 | SUGGEST | Description for :stopdoc: / :startdoc: Should this be, “…for the REST OF THE class or module.”? | 2008-08-19 | ||
281 | SUGGEST | Near start of “Adding RDoc to C Extensions”: How about changing “Init_ method” to “Init_ function” to match the earlier usage. | 2008-08-19 | ||
281 | SUGGEST | call-seq used twice in the last paragraph on pg 281 and once on page 283 without colons. Other directives have colons by their names. | 2008-08-19 | ||
282 | TYPO | Halfway down source in Figure 19.5: | 2008-08-19 | ||
282 | TYPO | Halfway down source listing in Figure 19.5: | 2008-08-19 | ||
283 | TYPO | 2nd paragraph: “Although RDoc heuristics work well for finding the class and method comments for simple extensions, it doesn’t…” “it doesn’t” should be “they don’t” | 2008-08-19 | ||
283 | TYPO | 3rd paragraph: “Finally, it is possible in the Init_ method…” | 2008-08-19 | ||
284 | OK | At end of Figure 19.6, there is a blank line between the last method and its comment. Wondering if this matters to RDoc? | 2008-08-19 | ||
285 | TYPO | 4th paragraph: “Files ending .c are…” | 2008-08-19 | ||
285 | TYPO | 4th paragraph: “If directory names are passed to RDoc, they are scanned recursively for C and Ruby source files only.” The footnote on page 273 mentions Fortran 77 programs, but Fortran isn’t mentioned here at all… | 2008-08-19 | ||
285 | SUGGEST | 5th paragraph: | 2008-08-19 | ||
285 | SUGGEST | Near bottom: “You may find it convenient to write this file in Rdoc format, and then use the :include: directive to incorporate this document into that for the main class.” How about: “…into the documentation for the main class.” | 2008-08-19 | ||
286 | SUGGEST | Near middle: “To add documentation to ri, you need to tell RDoc which output directory to use. For your own use, it’s easiest to use the —ri option.” How about something like, "…For your own use, it’s easiest to use the —ri option, which installs the documentation into ~/.rdoc/. | 2008-08-19 | ||
287 | TYPO | First paragraph below sidebar: “…extract it straight from the command and write it to the user.” | 2008-08-19 | ||
288 | TYPO | “…with the RI option set to…” | 2008-08-19 | ||
289 | SUGGEST | 2nd-to-last paragraph: | 2008-08-19 | ||
290 | SUGGEST | “To get really fancy, you can decide to escape only certain HTML elements within a string.” (followed by example) I wondered, “How do you add more elements to the list to escape?” By trial and error, it looks like additional parameters, each with a string containig a tag name, does the trick. Noting it here in case it’s deemed worth mentioning. | 2008-08-19 | ||
293 | TYPO | Top: “…the required level of HTML…” How about: “…the required version of HTML…” | 2008-08-19 | ||
293 | SUGGEST | cgi example: | 2008-08-19 | ||
294 | OK | Amrita example: rather than (Dave says: ’cos that’s all I’m demoing… :) | 2008-08-19 | ||
295 | TYPO | Middle of page, describing erb command: | 2008-08-19 | ||
295 | TYPO | 2nd-to-last paragraph has several mistakes: How about something like: “The lines starting with the percent sign simply execute the given Ruby statements. In this case, it’s a loop that iterates over the line between them, setting the number parameter each time. The middle line contains the sequence <%= number %>, which substitutes the value of number into the output.” | 2008-08-19 | ||
297 | SUGGEST | 2nd paragraph: “you can’t use the -%> trick to suppress blank lines.” | 2008-08-19 | ||
297 | OK | Top paragraph briefly discusses bindings. I’m wondering what is in a Binding object. A hash of the variables? If this isn’t the place to go into that, maybe add a link to the place that is? | 2008-08-19 | ||
297 | TYPO | “Cookies” section: ‘cookies’ or ‘cookie’? | 2008-08-19 | ||
297 | TYPO | Start of “Sessions” section: | 2008-08-19 | ||
298 | TYPO | 2nd-to-last paragraph: “The filenames will all start web-session. and will end with a hashed version of the session number.” | 2008-08-19 | ||
298 | TYPO | Last paragraph: “plug in-based” | 2008-08-19 | ||
300 | TYPO | 2nd paragraph: “Web” is capitalized (but in the first paragraph, it isn’t) | 2008-08-19 | ||
300 | TYPO | 2nd paragraph: “run your applicate” | 2008-08-19 | ||
300 | TYPO | 2nd-to-last paragraph: “Merb as a lighter-weight alternative to Rails.” | 2008-08-19 | ||
300 | TYPO | Last paragraph: “Alternative frameworks include…” | 2008-08-19 | ||
300 | TYPO | Last paragraph: “By the time your read this…” | 2008-08-19 | ||
301 | TYPO | 2nd paragraph: “For example, I download the .zip file” | 2008-08-19 | ||
301 | TYPO | In the sample shell commands, the command setting the PATH appears twice for some reason, and we cd to \\ruby19, which we’re already in | 2008-08-19 | ||
302 | OK | 4th paragraph: “..generates a PDF file, which the Ruby script downloads into a local file.” | 2008-08-19 | ||
303 | TYPO | 2nd-to-last paragraph: “An OLE object’s parameters are automatically set up as attributes of the WIN32OLE object. This means you can set a parameter by assigning to an object attribute.” I think the two occurrences of “parameter(s)” here should say “propert(y/ies)”. | 2008-08-19 | ||
303 | OK | Last paragraph: “…the sample file excel2.rb” (Dave says: it refers to the file in the code download) | 2008-08-19 | ||
307 | TYPO | 2nd paragraph under “More Help” heading: Consider elimating the last comma (after “Windows machine”) | 2008-08-19 | ||
296 | TYPO | Last paragraph: “THis” should be “This” | 2008-08-19 | ||
296 | TYPO | Last paragraph: “…what Rails does with its .erb/html templates.” I think “.erb/html” should be “.erb.html” | 2008-08-19 | ||
82 | OK | The examples of inject at the top of the page do not work. (Dave says: The example output is generated by executing code every time the book is formatted… Maybe you’re using Ruby 1.8?) | 2008-08-19 | ||
123 | SUGGEST | You might want to mention somewhere that the posix character classes require double brackets to work: [[:print:]] or at least I think they do. Some examples of using these would be nice. Also, a more clear definition of “graph”, “printable”, etc as they apply to Ruby strings. | 2008-08-19 | ||
123 | OK | Sorry, I see the examples on page 122 of posix, but still having trouble with it. I think maybe [:ascii:] and [:word:] aren’t supported in 1.8.6 Invalid regular expression; [:ascii:] is not a character class: /[[:ascii:]]+/ (Dave says: No - I think these are 1.9 features) | 2008-08-19 | ||
37 | TYPO | code illustrating “shebang” includes puts “Hello, world!”, but the output shown is "It is now……. may be confusing to new folk | 2008-08-29 | ||
223 | ERROR | Second half of page says: And -n option … whose name matches the regular expression /builder/. | 2008-08-19 | ||
171 | OK | The Header is “Reading and Writing File” but the example only shows reading and there is actually no example of File writing That’s a higher-level heading. The second on writing is contained with in. | 2008-08-19 | ||
208 | TYPO | Word missing in first paragraph after “Anyone for Shoulda?”: | 2008-08-29 | ||
208 | TYPO | “Should” should be “Shoulda” in second paragraph under “Anyone for Shoulda?”: | 2008-08-29 | ||
205 | TYPO | In the first full paragraph on the page, fourth sentence, unlike LIFE not like. | 2008-08-29 | ||
60 | SUGGEST | Integer(price * 100) To me this just seems wrong. If I am a store owner I would loosing money here… I am sure there is a perfectly fine explanation for this and I think here would be a good place to explain it or at least a foot note detailing where it gets explained. I suspect it is a rounding issue but it does not seem right to me. | 2008-08-29 | ||
94 | TYPO | Near bottom: duplicate duplicate “that that” | 2008-08-29 | ||
101 | TYPO | Footnote 6: Should “conventially” be “conventionally”? | 2008-08-29 | ||
91 | TYPO | Middle paragraph: “…and a block parameter (arguments starting with an ampersand).” | 2008-08-29 | ||
141 | TYPO | Toward end: “Arrays, support this:” | 2008-08-29 | ||
157 | TYPO | Paragraph in middle of page: “they typically make most sense when…” | 2008-08-29 | ||
152 | OK | Last paragraph: “The === operator is defined in Class to test if the argument is an instance of the receiver or one of its superclasses.” There seems to be a little ambiguity over whether the last part of this means | 2008-08-29 | ||
204 | TYPO | 3rd paragraph: “you can even mix Shoulda tests for regular test::Unit test methods.” | 2008-08-29 | ||
209 | TYPO | Near bottom: “[1, 9 in t.rb” | 2008-08-29 | ||
243 | TYPO | Footnote 3: “We talk about Shoulda starting on page ??. For now, you can run this code by installing the gem using gem install Shoulda.” I don’t know if there’s more on it later in the book (since this footnote was also in the previous version), but Shoulda is now introduced in this version before we get here, and has what looks like it might be the start of a section on page 208. | 2008-08-29 | ||
245 | TYPO | Top of “require_relative and Ruby 1.8” sidebar: “you can use still use” (extra ‘use’ in there) | 2008-08-29 | ||
247 | TYPO | “Now all our files are in place, we can…” | 2008-08-29 | ||
250 | TYPO | 4th-to-last paragraph: “The s.executables line tells Gems to install the anagram command-line script the Gem gets installed on a user’s machine.” | 2008-08-29 | ||
255 | TYPO | Near end of “Source Files” section: “For UTF-8. If Ruby sees the byte sequence…” | 2008-08-29 | ||
302 | TYPO | First paragraph: “…as if the template is eing evaluated…” | 2008-08-29 | ||
447 | TYPO | in frozen? | 2008-08-29 | ||
211 | TYPO | “so I;d recommend a quick web search rather.. ” | 2008-08-29 | ||
234 | TYPO | “HEre we can just use rm” | 2008-08-29 | ||
242 | TYPO | “.. options.rb file inslde a directory named anagram..” | 2008-08-29 | ||
204 | TYPO | In the first line, it should be ‘user stories’ instead of ‘user stores’ | 2008-08-29 | ||
253 | SUGGEST | “Tama” sounds strange to me for a Japanese female name, but for a Japanese cat’s name. Mai, Hana, Yui are much better… I dont know… | 2008-08-29 | ||
728 | TYPO | If has a should read: It has a | 2008-08-29 | ||
295 | ERROR | The description for CGI.escapeElement says; “Here only the A element is escaped; other elements are left alone.” but element is also escaped. | 2008-08-29 | ||
534 | TYPO | In the first sentence on page 534 there is a double ‘an’: “Modes can be represented an an integer formed by or-ing together values from Table…”. Perhaps “Modes can be represented by an integer…” is what you want? Great book. I am thoroughly enjoying it. | 2008-08-29 | ||
541 | TYPO | Description of each_byte needs to be separated into two lines. Line reads: “io.each_byte {| byte | block } →nil | 2008-08-29 | ||
549 | TYPO | In the IO#gets section, you have this sentence:(although the setting of $_ is considered ugly, an may be removed in future). The word “an” is probably meant to be “and”. | 2008-08-29 | ||
376 | TYPO | (for example, by invoking items.size, the process is surprisingly similar. | 2008-08-29 | ||
453 | OK | Appear to be missing ‘sort’ (have ‘sort!), and ’sort_by’ methods. (Dave says: sort is defined in Enumerable) | 2008-08-29 | ||
480 | TYPO | ‘each_with_index’ overlaps the description (at least in the pdf). | 2008-08-29 | ||
391 | OK | sample code uses attr_reader for defining an accessor method. But I feel that using instance_variable_get method is appropriate in this context. (Dave says: I don’t agree here. I wouldn’t use instance_variable_get in regular code to define an attribute reader, so I don’t think I’d do it here, either) | 2008-08-29 | ||
376 | TYPO | “The ony change—and it’s a vitally important one” should say “The only change—and it’s a vitally important one” | 2008-08-29 | ||
685 | ERROR | In 1.8, ‘members’ returns an array of strings rather than an array of symbols. Does this change in 1.9? | 2008-08-29 | ||
791 | TYPO | ‘tuples may be matched using regular expressions, the classes of their elements,’ s/b ‘…expressions, or …’ | 2008-08-29 | ||
397 | ERROR | title of “instance_eval and class_eval” on the side panel is linked to page 398, not 397. | 2009-03-30 | ||
398 | SUGGEST | When you define a class method in the block of class_eval for MyClass, it become a class method of MyClass. When you define an instance method in the block of instance_eval for an instance, it become an instance method(singleton method). so, paragraph in middle of page is confusing for me. | 2008-08-29 | ||
50 | SUGGEST | When describing the ‘|’ character in the regular expression /Perl|Python/, you refer to it as a “pipe character”. “Pipe” describes the character’s use in Unix shell commands (later copied, sort of, in the DOS command line), but doesn’t really properly identify the glyph. Two pages later you refer to the character as a “vertical bar”, describing the syntax for passing parameters to yield blocks; and the Windows Character Map accessory refers to it as a “vertical line”. Either of these two designations is preferable to “pipe”, in my opinion. I’m feeling too lazy right now to track down the official name(s) of this character in the ASCII and Unicode specifications, but I’m quite sure it’s not “pipe”. | 2008-08-29 | ||
403 | TYPO | “you application will silently ignore calls to unknown methods in your class.” | 2008-09-23 | ||
403 | TYPO | “The OpenStructclass is distributed with Ruby.” | 2008-09-23 | ||
66 | OK | The code on 66-67 does not work. Error line 11 Csv_reader. (Dave says: the output in the book is produced by running that code at the time the book is formatted. Do you perhaps need to update your Ruby installation?) | 2008-09-23 | ||
404 | SUGGEST | If you explain about MY_CLASS constant in your code, it would be helpful. (Dave says: actually, the implementation was faulty—I’ve fixed it, and MY_CLASS is no more…) | 2008-09-23 | ||
404 | ERROR | “define_method—it’s defined in class Object.” | 2008-09-23 | ||
579 | TYPO | > Returns the regexp object for the regular expression that cerated match. s/cerated/created | 2008-09-23 | ||
648 | TYPO | > Returns true if obj lines between the start and end of the range. s/lines/lies | 2008-09-23 | ||
204 | SUGGEST | > Then, as you fill in the code, the specs mutate into tests that validate your code meets your expectations. Revise ‘meets your expectations.’ Pehaps ‘which meets your expectations.’ | 2008-09-23 | ||
407 | OK | how about adding following codes? | 2008-09-23 | ||
52 | TYPO | See how the code in the block (puts “In the block”) is executed twice, once for each call to should be: See how the code in the block (puts “In the block”) is executed twice, once for each call to The period should be a question mark. | 2008-09-23 | ||
36 | SUGGEST | For the really beginers perhaps you should mention how to quit from irb and go back to the command prompt. | 2008-09-23 | ||
377 | SUGGEST | The description of the example at the top of the page references “Line 11” but the example code doesn’t have any line numbers listed. It would be helpful if the code was shown with line numbers. | 2008-09-23 | ||
171 | OK | The title of the section is Reading/Writing to Files but I don’t see any examples for writing to files? I see it for reading only. (Dave says: writing is discussed starting on page 173) | 2008-09-23 | ||
214 | OK | The example at the bottom of the page does not make sense. It looks like you are trying to make a point about blocks but the examples are the same as your output proves. Yield produces ‘three’. (Dave says: look carefully at the output…) | 2008-09-23 | ||
57 | OK | In the BookInStock class definition on page 57, you convert the price to a floating point number using Float(price). However, the reader is left guessing what this type-conversion does exactly and, more importantly, why you don’t do something like price.to_f and how/why that differs from Float(price). If there is no difference, what is the best practice, and why are there two ways of achieving the same results. (This is something that annoys me in general about Ruby: often the same thing can be achieved in many different ways and it is not always clear why or which alternative should be preferred. If a book like this could shed more light on that, that would be welcome.) (Dave says: at the top of the page it says: The Float method takes its argu- | 2008-09-23 | ||
59 | OK | Again this is an example how the same thing can be done in Ruby in many different ways. Either you define accessor methods yourself, or you use the shorthand notation. It is good that the book mentions both possibility, but I suggest adding what the “preferred” policy is. Is it best-practice to always use the shorthand notation? The book doesn’t explicitly state this. (Dave says: there’s no real best policy, but why type out a long method defiition when a single line will do?) | 2008-09-23 | ||
62 | OK | In the example (tutclasses_14.rb) on this page you use the expression | 2008-09-23 | ||
67 | OK | Again, as with so many things in Ruby, two different ways of achieving the same thing. In this case: specifying access control. I suggest that, in addition to explaining the two alternative ways of specifying access cotrol, you give the reader a hint on what the preferred way is (or what you prefered way is) and under what circonstances what alternative should be used. | 2008-09-23 | ||
74 | SUGGEST | In Figure 5.1, why is the notation with three dots, for example a[1…3] not illustrated, although it is explained in the text on the previous page. I would suggest adding it to the figure too. | 2008-09-23 | ||
536 | TYPO | Description of Integer::even? | 2008-09-23 | ||
38 | TYPO | “Exist an irb session by typing exit,” should be | 2008-10-14 | ||
176 | TYPO | In the section “Writing to Files”, you don’t actually have an example of writing to a file. You skip right to writing binary data, using <<, and then to the next section, Doing I/O with String. | 2008-10-14 | ||
456 | OK | Description of Array#pop could be read to say that pop is new in Ruby 1.9. Should be rewritten somehow to make it clear that pop exists in 1.8, and that only the optional numeric argument is new in 1.9. | 2008-10-14 | ||
205 | TYPO | Second paragraph begins: “A better solution is to assume that your Ruby program is packaged according to the conventions we’ll be discussion in Section 16 on page 245. In this arrangement…” with the typo occurring at “according to the conventions we’ll be discussion” | 2008-10-14 | ||
376 | TYPO | In footnote 1, “the objects class hierarchy” should be “the object’s class hierarchy” | 2008-10-14 | ||
377 | TYPO | “The call to Test.new on line 11” should be “The call to Test.new on line 10” | 2008-10-14 | ||
385 | TYPO | “When you include a module class Example,” should be “When you include a module IN class Example,” | 2008-10-14 | ||
211 | ERROR | `gem install Shoulda` is no longer supported. Instead, please update the instructions for a shoulda install to read: sudo gem install thoughtbot-shoulda —source=[http gems.github.com] gem sources -a [http gems.github.com] I’m trying to convince Tammer to dual publish the gem to rubyforge also, but no luck so far ;-) NOTE: Substitute the github gem url above for the correct one. This wouldn’t let me submit with embedded URLs. | 2008-10-21 | ||
486 | ERROR | Prose description of each_with_object, besides missing the initial ‘C’ in ‘Calls’, makes no sense, compared with the example code. Prose appears to be an alternate description of each_with_index. | 2008-10-14 | ||
106 | OK | The description of Enumerable.inject taking an operator and operating successively on the first two elements, etc., is not correct for Ruby 1.8. This example should have a big “1.9” around it. (Dave says: that would be very confusing, as it would look like the 1.9 part was referring to the text. This whole book is for Ruby 1.9, so the flagging of changes is more a courtesy to the reader) | 2008-10-14 | ||
147 | TYPO | In the sentence, “First, all the rvalues are evaluated, left to right, and collected into an array (unless thay are | 2008-10-14 | ||
453 | SUGGEST | The special-case description of Array.insert(–1, obj) is confusing and unnecessary, making it seem as if –1 behaves differently from other negative indexes. The behavior where index == –1 is consistent with any other negative index. Suggested text: If index is not negative, inserts the given values before the element with the given index. If you want to call particular attention to the behavior with –1, I suggest adding text after the “if negative” sentence, perhaps parenthetically. Something like "This means that if index is –1, the given values are appended to the end of the array, making array.insert(–1, obj) equivalent to array.push(obj): | 2008-10-14 | ||
448 | ERROR | Description of []= says, “(Prior to Ruby 1.9, assigning nil deleted the corresponding array elements; now it simply assigns nil but, at least in Ruby 1.8.6, it’s not as simple as this. | 2008-10-14 | ||
458 | ERROR | “Equivalent” code for slice! is not actually equivalent. | 2008-10-14 | ||
540 | ERROR | Description of merge! omits description of the second form. It’s clear from the code examples that merge! behaves exactly as merge , but operates directly on hsh instead of on a duplicate. | 2008-10-14 | ||
867 | TYPO | The description of rb_protect says: “Executes body with the given args and returns nonzero in result if any exception was raised. The value in state corresponds to the various TAG_xxx macros.” (emphasis mine) However, the declaration of rb_protect in the book doesn’t have a “state” parameter; I’d suggest changing the third parameter (currently “result”) in the declaration to “state” to match the description of the function and the implementation of it in eval.c. | 2008-10-14 | ||
96 | SUGGEST | The text contains the following lines: “We also said that all Ruby objects know how to handle to_s. But we’ve also written our own classes that don’t implement to_s. But we didn’t say how.” The intent here is to say that our objects don’t explicitly define to_s, but handle it anyway. The above text is not clear. | 2008-10-14 | ||
457 | TYPO | “enum.choice( n=1 ) → an_array or nil” did not get updated to reflect the new method name (“sample”). | 2008-10-14 | ||
478 | TYPO | reads: | 2008-10-14 | ||
703 | TYPO | This seems wrong if a thread has been killed: Thread.kill(a) # => # (Dave says: I added a sleep to give it time to die) | 2008-10-14 | ||
405 | TYPO | “For example, we might be wring a simple DSL” should be | 2008-10-21 | ||
405 | OK | “To draw … 5x5 squares, we might write: It seems to me very unlikely that we would be writing “forward(4)” to draw a side of a 5x5 square. To avoid confusion, I suggest either changing “5x5” to “4x4”, or (probably better, to prevent confusion between different uses of the number 4) change “forward(4)” to “forward(5)”
| 2008-10-21 | ||
5 | SUGGEST | It would be useful to have all hierarchies of the TOC in the PDF-TOC as well (for ease of navigation). | 2008-10-22 | ||
404 | TYPO | " Previously is was impossible to pass a local or.." | 2008-10-21 | ||
405 | TYPO | In Turtle class, “def walk(…) end” should be “def walk(…); end”. (Dave says: actually, you don’t need the semicolon if there’s a parameter list, but I added it for consistency) | 2008-10-21 | ||
681 | SUGGEST | The example code for String#match is either poorly considered or poorly typeset: it is almost impossible to determine the difference between the lower-case “L” characters and the digit “1” in the regex expressions. Those with prior experience with regular expressions will know what’s what - but that’s not the point. It wouldn’t be particularly difficult to choose a different example…use ‘greetings’ instead of ‘hello’ and match on the ‘ee’ instead. | 2008-10-21 | ||
59 | TYPO | For the code sample “tutclasses_6.rb”, the 3rd books pricing is in speech marks, whereas the previous two books prices are not in speech marks. | 2008-10-21 | ||
238 | SUGGEST | Confusing to have Table 15.2’s description “Both the gem…” cut into the middle of the sentence “rake is an automation tool”. | 2008-10-20 | ||
218 | TYPO | Closing brace is missed in the phrase “(The $end in the message means end-of-file, so the message simply means that Ruby hit the end of your code before finding all the end keywords it was expecting.” | 2008-10-21 | ||
205 | TYPO | Some markup in the middle of the page was not processed by the PDF generation engine: “% ruby -I \\emph{path/to/app} \\emph{path/to/app}/test/test_roman.rb” | 2008-10-21 | ||
599 | SUGGEST | Hello Dave, When describing Module.instance_methods you explain: “Returns an array containing the names of public instance methods in the receiver.” It would be beneficial to point out _explicitly that this includes protected methods as well. I was just rereading and had to test it. :) A small note would have saved me some time. wee% cat im.rb def pri; end def pro; end public :pub p M.instance_methods | 2008-11-12 | ||
906 | SUGGEST | For the PDF version, please include a clickable A-Z list for the Index, as is done in the Rails PDF. I’m not sure what the proper PDF terminology for this is, but in the Preview app on Mac OS, it appears in the sidebar as an outline. The Rails PDF has “Symbols” and “A” through “Z” under “Index,” whereas the Ruby PDF does not. It’s very convenient. Thanks. (Dave says: your mere wish is my command. I didn’t bother creating a new release, but regenerate your existing PDF and the subentries will appear.) | 2008-10-22 | ||
702 | ERROR | Struct::new has two different 1.9 indicators, but as near as I can tell, it’s behavior is unchanged from Ruby 1.8. The block trick has been poorly documented in the past, but I’m pretty sure it’s been there for quite a while (1.8.4 or so maybe). It’s definitely in 1.8.6: Name = Struct.new(:first, :last) do p RUBY_VERSION
(Dave says: the first is indeed incorrect. The second flag is correct, though. In 1.8, #members returned strings, and in 1.9 symbols) | 2008-10-23 | ||
747 | SUGGEST | The second bullet point of the CSV description sounds like broken English, though I guess it is technically OK: “Some CSV files have a header line. Read it, and then process the rest of the file. Auto-matically convert fields that look like numbers.” I think a little rewording would help there. Also you are missing some fun of CSV tables on the next page. Try adding these lines to you examples: p table[:count] | 2008-10-23 | ||
712 | TYPO | The thread.exclusive section is mislabeled as ‘pass’. | 2008-10-23 | ||
440 | OK | YAML.dump produces; —- !ruby/object:Special (Dave says: not if you define to_yaml_properties) | 2008-11-12 | ||
833 | SUGGEST | The documentation for tmpdir doesn’t cover the new Dir.mktmpdir method. | 2008-12-15 | ||
507 | TYPO | “ynonym for each_with_object.” | 2008-11-12 | ||
505 | TYPO | “alls block with two arguments,…” for each_with_object | 2008-11-12 | ||
774 | TYPO | 1.9 symbol is out of alignment. | 2008-11-12 | ||
818 | SUGGEST | You are missing coverage for some nice additions to the shellwords library:
| 2008-12-15 | ||
368 | ERROR | Access Control section says, “Private methods therefore can be called only in the defining class and by direct descendents within the same object.” This does not follow from the definition of private methods, and is not true. class Parent class Child < Parent child = Child.new ####End of example Even though child_private is being called BY a member of the class within which it’s a private method, it’s being called WITHIN the parent class, not in the defining class or by any descendants. In a sense, Parent here resembles an abstract class in Java, in that it expects (if parent_meth is called) that its child classes will define child_private. And, of course, this example could be extended to any level of ancestry, with Parent being a grandparent, etc., of Child. (Same error applies to Programming Ruby, 2nd edition) | 2008-11-12 | ||
906 | SUGGEST | Under “#” in the index, please add an entry pointing to the preface where you explain the Classname#methodname notation that you use. I remember when I was reading the previous edition, I kept running across this in the text but couldn’t find the explanation of whether this was a legal Ruby method name or what. I only figured it out when I ran across almost by accident when looking at the preface some time later. | 2008-11-12 | ||
146 | ERROR | Error on all Pages……. On the Footer the “Prepared by …” and the Report Erratum" are overlapping.. | 2008-11-12 | ||
464 | TYPO | Note in the Array#pack method references String#unpack on page 699. The actual page is 701 and the link sends you to page 689. | 2009-03-30 | ||
461 | OK | For the Array Class, the “first” method is defined on page 454 but not described in the following ones (which may be 461). Hope It Helps ;) (Dave says: #first is not a method of Array—-it is mixed in from enumerable) | 2008-11-12 | ||
35 | OK | “MISSING: MacPorts doesn’t yet have 1.9. Check comment before going to print” It does - not sure when that changed, but the version I have installed was built in July apparently:
It’s not as recent as building from source, but that’s somewhat expected for MacPorts. | 2008-12-15 | ||
343 | TYPO | class variables will are private | 2008-11-12 | ||
436 | TYPO | “You can ask it to compile the Ruy code” should be “… Ruby code” | 2008-11-12 | ||
437 | TYPO | “Maybe you want to know you Ruby…” should be “Maybe you want to know how Ruby…” | 2008-11-12 | ||
272 | ERROR | “The two character sequence ”\\xcf\\x80" represents pi in UTF-8, but is not a valid byte sequence…" should be “The two byte sequence…” (In a chapter about character encodings, it’s important to pedantic around the usage of “bytes” and “characters”.) | 2008-11-12 | ||
142 | TYPO | “Get out their and match some strings.”.sub(/their/, “there”) | 2008-12-02 | ||
64 | TYPO | Footnote 2: | 2008-12-15 | ||
64 | OK | The method “price_in_cents” uses “price”, not “ def price_in_cents (Dave says: I prefer using the accessor method: it decouples the code better) | 2008-12-15 | ||
39 | TYPO | TIme should read Time. Context: (Note that the second string contains the text TIme.now between curly braces, and not paren- | 2008-12-15 | ||
339 | TYPO | at the start of this page, \\d should be \\w. | 2008-12-15 | ||
466 | ERROR | a.sample(6) should be something like [“a”, “d”, “c”, “b”] | 2008-12-15 | ||
498 | TYPO | at the bottom of page, the description of max_by would be enum.max_by {|item| block } -> obj or enumerator | 2008-12-15 | ||
562 | TYPO | At the start of description for `try_convert’, it would be `If obj is not already an io object, …’ | 2008-12-15 | ||
563 | TYPO | In the description of close_on_exec?, it would be `… close on exec …‘, not `esxec’ | 2008-12-15 | ||
565 | TYPO | In the description of `getbyte’, it might be `8-bit byte’ | 2008-12-15 | ||
263 | TYPO | samples/packaging_14.rb class Runner, def run: if no anagrams found, output line should puts “No anagrams in #{word} in #{@options.dictionary}” - missing the @options receiver | 2008-12-15 | ||
683 | TYPO | Under String#chars: < See also CIMString.bytes. | 2008-12-15 | ||
505 | SUGGEST | The documentation for each_with_object is unclear. Where is ‘block’ in the declaration? How can it return ‘memo’ or ‘enumerator’? The example is pretty good. | 2008-12-15 | ||
868 | TYPO | In the first paragraph of ‘Embedding a Ruby Interpreter’ the last sentence begins with ‘Install’, it seems that it should begin with ‘Instead’. | 2008-12-15 | ||
710 | ERROR | to_proc for Symbol is defined only in ruby 1.9 (the little “1.9” sign is missing) | 2008-12-15 | ||
534 | OK | “Compares fix to other numbers. Fixnum. I believe “between?” make the list too. (Dave says" between? is a methodof Comparable) | 2008-12-15 | ||
537 | TYPO | “Compares flt to other numbers. Fixnum. | 2008-12-15 | ||
209 | TYPO | “This code assumes soe kind if User class has been written.” should be, “This code assumes some kind of User class has been written.” | 2008-12-15 | ||
258 | TYPO | “file inslde a directory named anagram/”.gsub(“inslde”, “inside”) | 2008-12-15 | ||
261 | ERROR | packaging_8.rb It’s great you’re giving a ruby 1.8 version of require_relative. Saddly, it does not always work. Indeed, ‘caller’ returns lines “in the form file:line or file:line: in ‘method’”. So at least you must modify the grep pattern. I personally think that the code could be improved (‘e’ is not used, I find using $` ugly, File.join not needed, …). Moreover it would be nicer if it was forward compatible to ruby 1.9 (and other libraries doing the same) by checking if it is not already defined. You are welcome to use my version: module Kernel Thanks! | 2008-12-15 | ||
374 | SUGGEST | The closure example may be missing a line of code. Specifically, the proc in Creator#create_block should probably start with puts “CONST = #{CONST}” A bit more explanation of the example might also be helpful for people who aren’t quite sure what a closure is. | 2008-12-17 | ||
42 | ERROR | Just compiled from HEAD. “ri -c” doesn’t list classes, it shows generic help. (Dave says: I can’t believe they removed that option. Apparently you now run with no options to get the class listing) | 2008-12-17 | ||
57 | TYPO | “Here we ask and array” | 2008-12-17 | ||
57 | SUGGEST | The current punctuation and sentence structure is hard to discern, at least in the PDF: “We’ve already come across two methods that do Since “puts” and “print” begin the sentence, and are lowercase (where we English readers expect a capital), and the font doesn’t differentiate enough, I’d suggest: “We’ve already come across two methods that do [Obviously I can’t mimic the differing fonts in this suggestion; but the colon and semi-colon help set off “puts” and “print”] Indeed, the first sentence is introduction of a list, so I expected a colon following, and read right past the period and into “puts”, and I had to break my scanning to study the paragraph more. | 2008-12-17 | ||
210 | TYPO | In the fourth paragraph of “MiniTest::Unit vs. Test::Unit” box, I believe that you want to delete the first “automatically.” | 2008-12-17 | ||
97 | OK | The following code: def power_proc_generator will not produce 2, 4, 8. It produces 2, 2, 2 I think you meant: generator = power_proc This will produce 2, 4, 8 | 2009-01-05 | ||
90 | TYPO | “(or it’s synonym enum_for)” should be “(or its synonym enum_for)”. Apostrophe makes it say “it is”. | 2009-01-05 | ||
92 | TYPO | “before return a result” -> “before returning a result” | 2009-01-05 | ||
93 | SUGGEST | The example at the top of the page has method infinite_select(enum, &block). I believe this is the first time an ampersand is used as a prefix, and there’s no explanation of what it means. | 2009-01-05 | ||
121 | SUGGEST | This seems to be the first use of a leading “?” without an explanation of what it does. I’m guessing it’s a way to represent character constants? | 2009-01-05 | ||
419 | SUGGEST | The following features are worth to be mentioned in the book : - simpler way to call a lambda. Ex : my_lambda.(x) instead of my_lambda.call(x) | 2009-01-06 | ||
134 | SUGGEST | I know the format isn’t final; however, you may want to ensure the last line, which starts a new paragraph introducing a list (“If r stands for the immediately preceding regular expression within a pattern, then”) is printed with the list without having the reference tables intervening. | 2009-01-05 | ||
144 | TYPO | “And we can also use RUby-style comments document the tricky stuff.” | 2009-01-05 | ||
51 | TYPO | The phrase “if you’re using a hash to count the number of each different word occurs in a file” is probably missing the word “times.” | 2009-01-05 | ||
511 | OK | Enumerator.next, .rewind, .with_index are all ruby 1.9 only, so they should have the little “1.9” tag. PS: Clearly the 1.9 tag was not automatized, I hope there are not too many such errors. (Dave says: all of Enumerator is new…) | 2009-01-04 | ||
511 | TYPO | Enumerator.each_with_object and its usage line overlap | 2009-01-06 | ||
179 | SUGGEST | In Fig 11.1 & Fig 28.1 (ruby exceptions), I think it would be helpful to show which exceptions are new to ruby 1.9. The note on SecurityError changing in the hierarchy could go as a footnote for both figures. | 2009-01-05 | ||
131 | TYPO | second line from down in paragraph before ‘Matching Against Patterns’ double time word ‘encoding’ | 2009-01-05 | ||
82 | OK | puts“#{word}: #{count}” A bit nicer output : (\\t added) puts“#{word}:\\t#{count}” (Dave says: then I’d have to explain \\t, which I don’t do for another 40 pages…) | 2009-01-05 | ||
21 | OK | It is a tutorial and reference for version 1.9 of the Ruby programming language. | 2009-01-04 | ||
70 | OK | Hi, Atempted to run the code as downloaded in sample form. Got this error: om$ ruby stock_stats.rb data.csv ’ ’ (Dave says: this is probably a problem in the csv data file: if there are trailing spaces on the header line, then the csv column name will be “Amount ”, and the code won’t find amounts when it looks at each row). | 2009-01-05 | ||
195 | OK | “We could fix this by writing a method which reads the file and yields each successive word. But fibers give us a simpler solution.” I don’t see how using fibers is any simpler than just writing a block that yields each word. In fact, the example looks like you’re doing just that, but wrapping the block in a Fiber object instead of using a Proc. How’s that simpler? I guess I just don’t get it..what’s the real use case for adding fibers to the Ruby language? | 2009-01-05 | ||
197 | ERROR | “This code also illustrates a gotcha. Inside the loop, the threads use print to write out the number, rather than puts.” It uses ‘print’ to output the URL, not a number. Further it uses ‘puts’ to write the “Got:” line; shouldn’t it too use ‘print’? | 2009-01-06 | ||
35 | TYPO | “you’ll find the top-level for your C: drive at C: | 2009-01-05 | ||
45 | SUGGEST | “puts –1942.abs” warned me “warning: ambiguous first argument; put parentheses or even spaces”. I added parentheses and it worked correctly — “puts(–1942.abs)” (Dave says: looks like they’ve tightened that up. Thanks) | 2009-01-06 | ||
70 | TYPO | “When designing a class interface, it’s important to consider just how much of you class | 2009-01-16 | ||
221 | TYPO | RSpec sytax -> RSpec syntax | 2009-01-16 | ||
326 | TYPO | “Merb is a lighterweight alternative to Rails.” Use lighter-weight instead. I also note that Merb and Rails is merging, so I dunno if you want to change the statement or not. | 2009-01-16 | ||
250 | ERROR | “The —display option…” It’s not —display, it’s —details | 2009-01-16 | ||
91 | TYPO | 2nd para: which invokes it’s host class’s each method: its | 2009-01-16 | ||
593 | TYPO | sprintf entry starts before spawn entry / options is complete (Dave says: tables such as this float to the tops of pages. I think I’ll move all tables to the end of the section) | 2009-01-16 | ||
520 | TYPO | In absolute_path it looks like “Path names starting with ~ and not expanded, in contract with File#expand_path.” should read: | 2009-01-16 | ||
497 | TYPO | In with_object, ‘ynonym’ instead of ‘Synonym’ | 2009-02-04 | ||
21 | TYPO | Just before Why Ruby? | 2009-01-21 | ||
21 | TYPO | Footnote 1 | 2009-01-21 | ||
22 | OK | I am not sure if this is a issue, but I imagine that reading the book in paper it is very ugly to find page 23 starting with an URL. (Dave says: we do layout after the content is complete) | 2009-01-21 | ||
26 | TYPO | At the second line of Part III | 2009-01-21 | ||
35 | OK | Hmm this is a tough one. | 2009-01-21 | ||
38 | SUGGEST | Last para before “Source Code”. | 2009-01-21 | ||
45 | ERROR | Second para after samples/intro_1.rb | 2009-01-21 | ||
46 | OK | Start of text at p.46 (Dave says: I never liked the “message” meme, so try not to use it. But “received” is common parlance, so I go with that flow) | 2009-01-21 | ||
47 | SUGGEST | Third para: | 2009-01-21 | ||
48 | OK | 3rd para | 2009-01-21 | ||
53 | OK | 2nd para (Dave says: what value is returned by “raise”?) | 2009-01-21 | ||
55 | OK | para 2 after code example line.sub(/Perl/, ‘Ruby’) # create a new string in which the first occurrence of ‘Perl’ is replaced with ‘Ruby’ | 2009-01-21 | ||
58 | ERROR | Last para of “Command Line Arguments” | 2009-02-04 | ||
325 | TYPO | The URL for webrick.org is written with three slashes | 2009-02-04 | ||
70 | TYPO | First sentence of first paragraph under Access Control heading: When designing a class interface, it’s important to consider just how much of you class should be ‘your’, ‘the’ works also. | 2009-02-04 | ||
140 | TYPO | Should say “now know” instead of “know know” in the following sentence: “This is the second: you know know as much | 2009-02-04 | ||
333 | TYPO | Missing / not rendered bold font in C:\\> \\textbf{ruby olegen.rb ‘NetMeeting 1.1 Type Library’ >netmeeting.rb} The external methods and events of the type library are written as Ruby methods to the | 2009-02-04 | ||
38 | SUGGEST | Under the “Ruby Programs” header, the name TextMate should have caps. IDE should be defined. | 2009-02-04 | ||
61 | ERROR | The leading paragraph states: “…want to accept any object for the price parameter as long as that parameter can be converted to a float. We can pass in a float, an integer, and even a string…” In the example code following, b1 has an integer, b2 has a float, and b3 has another float, rather than a string which would match your text. | 2009-02-04 | ||
64 | SUGGEST | The leading paragraph discusses the misconception that attr declarations somehow declare instance variables. This paragraph could end with the sentence: “Ruby completely decouples instance variables and accessor methods as we see in the upcoming section titled ‘Virtual Attributes’.” | 2009-02-04 | ||
70 | OK | I think the bottom of pg 70 needs to more strongly emphasize that the default protection of a method is public. I had to reread it a couple times. I think it should state (using ’ to show my insertions): "Ruby gives you three levels of protection ‘using the optional keywords public, protected, and private.’ | 2009-02-04 | ||
441 | TYPO | under the heading Behind the Curtain | 2009-02-04 | ||
145 | TYPO | “The notation \\k | 2009-02-04 | ||
40 | ERROR | The downloaded code (in the tar file) does not contain the directory structure or file for fib_example.rb | 2009-02-04 | ||
97 | OK | About footnote 7: in Haskell it is implemented as «\\» but there is no way to use it in Ruby since it is reserved. | 2009-02-04 | ||
210 | TYPO | Inside this text block: Folks have been using Test::Unit with Ruby for a good number of years … should it say Ruby instead of Rails? | 2009-02-04 | ||
37 | TYPO | please add the ruby one-click installer for osx to the options on how to get/install ruby for mac osx. we are providing packages for i386 and ppc for osx leopard, tiger and panther. macruby is not 1.9.1 yet and will only support leopard from version 10.5.2! we support all kinds of osx systems. | 2009-02-04 | ||
91 | TYPO | class String; def please; $stderr.puts “You have done a great job so far”; self end end para[ –4 ].text.sub( “CEnumerator”, “Enumerator” ).please | 2009-02-04 | ||
560 | SUGGEST | Convert int to a rational number. 1.5 and 1.0 are not integers so it seems to make no sense to show this examples when describing the Integer class. | 2009-02-12 | ||
589 | TYPO | Kernel::loop - Returns an Enumerator if no block given. I don’t see this behavior. spitfire% ./irb19 ’ | 2009-02-12 | ||
69 | ERROR | Fortunately, Ruby comes with a good CSV library (described on This line doesn’t link to anything. Perhaps the page needs to be written still. | 2009-02-12 | ||
376 | ERROR | chapter “Proc Objects”, first para last sentence. def a; Proc::new end (1) One could argue that this is just a variant of method 1, and I would not disagree too much. In that case however I believe that it is still worth being mentioned. | 2009-02-12 | ||
657 | SUGGEST | In the documentation of Proc#lambda? there is a sentence: | 2009-02-12 | ||
101 | ERROR | pending from page 100, and referring to Ruby1.8 | 2009-02-12 | ||
340 | SUGGEST | At the bottom of the page, “You can use the back- | 2009-02-12 | ||
345 | SUGGEST | At the end of the description of “[characters]”, there is " See 134." where the 134 is a link to that page. The text should say “See page 134.” | 2009-02-12 | ||
72 | SUGGEST | 2nd para private methods: self is used without prior explanation. | 2009-02-12 | ||
106 | SUGGEST | definition of #get_end_of_log_file | 2009-02-12 | ||
563 | SUGGEST | At the paragraph starting the page: | 2009-02-12 | ||
108 | OK | module Trig modue Trig | 2009-02-12 | ||
110 | OK | First para in Debug#who_am_i? (Dave says: I want to make it explicit here) | 2009-02-12 | ||
110 | ERROR | 2nd text para | 2009-02-12 | ||
111 | OK | paras.last | 2009-02-12 | ||
114 | OK | Last para before chapter “Resolving Ambiguous …” | 2009-02-12 | ||
121 | ERROR | First text para | 2009-02-12 | ||
121 | ERROR | continued | 2009-02-12 | ||
121 | SUGGEST | In the context of string literals. | 2009-02-12 | ||
420 | TYPO | Missing space in “Ruby 1.9has changed the way Ruby looks up constants when…” | 2009-02-12 | ||
139 | TYPO | Under: Pattern-Based substitution, first para: | 2009-02-12 | ||
143 | TYPO | Under: Controlling Backtracking, 2nd para, line 6: | 2009-02-12 | ||
39 | TYPO | “which claims to offered a packaged OX X […]” should be OS X. | 2009-02-12 | ||
132 | OK | Matching Against Patterns (Yes, but that’s not a bug) | 2009-02-12 | ||
132 | SUGGEST | last line in code on page | 2009-02-12 | ||
133 | OK | end of first para: There is no MatchData#index method. | 2009-02-12 | ||
133 | OK | Last, parenthesized, line: | 2009-02-12 | ||
134 | ERROR | Character Classes 532/36 > ruby19 -ve ‘p( /[[a]/.match( “a[” ))’ | 2009-02-12 | ||
41 | TYPO | In the “The very latest Ruby” box, There is just one (1) command, so “commands” doesn’t need a “s”. | 2009-02-12 | ||
46 | TYPO | Missing reference to “OO Refresher” Maybe this content isn’t written yet? I took a quick look through the index and couldn’t find what it would be…. (Dave says: removed the reference—I had to trim that section for size reasons) | 2009-02-12 | ||
343 | ERROR | I don’t think the %s notion to create a symbol is a 1.9 feature. It works in 1.8 as well. | 2009-02-12 | ||
338 | OK | Section “General Delimited Input”: Aren’t these so-called “fancy strings”? One could mention this, maybe. (Dave says: I’ve never heard that term) | 2009-02-12 | ||
45 | TYPO | Last line of second paragraph: Shouldn’t it be “mostly everything” instead of “most everything”? Sorry if I’m wrong. (Most likely.. :) | 2009-02-12 | ||
503 | ERROR | Interface for first has two mistakes: | 2009-02-12 | ||
390 | TYPO | In the section for “to_a”: “a object” instead of “an object”. | 2009-02-12 | ||
390 | TYPO | “to_path”: Missing closing parantesis “)” at end of line. | 2009-02-12 | ||
146 | TYPO | In the extended regexp’s comment: “palindrone” instead of “palindrome”. | 2009-02-12 | ||
64 | SUGGEST | I had initially glossed over the fact that attr_reader is a get-only function. You might want to add a sentence like this - Yes, when you get to attr_accessor and attr_writer, it becomes obvious, but I think others might find this comment helpful… | 2009-02-25 | ||
767 | TYPO | “ERB breaks its input text into checks of regular text and program fragments.” probably meant to say: “ERB breaks its input text into chunks of regular text and | 2009-02-25 | ||
422 | TYPO | In the last code snippet of the chpater “instance_eval and Domain-Specific Language” there is the instance variable | 2009-02-25 | ||
516 | ERROR | SystemStackError was under StandardError in Ruby 1.8, too! :-) | 2009-02-25 | ||
245 | TYPO | In the -E switch documentation: “Specifies | 2009-02-25 | ||
245 | TYPO | Documentation for -E switch: “([…] to this when write, and transcoded from […])”. The word “write” before the comma should be “read”. | 2009-02-25 | ||
276 | TYPO | In the first paragraph under “Encodings” in the second line: repeating of word “method”. | 2009-02-25 | ||
698 | TYPO | In the table 28.15 (Options to encode and encode!): In the description of :invalid, “If :invalid not …” should be “If :invalid is not …”. Same for :undef. | 2009-02-25 | ||
245 | OK | Description of -e option: The programfile has to be ommitted. Even if specified, it is ignored. And ranges of integers don’t match against the current input line nummer. I’ve tested with: echo -e “foo\ (Dave says: I believe this is a Ruby bug) | 2009-02-25 | ||
452 | TYPO | In the last line: “The method Object#untrusted? returns true is an object is untrusted.”. Replace the first “is” with “if”. | 2009-02-25 | ||
301 | OK | Text under figure doesn’t have serifes. (Dave says: it’s the caption…) | 2009-02-25 | ||
302 | OK | Text under figure doesn’t have serifes. Same for page 303. (Dave says: it’s the caption) | 2009-02-25 | ||
270 | OK | “Gems gets around this issue.” should be “Gems get around this issue.” (Dave says: ‘Gems’ is singular—it is RubyGems) | 2009-02-25 | ||
883 | TYPO | reutns | 2009-02-25 | ||
153 | OK | The heading “Method Return Values” should be “Methods Return Values”. | 2009-02-25 | ||
790 | OK | (The following example would be better written using fibers.) | 2009-02-25 | ||
791 | TYPO | page.paras[1].sentences[–1].sub( “tothe”, “to the” ) | 2009-02-25 | ||
400 | OK | Third para after code BTW the following holds too (Dave says: singleton classes are not revealed by .class) | 2009-02-25 | ||
402 | TYPO | Last sentence of third para | 2009-02-25 | ||
414 | OK | code at top of page | 2009-02-25 | ||
377 | TYPO | About 12th line from the top: | 2009-02-25 | ||
397 | TYPO | In a paragraph “self and Method Calling”, at end of 4th sentence, missing closing parantesis. | 2009-02-25 | ||
280 | SUGGEST | The first sentence in the “Eight-bit Clean Encodings” section (see below) uses the word “made-up” which denotes “imaginary” colloquially but may denote “consists of” technically to non-native English speakers. I would suggest changing “made-up” into “imaginary” to avoid confusion. “Ruby supports a made-up encoding called ASCII-8BIT.” becomes: “Ruby supports an imaginary encoding called ASCII-8BIT.” | 2009-02-25 | ||
410 | TYPO | “to” should be “too” in “class methods in a parent class are available to in the child class.” (or just strike “to”). | 2009-02-25 | ||
424 | OK | first para of chapter “method_missing” hook. 516/17 > ruby -v -e ‘p Object.instance_method( :instance_eval )’ However there are two issues with this right now: | 2009-02-25 | ||
424 | ERROR | Sorry, wrong copy and paste in the previous post: 579/84 > ruby -v -e ‘p BasicObject.instance_method( :method_missing )’ | 2009-02-25 | ||
441 | ERROR | samples/ospace_21.rb contains a call to Kernel.proc which you discouraged the use of earlier in the book (page 376, footnote #7). | 2009-02-25 | ||
307ff | SUGGEST | IMHO it isn’t clear from the descriptions of rdoc’s directives that those directives are not parsed when being put into an included text file, i.e. you cannot put the :main: directive into README.TXT, which seems natural somehow, but only into a ruby file. | 2009-02-25 | ||
365 | TYPO | line 1 paragraph 4 reads ‘In Ruby 1.9, arguments with …’ should read ‘In Ruby 1.9, arguments without default values may appear after arguments with defaults.’ | 2009-03-04 | ||
338 | ERROR | In the discussion of to_ary at the bottom of the page, it says that Ruby 1.9 uses to_splat to do implicit conversion instead of to_ary. While this was true for a while during the Ruby 1.9/1.9.0 period, Matz undid that experiment and Ruby 1.9 still uses to_ary. Grepping the Ruby 1.9 source code for to_splat finds no hits. (Dave says: good catch) | 2009-03-04 | ||
92 | TYPO | Just under the first code example on the page “But what it you wanted” should be “But what if you wanted” ##Notice the it should be if## | 2009-03-04 | ||
141 | OK | str.gsub(/\\\\/, ‘\\\\\\\\\\\\\\\\’) # => “a\\\\b\\\\c” (ruby 1.9.1p0 (2009-01-30 revision 21907) (Dave says: youre in irb, right? It displays strings in #inspect format by default) | 2009-03-04 | ||
41 | TYPO | Shouldn’t the last word in the “The Very Latest Ruby” gray box be “command” rather than “comment”? | 2009-03-04 | ||
245 | OK | —disable-gems isn’t included in the list produced by ruby -h for ruby 1.9.1p0 (2009-01-30 revision 21907) (Dave says: this is bug in Ruby) | 2009-03-04 | ||
246 | OK | -U isn’t included in the list produced by ruby -h for ruby 1.9.1p0 (2009-01-30 revision 21907) (Dave says: this is a bug in Ruby) | 2009-03-04 | ||
247 | OK | -X and -y, -yydebug aren’t included in the list produced by ruby -v for ruby 1.9.1p0 (2009-01-30 revision 21907) (Dave says: this is a bug in Ruby) | 2009-03-04 | ||
344 | TYPO | “This second contains” perhaps should be either “This section contains” or “This second section contains”. | 2009-03-04 | ||
123 | SUGGEST | samples/tutstdtypes_23.rb and surrounding text look like the first place the notion of “Struct” is used. (Moreover, there is no explanation of what a Struct is at that point in the text). This was a foreign concept when I got to that point in the text on first reading. A little googling and searching in the Pickaxe book made clear what a Struct is, but you might want to add a brief explanation or use another programming concept at that point. | 2009-03-04 | ||
211 | TYPO | In the bottom of gray box in the ordered list number 3 starts with “You’ll can install” and it should be “You can install”. | 2009-03-04 | ||
864 | TYPO | There is a sentence “When the function terminates.” that makes no sense in the context. Should it have a comma instead of a full-stop? | 2009-03-30 | ||
857 | SUGGEST | Dot-point 3 of “Building Our Extension” says “This is what happens on an OS X system.” The way its worded and with the full-stop at the end gave me the impression that you can only build extensions on OS X, rather than the example output happening to be the OS X version of running make. Perhaps say “If run on an OS X system, this is what would happen” | 2009-03-30 | ||
65 | TYPO | In the last sentence of the first paragraph: “…as we’ll see [in] the section….” | 2009-03-30 | ||
295 | DEFER | The irb configuration options list prompt_i, prompt_c, and prompt_s. There is no mention of prompt_n, though. It took me a while to find a way to format the inner lines of method definitiions. | 2009-03-30 | I hand't come across prompt_n. I'll have to spend some time adding that throughout the chapter. | |
450 | SUGGEST | in samples/taint2.rb | 2009-03-30 | ||
451 | ERROR | 2nd para Seems this holds only for $SAFE=4, look at this please: ’: Insecure: can’t define method (SecurityError) | 2009-03-30 | ||
451 | ERROR | I misinterpreted the stack trace in the above Erratum; Even at level 4 a tainted proc can be passed to a method. | 2009-03-30 | ||
496 | TYPO | This section feels unfinished. | 2009-03-30 | ||
23 | TYPO | double period… | 2009-03-30 | ||
43 | ERROR | command “ri GC” now has additional method (malloc_allocated_size, malloc_allocations) and returns… ——————————————————————————————— Class: GC Class methods: count, disable, enable, malloc_allocated_size, malloc_allocations, Instance methods: garbage_collect | 2009-03-30 | ||
44 | ERROR | results for typing ri assoc now returns four results and is now … more than one method matched your request. You can refine your Array#assoc [Ruby 1.9.1] | 2009-03-30 | ||
47 | SUGGEST | the use of number as the name of your number variable at first makes the example look like number is a special object to call when you want to test the length of a number. Whereas, mynumber or any specific naming more clearly shows that it is just the creation of any object with a numeric value. See below…. | 2009-03-30 | ||
92 | TYPO | But what it you wanted to iterate and receive an index, but use a different method than each should read But what IF… | 2009-03-30 | ||
735 | ERROR | On page 735, the footnote says that leap seconds are used because “years are not really a convenient number of hours long”. But aren’t leap seconds used because days are not a constant number of seconds (because the earth’s rotation is not constant), and leap days used to handle the fact that years doesn’t have an integer number of days? This erratum also happens in the first and second edition. | 2009-03-30 | ||
555 | OK | Hash::index is deprecated. This should show in the doc (and not in the example). | 2009-04-08 | I believe it does say so. | |
16 | TYPO | in the first line: it should be “previous two editions” missing s on edition | 2009-04-13 | ||
489 | ERROR | Enumerable::each_with_object takes an optional block, which should be specified in the interface line | 2009-04-13 | ||
488 | TYPO | In “enum.each_cons( length ) [ {| array | block } ]”, why the []? If it’s because the block is optional, then the [] are missing in most methods of enumerator. Otherwise they should go (same with each_slice) | 2009-04-13 | ||
289 | DEFER | Dear Dave, Thanks for the great book. If still possible I do want to make one suggestion for the chapter IRB. One very handy feature of the IRB is the use of _ which refers to the last result. So: | 2009-04-13 | Indeed that's a useful feature. I can't see a way to add it without repaginating the book, which I can't do without breaking a lot of stuff, but I'll keep it on the list. | |
533 | ERROR | Quoting the book: “The order in which keys and/or values are returned by the various iterators over hash contents may seem arbitrary and will generally not be in insertion order.” This is no longer true for Ruby 1.9. Order is maintained. Thanks for the great book. Looking forward to my paper copy. | 2009-04-13 | ||
339 | TYPO | “the variable d is not shared before it occurs only inside the block” should be “the variable d is not shared because it occurs only inside the block”. | 2009-04-13 | ||
122 | SUGGEST | End of first para: Funny I never used [0] for that purpose before, always #to_s. | 2009-04-08 | ||
69 | TYPO | In Figure 4.1, the picture for a[1…3] is missing the right-side border of the box around “cat” | 2009-04-13 | ||
28 | TYPO | The link in the last paragraph of the “Windows Distributions” extends past the right margin and even the right edge of the page (although it does go to the rubyinstaller page on RubyForge). | 2009-04-13 | This is an (unfortunate) side effect of hyperlinking in the PDF: on this particular book we can't hyphenate and split a hyperlink. Sorry... | |
493 | ERROR | Enumerable::reverse_each should have the “1.9” symbol since it is new. | 2009-04-13 | I've left it there because it was in 1.8 | |
496 | TYPO | Beginning of Enumerator::new states “The second form constructs…”. Should read “The first form constructs…” | 2009-04-13 | ||
496 | OK | “with the method Kernel#to_enum (or via its alias, Kernel#enum_for).”.gsub(“Kernel”,“Object”) | 2009-04-13 | enum_for is ctually defined in the Kernel module | |
540 | TYPO | Interface of Hash#rassoc missing the closing parenthesis. | 2010-09-05 | ||
537 | OK | Hash#delete_if: interface probably shouldn’t have the ⟨ ⟩ around the block. Same with Hash#reject! | 2010-09-05 | They return an enumerator if no block is given | |
754 | TYPO | First line of text: “generator-lke” should be “generator-like” | 2010-09-19 | ||
681 | TYPO | Interface of String#gsub has second and third form on the same line | 2010-09-05 | ||
TOC | TYPO | The page numbers in the Table of contents, index, etc. are 1 too small | 2009-04-26 | ||
559 | TYPO | For “readbyte”, it says “Returns the next 8-byte byte”. I suspect this should be “8-bit byte”. | 2010-09-05 | ||
688 | TYPO | The first line of the description of slice! starts “Deletes the specified portion from strand…..” There is a space missing between “str” and “and”. | 2010-09-05 | ||
568 | TYPO | This line looks a bit sketchy: | 2010-09-05 | It should say "only *if*", not "only *with*") | |
542 | TYPO | The specification of the method “to_hash” says "see page 375. I think this should be page 378. | 2010-09-05 | ||
688 | OK | In the specification of slice!, it says that “this is a string”.slice!(3..6) returns " is “. When I try it I get ”s is". | 2009-04-26 | The previous line removes the 'i', so all the characters have shifted down. | |
All | TYPO | The page numbers in cross references are 1 below what they should be. | 2009-04-26 | ||
622 | TYPO | obj =~ other_obj should be obj !~ other_obj | 2010-09-05 | ||
488 | ERROR | Enumerable#detect should have a “1.9” symbol next to it, since it can now be called without a block | 2010-09-05 | ||
452 | SUGGEST | In Array#cycle, the following should be removed: | 2010-09-05 | ||
455 | TYPO | Interface of Array#frozen: “frozen?!”.gsub(“!”,“”) | 2010-09-05 | ||
535 | TYPO | Missing “)” in interface after “hsh.assoc( key” | 2010-09-05 | ||
270 | OK | Apparently, there was a mixup between ∂ (U+2202) and δ (U+3B4). All examples are given with δ but the codepoints are those of ∂. Thus there are many errors in the book, in this section and in the String reference section. | 2009-04-26 | It's just the way TeX prints the character. | |
695 | ERROR | String#upto has a second optional argument. | 2010-09-05 | I also now document the special behavior when the strings contain digits | |
496 | ERROR | I believe the syntax Enumerator.new{ some block } is new to Ruby 1.9 and thus should have a “1.9” symbol next to it. | 2010-09-05 | ||
584 | TYPO | The bottom of the page describing Marshal is cut off. | 2010-09-05 | ||
631 | TYPO | Missing closing parenthesis after + in Object#to_enum interface | 2010-09-05 | ||
621 | ERROR | In Ruby 1.9, retuns an enumerator if no block is given. | 2010-09-05 | ||
591 | OK | Method#arity refers to Method#parameters. AFAIK, such a method does not exist (yet). | 2010-09-05 | Ah, but now it does and it'll be documented in the next printing... :) | |
621 | ERROR | Oups, sorry, I meant to say Numeric#step returns an enumerator if no block is given (in Ruby 1.9), so the interface should change, and a “1.9” symbol should be added. | 2010-09-05 | ||
807 | TYPO | “It’s” should not have an apostrophe in “the module uses it’s random_bytes method” | 2010-09-19 | ||
489 | ERROR | Enumerable#find_index can also be given a single argument (as shown in Array#find_index) | 2010-09-05 | ||
454 | ERROR | Array#find_index returns an enumerator if no block and no argument is given | 2010-09-05 | ||
131 | TYPO | “subsubtring” where “substring” should be used: “You’ll sometimes want to match a pattern only if the matched subsubtring is preceded by or followed by some other pattern.” | 2010-09-02 | ||
133 | TYPO | Either the word “refer” or the word “count” should be removed from this sentence: “Negative backreference numbers refer count backward from the place they’re used, so they are relative, not absolute numbers.” I think “refer” should go. | 2010-09-02 | ||
498 | ERROR | Enumerator#next is 1.9 only, so there should be a “1.9” symbol next to it. | 2010-09-05 | ||
699 | ERROR | The ‘members’ instance method of Struct returns an array of symbols rather than strings, and this is a change in 1.9. members joe.members →array | 2010-09-05 | ||
574 | TYPO | #39013: The bottom of the page describing Marshal is cut off.—Dave Thomas 1, Erratum noted above references page 584, should be 574 2. What, if any, information is missing ? | 2010-09-05 | ||
493 | TYPO | “that is, any? will return true…” should read “that is, one? will return true…” | 2010-09-05 | ||
337 | ERROR | I can not reproduce the behavior of class variable as described on pages 337 and 338 of Programming Ruby 1.9. Here is a file with Ruby code I typed in from the text: ##### begin classvars.rb @@var = “top level variable” a = Holder.new def a.get_var puts “a.get_var: #{a.get_var}” ##### end classvars.rb (Essentially, this is the code from the text using puts to produce output. Also, at the end, I show the value of the top level variable @@var.) Here is the Ruby version and the output I see: $ ruby -v | 2010-09-05 | ||
337 | OK | With respect to erratum #39185, I tried the same code on an older Ruby build: $ ruby -v With this version, the output agrees with the text: $ ruby1.9 classvars.rb Perhaps this is a Ruby bug in 1.9.1p0 instead of a book erratum? | 2010-09-05 | In Ruby 1.9.2 it changes again. THe whole situation with class variables makes me despair. | |
533 | ERROR | Hash.[] has two other forms. The second and third form take a single argument which is either an array of key-value pairs or an object convertible to a hash. See redmine #1385, confirmed ruby-core #23433 | 2010-09-05 | ||
57 | OK | Assignment method is: def price_in_cents=(cents) Shouldn’t the middle line be: Puts on my system give 12 and 1200 without the Float(…) Am I missing something here? Thanks. | 2010-01-16 | It is divided by 100.0, so the operation is performed in floating point automatically. | |
56 | OK | Some text was cut away, last text was: " have an exact internal representation. When we " | 2010-01-16 | the footnote continues on the next page… | |
341 | ERROR | Description of $stdout states: “Assignment to $stdout is not permitted: use $stdout.reopen instead.” I believe this is not exact. STDOUT can’t be reassigned (obviously since it is a constant), but $stdout is a variable and has STDOUT as default value, but can be reassigned. See The Ruby Programming Language, for intance to section 9.7.1.4, or search ruby’s source code for “$stdout = ” | 2010-09-05 | Yup: that was a cut and paste error... :( | |
487 | SUGGEST | The first section of the Enumerator description says: But the example you give actually returns an Array…? When I look at the method used (take_while) you would only get an Enumerator object if no block is given. But you give a block. | 2010-09-05 | ||
339 | ERROR | The second paragraph for section “break, redo, next, and retry” says: “retry restarts the loop, reevaluating the condition.” However on page 147 there’s a footnote saying “Prior versions of Ruby also supported the retry keyword as a looping mechanism. This has been removed in Ruby 1.9.” | 2010-09-05 | ||
337 | SUGGEST | The description for first form of ‘case’ expressions says: “case when condition …” while the description for “if” and other similar expressions says: “if boolean-expression …”. So this implies there’s a difference between a ‘condition’ in a “when” clause and a ‘boolean-expression’ in “if”. However the book doesn’t say anything about what the difference might be. | 2010-09-05 | ||
349 | SUGGEST | First paragraph says: “… A module may contain class and instance methods and may define constants and class variables. As with classes, module methods are invoked using the Module object as the receiver…”. The term of ‘module methods’ is not defined anywhere. Presumably they are class methods defined in a module. | 2010-09-05 | ||
353 | OK | First paragraph for ‘Calling a Proc’ says: “You can call a proc by invoking its methods call, yield, or []. The three forms are identical.” No examples is given for the third form. I doubt it’s really identical to the others. Usually when calling a [] method you need to put something between the brackets. | 2010-01-16 | Works fine | |
353 | ERROR | Second paragraph for ‘Calling a Proc’ says: “You can also invoke a proc using the syntax name.(args…). This is mapped internally into a.call(…).” Who’s ‘a’ and where do ‘name’ and ‘args’ go? Maybe it wants to say “name.call(args…)”? | 2010-09-05 | ||
355 | TYPO | Second line in first paragraph has “exceptioons”. | 2010-08-31 | ||
396 | TYPO | Last paragraph says: “Previously, constants were looked up in the lexical scope in which there were referenced.” It should be “…they were referenced.” | 2010-09-05 | ||
399 | TYPO | First paragraph ends with “Because of this, most people are moving away from this style of CFinstance_evaled block.” Not clear what ‘CF’ stands for. Maybe a font marker? | 2010-09-05 | It was some layout that leaked through, | |
198 | TYPO | The second paragraph has ‘expectations’ misspelled twice: “expections” in the second line and “expecations” in the fourth line. | 2010-09-05 | Both are fine words, though... :) | |
613 | TYPO | The header for class Object shows it has not superclass. However in Ruby 1.9 it has BasicObject as superclass. | 2010-09-05 | ||
271 | ERROR | The paragraph under ‘Interactive Configuration’ says: “For example to change your prompt back to DEFAULT you could use the following:” but then the code is ‘conf.prompt_mode = :SIMPLE’. | 2010-09-05 | ||
438 | TYPO | Second paragraph, third line: “tha” should be “the” (“the safe level of the code that invoked tha [sic] proc”). | 2010-09-05 | ||
81 | SUGGEST | Technically, one might say that a :fox is “vulpine”. One would use “lupine” for a :wolf, maybe. :-) | 2010-08-31 | ||
402 | OK | In classes_57.rb the name parameter to method missing is a Symbol not a String as assumed by the code. | 2010-01-16 | Works here | |
607 | TYPO | In the “1.9” note for define_method, “This methods” should read “These methods”. | 2010-09-05 | ||
235 | TYPO | The -W description has “level or two”. should be “level of two” | 2010-09-05 | ||
186 | TYPO | In ‘unittesting_3.rb’: of course it is Test::Unit::TestCase and it is correct in the subsequent examples. | 2010-09-05 | Actually, both work fine, and I wanted to demonstrate that, but I think in retrospect it is too confusing, so I'll go back to Test::Unit | |
255 | OK | I read: “String literals are always encoded using the encoding of the source file that contains them, regardless of the content of the string”. But, actually, I’m trying it and it doesn’t behave like that.
Executing, it produces: So, that phrase and the following example aren’t correct. If it is relevant, this is my ruby version: | 2010-09-05 | I believe the book is correct. There was a time when strings containing only 7-bit ascii were encoded as ascii, but now they all take on the encoding \n \n \ndave[ruby3a/Book 8:53:07] cat t.rb \n# coding: utf-8 \nputs __ENCODING__ \nputs "ciao".encoding.name \nputs "ciao \\u03c0".encoding.name \ndave[ruby3a/Book 8:53:11] ruby -v t.rb \nruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0] \nUTF-8 \nUTF-8 \nUTF-8 \n \n \n | |
243 | TYPO | I believe that packaging_14.rb should be placed in “lib/anagram/runner.rb” not in “lib/runner.rb” | 2010-09-05 | ||
879 | TYPO | On the top of the page (in the header), on the right side, it says ‘require “mkmf”’. Shouldn’t this be ‘require “socket”’? This typos is on all of the socket pages (879-892 in the PDF). | 2010-10-14 | ||
316 | SUGGEST | I am a relative newby to Ruby, but in a book that describes itself as “a tutorial” (page xxi), the example in the MS Windows section asks the reader to go to the “unstable” subdirectory (ftp> cd pub/ruby/binaries/mswin32/unstable) to download Ruby. I may not really understand the “stable” vs “unstable” of the Ruby community, but the Ruby website download page lists “Stable version”, “Stable Snapshot” and “Nightly Snapshot” and recommends using the “Stable Version”. So shouldn’t the book be recommending that as well? | 2010-09-19 | ||
676 | TYPO | The return value of the method String#partition is printed as “[ before, match after ]”. Shouldn’t it be “[ before, match, after ]”? This typo also appears on page 677 in the method String#rpartition. | 2010-09-05 | ||
677 | TYPO | The return value of the method String#rstrip! is on it’s own line. Shouldn’t they be on the same line? It appears like this: While (I think) it should be like this: | 2010-09-05 | ||
830 | TYPO | In the table “C Data Types to Ruby Objects” LONG2NUM is lacking the end parenthesis. | 2010-09-19 | ||
556 | TYPO | IO#gets: The line “If separator is nil, the entire file is passed as a single string.” is redundant, this was stated in the previous line. | 2010-09-05 | ||
328 | 328 | TYPO | In the 1.9 specific Section ‘Rational and Complex Numbers’: “There are for rational or complex literals, for example.” | 2010-09-05 | |
351 | ERROR | The retry keyword is still mentioned in the section ‘break, redo, next, and retry’ as a control flow modifier for loops, but retry is not valid for loop control in 1.9 (although this fact is mentioned earlier in the exception handling topic as a footnote) | 2010-09-05 | ||
623 | TYPO | In the synopsis of define_singleton_method, the second line reads “obj.define_method(symbol) { block } -> proc”. I believe “define_method” should be “define_singleton_method”. | 2010-09-05 | ||
118 | SUGGEST | A sentence near the bottom says: “nil is equivalent to false in Ruby” but the Ruby interpreter disagrees: irb(main):110:0> nil false
=> false
irb(main):111:0> nil = false | 2010-09-02 | Nil is equivalent to false in a boolean context. I'll add the extra words in the next printing. | |
all | SUGGEST | It would be nice to have the chapter number next to the chapter name on top of each page. Also, the PDF table of contents should include chapter number as well as chapter name. (My professor assigns readings by chapter number.) | 2010-01-16 | ||
707 | TYPO | Thread#[] produces: | 2010-09-05 | ||
365 | SUGGEST | The description of ‘next’ doesn’t give a good idea of what it does. Indeed, remove the ‘next’ keyword in the 4 examples and the result is the same… | 2010-09-05 | If you remove the 'next', then there won't we a return value of 99. \n \nHowever, I'm changing the example to \n \n \n\t def ten_times \n\t 10.times do |i| \n\t if yield(i) \n\t puts "Caller likes #{i}" \n\t end \n\t end \n\t end \n \n\t ten_times do |number| \n\t next(true) if number ==7 \n end \n | |
379 | ERROR | names = %{ant bee cat} results in the string “ant bee cat”. What you want instead is names = %w{ant bee cat} which results in [“ant”, “bee”, “cat”} Without this fix, the following statement result = names.map {|name| name.upcase} makes no sense, since “.map” is something you do to an array (or other Enumerable), not to a String. | 2010-09-05 | ||
621 | ERROR | Documentation for Numeric#remainder is not exact. x.remainder(y) = x - (x/y).truncate | 2010-09-05 | ||
351 | OK | The section headed “break, redo, next, and retry” says: “If used within a while, until, or for loop, the value given to break is returned as the value of the statement, and the value given to next is silently ignored. ” This is not correct in the case of a for loop, as demonstrated by this code: class Foo f = Foo.new Running it produces this output: “next” which shows that the value given to “next” is not “silently ignored’, but rather is returned as the value of ”yield". | 2010-09-05 | It does describe this case above, but I agree my wording is sloppy here. I'll tighten it up. | |
595 | ERROR | Module#<, <=, … “all operators return false” should be | 2010-09-05 | ||
406 | ERROR | In section “instance_eval and class_eval”, First paragraph says: “The methods Object#instance_eval, Object#class_eval, and Object#module_eval” Those last two should actually be Module#class_eval and Module#module_eval | 2010-09-05 | ||
606 | ERROR | The method parameter can be a Proc or Method object | 2010-09-05 | ||
623 | ERROR | The method parameter can be a Proc or Method object | 2010-09-05 | ||
119 | TYPO | In the section “Changing Strings with Patterns” shouldn’t the first sentence read: “The sub method takes…?” | 2010-09-02 | ||
143 | ERROR | For the section Splat! Expanding Collections in Method Calls, the 1.9 marker is in front of the paragraph “When you call a method . . .” This does work in 1.8.6,7, but the splat has to be at the end. In other words, a reader might be misled to think the the basic functionality is missing in earlier versions, while only 1.9 lets you have multiple splats in different orders. | 2010-09-02 | What's different in 1.9 is that you can pass in an enumeration, too. | |
642 | ERROR | Proces.exec: signature is missing the optional env (see Kernel.exec) | 2010-09-05 | ||
88 | OK | The line of sample code in tutcontainers_63.rb that reads: proc3 = ->(arg1, arg2) { puts “In proc3 with #{arg1} and #{arg2}” } …only seems to work if the left parenthese abuts the -> operator. Including a space, as with the previous assignments that don’t show parentheses, causes an error: “tutcontainers_63.rb:3: syntax error, unexpected tLPAREN_ARG, expecting keyword_do_LAMBDA or tLAMBEG” | 2010-01-16 | Indeed. I find the whole syntax for this to be ugly. | |
789 | ERROR | “Because Ruby does not use operating system threads…” is not true for 1.9. | 2010-09-19 | ||
139 | TYPO | In the last sentence of the second-to-the-last paragraph shouldn’t “argument” at the end of the sentence be pluralized? | 2010-09-02 | ||
98 | OK | Last paragraph, line 4 says “A module can’t have instances,..” Should line 6 say “..all the module’s methods..” | 2010-01-16 | Not really, because a module can also have module methods. \n \nIt's a confusing part of the language: a module does have instance methods, but you can't create instances of the module, and therefore you can't use the instance methods directly. | |
141 | OK | When object writer is being initialized, the string my_order should be surrounded by double quotes. As written, ruby will look for a variable named my_order and throw an error because it doesn’t exist. | 2010-01-16 | I'm just assuming you have an order lying around—it's not supposed to be anything special | |
708 | ERROR | Thread#group has not changed from Ruby 1.8 to 1.9, so there should be no “1.9” sign next to it. | 2010-09-05 | ||
556 | TYPO | The result of the Rational method says ‘complex’, it should probably say ‘rational’. | 2010-09-05 | ||
407 | 396 | ERROR | “Previously it was impossible to pass a local or instance variable into a block…” shouldn’t say “local” since those are captured by the closure when using blocks. Since the _exec methods don’t allow for strings, this is always the case. | 2010-09-05 | |
426 | OK | Running the code in ruby 1.9.1 with -W2 gives a warning of “method redefined”. (See gist 217992) I’m not sure which of undef_method or remove_method should be used to avoid the warning, though. | 2010-09-05 | I don't see the problem with 1.9.2 | |
366 | SUGGEST | Dave, you set up two terms “raw block” and “lambda” at the top of the previous page. But when describing the precise details of return, break, and next you do not use them but it appears as if they would map correctly and be very useful. Ultimately, it appears as if “lambda”s are just like methods: they return as a method and they check their arguments. “raw block”s however do neither. In fact, this my be a “no no” but it appears as if “raw block” is a synonym for Proc. I’ve always found all this really hard to remember and keep straight. But there appears to be much more consistency present than is presented in the text. | 2010-09-05 | You're right: I was over-complicating that description. It'll be fixed in the next printing. | |
328 | SUGGEST | You write: the form with single quotes converts \\’ It appears that \\x maps to x if x is the quote character or one of the two quote character pairs. e.g. puts %q(abc\\() | 2010-09-05 | ||
449 | ERROR | Array#<=> can also return nil (when the argument is not comparable) | 2010-09-05 | ||
466 | ERROR | Bignum#<=> can also return nil (when the argument is not comparable), same for all classes | 2010-09-05 | ||
590 | ERROR | Math.log takes a second optional argument (base). | 2010-09-05 | ||
406 | TYPO | On page 406 of Programming Ruby 1.9 I read: “In contrast, instance_eval acts as if you were working inside the singleton class of self. I had just read examples like “cat”.instance_eval(…), so I immediately thought, “Hey, wait a minute, “In contrast, instance_eval INVOKED ON A CLASS acts as if …” | 2010-09-05 | ||
625 | ERROR | Object#id_ is not new in Ruby 1.9, so there should be not “1.9” icon next to it. | 2010-09-05 | ||
487 | SUGGEST | Shouldn’t the first sentence of the description for the any? method indicate that collection elements are only passed until the given block returns true? | 2010-09-05 | ||
541 | ERROR | Hash#select returns a hash (correct in doc, incorrect in interface line) | 2010-09-05 | ||
841 | ERROR | ‘rb_global_variable’ takes a pointer as its argument. This section… …should be replaced with something along the lines of: | 2010-09-19 | ||
681 | ERROR | String#gsub! can also return an enumerator, so the interface should show it (like String#gsub) | 2010-09-05 | ||
57 | OK | In the method price_in_cents, shouldn’t the “price” variable name be “@price”? I’m not sure why it does work if the explanation in the final paragraph of the page 51 is correct. Would you please clarify? | 2010-01-16 | It uses the accessor method price. | |
544 | TYPO | decription of odd? is: Returns true is int is odd. should be: Returns true if int is odd. | 2010-09-05 | ||
483 | TYPO | s/UTF-*/UTF-8/ (you forgot to release the shift key :-) | 2010-09-05 | ||
306 | TYPO | Under section “Getting and Setting properties”, the sentence “excel2.rb ( found in the ext/win32/samples directory)” should be “ext/win32ole/sample directory”, based on source code version of ruby-1.9.1-p376. (1) I installed Ruby1.9 windows using one-click installer, version: ruby 1.9.1p243, but I did not find the samples folder. (2) then I downloaded the ruby-1.9.1-p376-i386-mswin32.zip from ruby ftp server, unzip it, I found sample folder, it is under doc\\ruby\\ruby-1.9.1\\sample\\win32ole (3), At last, I downloaded the ruby source code zip file, finally I found the sample folder is under ext/win32ole/sample | 2010-09-20 | In the new printing, this code will be included in the download | |
306 | ERROR | The source code of modified excel2.rb is not working, it throws exception: ’ I found excel[‘Visible’] = true should be I also found excelchart[‘rotation’]= rot is not working, which means we can not use Ruby hash notation to set the properties. Following are the correct code: require ‘win32ole’
excel = WIN32OLE.new(“excel.application”) #excel[‘visible’] = TRUE 30.step(180,5) do |rot| excel.ActiveWorkbook.Close(0) | 2010-09-20 | Indeed, this seems to have changed. In the new printing I'll change this example to use OpenOffice, and to use the a.b notation | |
307 | TYPO | The IE navigate ruby code win32_11.rb is not working, it throws the following exception: win32_11.rb:40:in `message_loop’: method `backtrace’ called on terminated object ’ ’ ’ But I found ienavi.rb under ext\\win32ole\\sample ( source code version is ruby-1.9.1-p376) is working, | 2010-09-20 | Indeed: it looks like the 1.9 throw/catch implementation breaks win32ole. I'm changing the example in the next printing. | |
309 | TYPO | ext\\win32ole\\samples directory should be ext\\win32ole\\sample directory | 2010-09-20 | ||
310 | ERROR | The code of win32_15.rb is not working, it throws following exception: win32_15.rb:15:in `[]’: wrong number of arguments(2 for 1) (ArgumentError) ’ | 2010-10-14 | It's changed in 1.9.2. Try the following:
\n
\n
\n
\n
| |
457 | ERROR | Array#permutation’s interface and doc should reflect the fact that the size argument is optional. | 2010-09-05 | ||
448 | SUGGEST | The fact that the interface for most methods of array use “enum” instead “arr” or whatever is a bit surprising and could mislead the reader into think that the method is available to any Enumerable (which is often but not always the case) | 2010-08-31 | ||
503 | TYPO | in File.new, it says See also IO.open on page 505 but IO.open is on page 540 | 2010-09-05 | ||
131 | ERROR | Thanks for an awesome book!! It seems that the Oniguruma library was added in 1.9, so there should be a “1.9” notation in the margin like the other 1.9-specific features. | 2010-09-02 | ||
809 | TYPO | s/CArray/Array/ | 2010-09-19 | ||
392 | TYPO | figure 24.4: I mean the superclass of Class is Module | 2010-09-05 | ||
466 | SUGGEST | In the survey of the instance methods of the Complex class, the description of magnitude() seems to be the same as that of abs(). Could you please explain the difference? (Or if there isn’t one, explicitly state that they are synonyms.) | 2010-09-05 | ||
921 | TYPO | The index includes an entry for relection, between reject! and remainder. | 2010-10-14 | ||
13 | OK | Second paragraph, final sentence reads: | 2010-08-31 | I kinda like it as it is: it's idiomatic (I exercise most every day... etc) | |
684 | OK | lstrip second example is correct? | 2010-09-05 | Yes, it's correct. \\x00 is the same character as \\000. lstrip does not strip nulls, unlike rstrip. | |
55 | TYPO | in the example | 2010-08-31 | ||
630 | TYPO | Misspelling of “arguments” in the form of “arguements” in the paragraph describing “curry”. There are two instances of the misspelling. ex. “…a proc that will take from zero to n arguements…” | 2010-08-31 | ||
746 | ERROR | In the two Ruby examples of DL, the outout lines appear in the opposite order to expected. Either this is an erratum, or there should be some text explaining why it happens (presumably buffering). | 2010-09-19 | Yup—that's caused by the C-runtime buffer its output and the RUby runtime buffering its. THe next printing fixes this by adding an fflush call to the C | |
760 | TYPO | The second sentence of the description of GServer sounds wrong. It should be written as a list of things for the class user to do. E.g. “To use it, subclass the GServer class, set the port (and potentially other parameters) in the constructor, and then implement a serve method to | 2010-09-19 | ||
325 | OK | The =begin comment construct needs to be added. My basic complaint about this book (one of few) is that I can’t use it as a reference effectively. Yes, the “=begin” is mentioned but its under chapter 19. My silly pdf reader (Preview on the Mac) can not search for =begin correctly. Acrobat reader found it but only because I sorta mostly thought it was “=begin” but wanted to make sure. I tried searching for comment but didn’t see it because it was in the wrong place. The reference part of the book (which I assume is section III), needs to be totally complete. Even if it repeats some things. | 2010-09-05 | It's there in the next paragraph: "Physical lines between a line starting with =begin and a line starting with =end are ignored \nby Ruby and may be used to comment out sections of code or to embed documentation." | |
317 | SUGGEST | Assoc and FType in Running Ruby Under Windows is not all of it. I guess it is also necessary to reference 1. PATHEXT setting, even though it is explained in the FType help. 2. Explorer Open for .rb/.rbw files, since on Windows assoc/ftype may differ from what happens when I double click a file in Explorer or other file manager. 3. The registry keys that are involved in both 1 and 2 since on Windows file associations tend to be broken and require manual fixing. I understand that is not ruby specific, but is so wide spread that it is worth re-iterating. | 2010-09-19 | ||
622 | 613 | TYPO | A tiny typo in the heading row of instance method ‘!~’. obj =~ other_obj → !(obj=~ other_obj) | 2010-09-05 | |
480 | TYPO | c* will match all files beginning with c, ‘c will match all files ending with c, SHOULD BE “c, *c will match all files ending with c,” yes? | 2010-09-05 | ||
28 | TYPO | Weblink (rubyforge.org/projects/rubyinstaller) in paragraph «Windows distribution» ending out of the page. | 2010-08-31 | ||
74 | TYPO | six assertions… 5 assertions “The results show that four test methods ran, successfully executing six assertions” 5 tests, 5 assertions, 0 failures, 0 errors, 0 skips | 2010-09-02 | ||
128 | SUGGEST | Named regular expression matches need to be labeled as a ruby 1.9 feature. | 2010-09-02 | ||
192 | 177 | OK | Do the examples of Mutex need: require ‘thread’? | 2010-09-05 | This book is for Ruby 1.9, and in that version of Ruby Mutex is built in \n |
757 | OK | I am not sure about the line: st.has_key?(‘cow’) # => true How is the delegation working here? Is the point to show that def_delegators(:@hash, :size, :has_key?) has no effect? Please let me know Ali Rizvi | 2010-09-19 | THe example shows that when has_key? is called on the SymbolTable object, it is passed on to the @hash instance variable—the call gets forwarded. | |
144 | OK | In the following section, the output shown is for a plus table but in the paragraph above this code, the student was selecting a times table. The input request shows a t as well indicating times. The output should be: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512
| 2010-09-02 | The output is a two-times table: 2x1 = 2, 2x2 = 4, etc. | |
540 | SUGGEST | Interface and description of Hash#rassoc should use ‘val’ as the input parameter instead of ‘key’ as it is the value in the hash that is being tested. So, this just reads wrong: “… first element whose value is key, returning the key and value….” This change also makes the interface clearer: hsh.rassoc(val) -> [key,val] or nil. | 2010-09-05 | ||
272 | OK | The book says: “, and output will be transcoded from internal to external encoding Is that really correct? I think that on write operations what really matters is the encoding of the string being sent to output, not the internal encoding of the IO object, which is only used on read operations to transcode from external to internal encoding. | 2010-09-05 | Transcoding also takes place on write operations, converting from the internal encoding to the external encoding. | |
578 | ERROR | MatchData#values_at documents that it is a “Synonym for MatchData#select.”, but there is no documentation for MatchData#select. (MatchData#[] references both names on p.576) | 2010-09-05 | ||
7 | SUGGEST | I was a bit confused when I used macports and had all executables installed with the 1.9 suffix. (Even though you mentioned this in the book.) One suggestion is to tell readers about the “+nosuffix” option in macports. Also, when readers use IRB the first time a few pages later, it could be useful to remind them they need to type the 1.9 suffix if necessary. | 2010-09-19 | ||
194 | SUGGEST | Regarding the code for ts_dbaccess.rb, since it appears right after the discussion about putting tests in the test/ directory and running it like this “ruby -I . test/test_roman.rb”, it may be clearer if your ‘require’ statements for ts_dbaccess.rb follow the same convention: require ‘test/test_connect’ That lets you follow the convention previously described. Otherwise, ts_dbaccess.rb won’t know where to find the required files (other than ‘test/unit’ of course). | 2010-09-05 | Good catch. In fact, they should probably just use require_relative. | |
343 | 343 | TYPO | RUBY_REVISION is missing the “1.9” only tag | 2010-10-14 | |
114 | OK | ??? example ==> 0…“cat”.length | 2010-10-14 | Thats a range from 0 up to the length of the string "cat" | |
9 | ERROR | Table of contents for Built-in Classes and Modules and Standard Library aren’t generated correctly | 2010-11-21 | This reference to the PDF bookmarks, which appeared in the sidebar in some PDF readers in the prior version. The were dropped in the transition to the new, but it wasn't deliberate. I'm working to get them back. | |
276 | TYPO | Footnote URL yardoc dot ORF [sic] should be dot ORG | 2010-11-22 | ||
276 | SUGGEST | “Some context is handy”, but the Existing Errata listed by your tool does not apply to the version I am looking at. | 2010-11-14 | There's not much I can do here: the new printing is a totally retyped book, using a totally different build system. The pagination isn't the same. However, all old errata were fixed in this new printing. | |
203 | TYPO | In the last textual paragraph: “The let method creates what looks like a variable (it’s actually a dynamically defined >>>mathod<<<)” | 2010-11-22 | ||
13 | OK | The link in page 13 is wrong | 2010-11-22 | I don't see a link on page 13: could this be the previous edition? | |
69 | TYPO | Page 69 ends with example unit test output reading “4 tests, 6 assertions, 0 failures, 0 errors, 0 skips”. The second to last sentence of the page describes this output, saying “five test methods ran, successfully executing five assertions.” The code on the following page does include 5 test methods with 5 assertions, but the sentence in question is not describing that code. | 2010-11-22 | You're right: that text was describing the next test run. It should say "The results show that four test methods ran, successfully executing six assertions." | |
29 | OK | I’ve only installed RVM and not the ruby package on Ubuntu. The shebang notation is just totally wrong for me in this instance. /usr/bin/ruby doesn’t exist, but /home/dsouth/.rvm/rubies/ruby-1.9.2-p0/bin/ruby does (and yet that is horribly ugly). Probably something more for RVM than the book, but if I write my code for my RVM environment, then it is only going to work with MY environment. If I install and write my code for the system ruby, then I may not be running the ruby version that I would expect to be running in RVM?!? Oh the horror! :) | 2010-11-21 | You use shebang when you explicitly want to add the path to an interpreter (ugly or not). If you don't then I woulnd't use it (I very rarely do). | |
266 | OK | In Figure 18.1 (despite several corrections since the version of 2010-11-09) there are some em-dashes that should be double hyphens: —version and —noinspect in the Option column, and —noreadline in the Description column. Kaizen. | 2010-11-22 | I don't see them here: here's the page I see: \n \nhttps://skitch.com/pragdave/rbq88/ruby3-p-00.pdf-page-266-of-916 \n \n | |
266 | ERROR | “-I path . . . Specifies the $LOAD_PATH directory.” is the text produced by “irb -h” itself, but it would be better to write “-I directories . . . Same as Ruby’s -I option” since the value of $LOAD_PATH is not replaced, and more than one path can be given and prepended to $LOAD_PATH. | 2010-11-22 | Great recommendation. | |
309 | TYPO | “Following the type character is a delimiter, which can be any nonalphabetic[!] …” should be “nonalphanumeric” (confirmed with irb and a look at parse.y). Footnote: the underscore is a word character, but not an alphanumeric character. | 2010-11-22 | ||
312 | SUGGEST | Figure 22.2 You might want to add a tedious footnote about \\o and \\oo, and about \\xh. “\\08” => “\\x008”. “\\xA_1” => “\ | 2010-11-22 | ||
316 | ERROR | "\\0, \\1, \\2, … \ “x&x”.gsub(/\\&/, “AMP”) => “xAMPx” | 2010-11-22 | ||
318 | SUGGEST | Figure 22.3 You might want to add ENCODING to your list of reserved words | 2010-11-22 | ||
35 | OK | Because writing accessor methods… should be Because reading accessor methods… the above occurs in the third para on the page. | 2010-11-22 | I think it's correct as it stands: the meaning is "because it is so common to have to write accessor methods, Ruby provides you with a shortcut" | |
392 | TYPO | In Figure 24.6, section: “Class and module-related hooks” comma-space is missing between the initialize hook names | 2010-11-22 | ||
186 | TYPO | One of the Object is superfluous in “[…] you can set up a signal handler using Object#Object.trap” (bottom of p.186) | 2010-11-22 | ||
348 | SUGGEST | The “Block Arguments” section does not mention (remind) “that you can now define block-local variables by putting them after a semicolon in the 1.9 block’s parameter list” nor that “parameters to a block are now always local to a block” (excerpts from p.72) | 2010-11-22 | ||
67 | ERROR | The example hash excerpt with “the” mapping to its count is wrong the second time it is shown. Is: { …, “the” => 1, … } should be: { …, “the” => 2, … } ??? | 2010-11-22 | Good catch | |
335 | TYPO | “while boolean-expressiondo” is missing a space | 2010-11-22 | ||
413 | TYPO | “Marshal.load” would make more sence in this sentence: “When the object is subsequently reconstituted using Marshal.dump, the method marshal_load […]” | 2010-11-22 | ||
6 | TYPO | The link to skip to “Source Code From This book” says it’s to section 1.2, but it’s actually to a subsection within 1.2. It would be less confusing to remove the 1.2. | 2011-04-12 | ||
107 | ERROR | 5th para, starting “Once you have …” | 2011-04-12 | ||
336 | TYPO | def defname <(<, arg <, = val >>* … | 2011-04-12 | ||
249 | TYPO | In show_encoding there is a puts on the first line and then a string on a line by itself. It looks like there is a missing + after “… size} bytes) ” or a missing puts on the next line. The line “has encoding #{str.encoding.name}” doesn’t show up in the output. | 2011-04-12 | ||
41 | OK | The pallet example is an infinite loop | 2011-01-25 | Actually, it never loops at all :) | |
330 | TYPO | Figure 22.4, the operator ^= (XOR=) is missing from the list of assignment operators | 2011-04-12 | ||
330 | TYPO | var[“a”, /^cat/ = “three”} … in the “Element Reference” column of the unlabeled figure at the bottom of the page is syntactically wrong. | 2011-04-12 | There's a missing '] before the = sign | |
150 | OK | Extra ’ in “artist = ”’Trane" if artist "John Coltrane" artist = "'Trane" end unless use_nicknames “no” | 2011-04-12 | It's an apostrophe... | |
208 | ERROR | Figures are broken on kindle edition: Figure 13.1: Testing framework assertions Here you can see the screenshots: PS. Could you please show notice about erratum format, because it isn’t possible to post links to screenshot. I think my previous post missed | 2011-04-13 | ||
245 | TYPO | 10 lines from bottom of page. “These go in lib/test_finder.rb” should read “These go in test/test_finder.rb” (test/ not lib/) | 2011-04-12 | ||
14 | TYPO | Invalid reference to the online appendix. Instead of pragprog.com/ruby3 it should be pragprog.com/titles/ruby3 | 2011-03-15 | ||
250 | TYPO | at “Adding Even More Automation” section library name “Jeweler” not “Jewler” | 2011-04-12 | ||
128 | TYPO | In the first sentence of the “Setting Options” section, the character “m” is missing before “(multiline)”. As we saw at the start of this chapter, you can add one or more of the options i (case insensitive), m (multiline), and x (allow spaces)… | 2011-04-12 | ||
680 | TYPO | Documentation of Rational#==: Replace “is” with “if”. Thanks for this great book! :-) | 2011-04-12 | ||
276 | TYPO | The code snippet is mis-formatted starting at the apostrophe in Debrinski’s algorithm. At that point a runaway italic quotation? starts that swallows up the =end, etc. | 2011-04-12 | ||
311 | TYPO | There should be a space between Fixnum and 1. It appears in both the paper copy (page 308 there) and the pdf (v. 3.0) that there is no space between Fixnum and 1. | 2011-04-12 | ||
197 | SUGGEST | Figure 13.1 title is “Testing framework assertions”. This figure directly follows to alternate testing frameworks, so it’s a little confusing if you’ve jumped right to those pages. The following page “Figure 13.2: Additional Test::Unit assertions” conciseness is appreciated, and Figure 13.1 might benefit from the same. | 2011-04-12 | ||
193 | SUGGEST | The Shoulda section in “13.4 RSpec and Shoulda” talks about nesting contexts and the code examples walk you through this. As nesting is not mentioned in the RSpec section, one might walk away with the misconception that that is a strength of Shoulda over RSpec. | 2011-04-12 | I can see what you're saying, but I don't think the implication is there—I'm just trying to show some useful stuff, rather than do a step-by-step comparison. | |
27 | TYPO | The first sentence in the “Source Code from This Book” section has a missing “of”. “We have made much the source code from this book available for download.” should be: “We have made much of the source code from this book available for download.” | 2011-03-15 | ||
133 | TYPO | At the top of this page, there’s a missing closing parenthesis in the first paragraph. Folks sometimes use a splat … (but that are perhaps … in a superclass. (Note that in this example … were given to the original method.”) | 2011-04-12 | ||
68 | OK | The loop should be 0..4 instead of 0..5. Otherwise you get the following error: ugly_word_count.rb:17:in `block in ‘: undefined method `[]’ for nil:NilClass (NoMethodError) ’ | 2011-01-30 | Note that there are three dots in the version in the book... | |
0 | SUGGEST | I have just noticed in the latest pdf the built-in classes and standard library are not expanded as bookmarks in the sidebar. Also they are not hyperlinked in the contents any more. Needless to say this is a retrograde step in being able to get the documentation of a class quickely. Also, but not important for pdf viewing the A, B, C, D, etc. marks in the right margin for the class reference are also missing. Dave. | 2011-04-12 | ||
645 | TYPO | Under spawn, in the second paragraph, second sentence the word ‘command’ is written as ‘commend’ | 2011-04-12 | ||
77 | OK | usage of ‘different than’ rather than ‘different from’ in the section Enumerators are Objects, paragraph 3 => line 1 | 2011-04-12 | ||
250 | TYPO | Although it started as a public Git repository, GitHib maybe GitHub? | 2011-04-12 | ||
845 | ERROR | The text at the bottom of page 184 hints that there is a description of condition variables on page 845. You can imagine my disappointment when I went there and found no mention of them! :-) | 2011-04-12 | It should have referenced the Monitor library | |
799 | OK | The example on page 799 uses method MonitorMixin#new_cond, but that method is not described anywhere. Likewise, whatever class is returned by that method (presumably ConditionVariable) obviously has methods wait_while and signal, but they aren’t described either. | 2011-04-12 | That's right—there are literally thousands of standard library methods—in this section I show a sample to give you an understanding of what a library does. ri and rdoc are your friends here. | |
67 | TYPO | Last code paragraph. { …,“the” => 1, … } “the” was just incremented, I think it should be { ‘the’ => 2 } | 2011-04-12 | ||
319 | TYPO | 2011-04-12 | |||
799 | ERROR | The second paragraph is very confusing and (I think) wrong. It says there are three ways of using Monitor: parent class, mixin, and object extension. It then says “we document the module form”, but “the module form” isn’t one of the three choices. It looks to me like it’s the object extension form that’s described. Then it says “the class form is effectively identical” - it that supposed to be “parent class form”? And what about the third form whichever that might be? | 2011-04-12 | It should say "we document the mixin form" | |
81 | TYPO | The first line of vowel_finder_sum.rb (p 81) is missing in the book, but present in the referenced code from the Prag Prog site. Without it, the interpreter yells at me. The missing line is require_relative “vowel_finder” (I pencilled it into my book) I’m still making my way through the book and am getting a lot out of it. Thanks guys! A perk of unemployment is learning a new skill! Cheers! Mike Manewitz | 2011-04-12 | ||
189 | OK | line 2, missing word(s). ‘check [to see if] the results are…’ or ‘check [that] the results are…’ Great book, really enjoying it! Will buy Rails 3.0.3 when it comes out. | 2011-04-12 | I think the usage is probably OK as it stands | |
203 | ERROR | Not sure if my -v of Rspec is outdated, but it didn’t come with simplecov. I had to $gem install simplecov. | 2011-04-12 | That simplecov code shouldn't have been there. Sorry | |
230 | TYPO | Installing Gems On… first command, $*name-matches build[er] | 2011-04-12 | ||
Bmark | TYPO | In the bookmarks of the PDF, Ruby Library Reference/Built-in Classes and Modules/Time takes you to Standard Library/Time on page 847 rather than the correct place on page 739. | 2011-04-12 | ||
491 | OK | last line of 1st paragraph: “…languages call this operation foldl or reduce.” | 2011-03-15 | If you're pointing out "foldl", that is the correct name. | |
203 | TYPO | Towards the end of the page, “(it’s actually a dynamically defined mathod)”, mathod should be method. | 2011-04-12 | ||
65 | SUGGEST | “If used with a single integer index, the element at that position is replaced by whatever is on the right side of the assignment. Any gaps that result will be filled with nil:” I had to reread the last sentence a couple of times. It could reference to gaps resulting either from “whatever is on the right side” or from using a new index. So I would rewrite it as “Any gaps that result from using indices not yet found in the array will be filled with nil:” or the like. | 2011-01-25 | ||
68 | SUGGEST |
| 2011-04-12 | ||
93 | OK | First paragraph has this: “To reference the name sin unambiguously, our code can then qualify the name using the name of the module containing the implementation we want, followed by ::” This is wrong, since “sin” is a method and so it is accessed using “.” and not “::” (as can be seen in the example below) | 2011-01-25 | Actually, you can do both,,, | |
188 | SUGGEST | Fred Flintstone is a character from a show with (at least in the original series) not-so-modern stone age families where the men work, and the women are housewives. I just watched Dave Thomas’ Ruby Conference 2010 talk. If you would like to encourage women to be programmers, should you be retiring the Flintstones to pre-history? I also suspect that there’s more fictional male programmers than fictional female programmers in the PragProg series of books, but I haven’t checked. That’s accurately describing the status quo, but is it also endorsing it? | 2011-01-25 | Actually, I consciously try to alternate hims and hers. I don't always do it right, but the intent is there. However, I also won't put in (say) "he or she"—the fact we're lacking pronouns is unfortunate, but I'm \n \nI don't think anyone could claim that Fred Flintstone is a positive role model... \n \nDave | |
598 | SUGGEST | Is Wilma saying “Charge it!” somewhat stereotypical? | 2011-01-25 | Yes, but it's what she said... :) | |
246 | TYPO | Is “There’s nothing like a cheating coed teaching code.” appropriate humor? | 2011-01-25 | Exactly what do you find inappropriate about this? \n \n | |
100 | TYPO | First paragraph in 6.1 is missing a closing parenthesis after 2^62-1 | 2011-04-12 | ||
392 | TYPO | line 5-6: “initialize_cloneinitialize_copyinitialize_dup” is not a method. (Maybe a bug, rather than a typo…) | 2011-04-12 | ||
53 | TYPO | The last line of the example output shows “4 tests, 6 assertions”, but the final sentence of the following paragraph reads “The results show that five test methods ran, successfully executing five assertions.” | 2011-04-12 | ||
59 | TYPO | The last line on the page, describing how a method name can be passed to inject, is flagged with 1.9, but the examples also work in Ruby 1.8.7. | 2011-04-12 | ||
376 | OK | “There’s a wrinkle to when it comes to method definition and class inheritance” sounds very awkward. Maybe drop the word “to”. | 2011-04-12 | Must be my English background, but it sounds OK to me... | |
739 | ERROR | Clicking in the sidebar on the Time entry for the Built-in Classes section takes you to the Time entry in the Standard Library pages. | 2011-04-12 | ||
99 | OK | I do not know which “Version of Book” I’m reading, I don’t know where I can get this information from. In the first example for mixins the printed example and the downloaded file do not match completely. In the downloaded file you have a second Module “D” which implements the initialize and to_s functions. Futhermore you’ve only written (in both, the book and file): ph.who_am_i? instead of puts ph.who_am_i? hence when you execute the downloaded file (as is) you get an empty output. | 2011-04-12 | ||
49 | OK | On this page, as part of the example for array a, the following lines are given a[1, 1] = [ 9, 8, 7 ] -> [1, 9, 8, 7, “dog”, “cat”, 9] These lines are wrong and should be Have a nice day :D | 2011-03-15 | I believe the example is correct | |
267 | TYPO | “Additionally, Ruby detects any files that start with a UTF-8 byte order mark (BO).” | 2011-04-12 | ||
71 | OK | The compact version of iterating through the top_five should be top_five.map { |word, count| puts “#{word}: #{count}” } | 2011-04-12 | It is correct as it is... | |
535 | ERROR | The "" method's description states that two Hashes are considered equal if, along other conditions, they have the same default value.
I did not find this in the documentation of Hash itself and checking on both ruby 1.8.7 and 1.9.2 I get this:
Hash.new(1) Hash.new(2) # => true | 2011-04-12 | Indeed, this was removed in in later 1.9 interpreters. | |
526 | OK | You mention Class constants for floating point types and you go on to describe the ROUNDS constant stating But nowhere is it mentioned how you would go ab out setting those constants. Might be helpfull (to me :)) if you did. | 2011-04-12 | You can't set them—they're constants, set by the environment in which you run. | |
149 | OK | I’m going to make this an “error” instead of a suggestion because I feel it is rather critical. The description of the if and unless statement needs to define what is returned if the condition is not met and there is no else clause. Or, to rephrase, what does the “if” statement return if the condition is false and there is no else part. e.g. dog = if false It appears the answer is “nil” based upon my experimentation but it would be nice to know for sure what the language defines. A more everyday example: def whaky a[0] is returned if a is not empty but what is returned if a is empty? This sort of construct is seen fairly often. | 2011-03-15 | To be honest, I don't know if it is defined. nil sounds plausible, but that might just be an implementation choice rather than a language specification. | |
474 | ERROR | second example usage of chunk with a state parameter is missing the closing parentheses ‘)’: | 2011-04-12 | ||
712 | ERROR | header lines for methods to_c, to_f, and to_r have the result types mixed up: for example, the entry for to_c claims that the result is float instead of complex | 2011-04-12 | ||
16 | TYPO | In the command-line formatting example, shouldn’t the words progname and arguments be in italics? | 2011-04-12 | ||
27 | TYPO | The section heading “Source code from this book” is between 1.2 and 1.3 and has no number. On page 24, it’s referred to as “skip forward to Section 1.2, Source Code from This Book, on page 27”. | 2011-04-12 | ||
102 | TYPO | 6.times example on page 100. The example is 5.times | 2011-04-12 | ||
331 | SUGGEST | “The value of a parallel assignment is its set of I don’t think you mean class Set. Perhaps “… is an array containing its rvalues.” ? | 2011-04-12 | ||
482 | ERROR | The doc line for Enumerable#minmax_by shows: | 2011-11-03 | ||
481 | ERROR | The doc line for Enumerable#min_by shows a two-argument block. Like #max_by, it should be a single arg. | 2011-11-03 | ||
747 | ERROR | In 1.9 the Time#to_s method doesn’t return in the format as outlined in the book: it “ouput of #to_s is different in 1.8 and 1.9” do Failure/Error: time.to_s.should eql(‘Wed Nov 10 01:46:27 +0100 2010’) ruby -e ‘puts Time.at(1289349987).to_s’ # should return “Wed Nov 10 01:46:27 +0100 2010” ‘correct’ in : - ruby-1.8.7-8378 - jruby-1.5.3 ‘failed’ in: - ruby-1.9.1-p378 - ruby-1.9.2-p0 From the rubydoc ruby-doc.org/core/classes/Time.html Returns a string representing time. Equivalent to calling Time#strftime with a format string of Time.now.to_s #=> “2007-10-05 16:09:51 +0900” | 2011-11-03 | ||
201 | SUGGEST | The ts_spec.rb code listing seems to have lost the “basic scoring” parameter to the describe method. | 2011-11-03 | ||
212 | SUGGEST | “It’s a rapidly changing field, so we recommend a quick web search rather than rely on the advice here.” I think this should either read “…we recommend you do a quick web search…” or “…rather than relying on…” | 2011-08-30 | To my eye, the "you do" is implicit. | |
225 | ERROR | There appears to be an extraneous } at the end of the -i usage example. | 2011-11-03 | ||
227 | SUGGEST | “Overrides default name for TCL shared library or DLL.” The correct capitalization should be: Tcl. | 2011-11-03 | ||
270 | TYPO | “Sets the internal debug level to $n$.” Markup misformat? | 2011-11-03 | ||
310 | TYPO | First sentence under “Integer and Floating-Point Numbers” is missing a space after it. | 2011-11-03 | ||
344 | SUGGEST | “This is done by calling the method classexpr.allocate.” The method name ‘allocate’ probably should not be italicized. | 2011-11-03 | ||
344 | OK | “If a class definition overrides the class method new without calling super, no objects of that class can be created, and calls to new will silently return nil.” I’m not sure that’s entirely accurate, since objects can be created with classexpr.allocate. They can’t easily be initialized by calling the initialize method, however, because that method is normally private. | 2011-09-19 | True 'nuf, but calling allocate directly is something of a pathological case :) \n \nIn the text, the emphasis was really the other way—if you override +new+, you should remember to call +super+. | |
346 | SUGGEST | “Although include is useful for providing mixin functionality, it is also a way of bringing the constants, class variables, and instance methods of a module into another namespace.” This sentence seems redundant and confusing. Doesn’t bringing constants, class variables, and instance methods into another namespace exactly describe the mixin functionality? | 2011-11-03 | ||
349 | TYPO | “The returned is the value (or values) passed to next, or nil if no values are passed.” Should be “The value returned…”? Or “The return value…”? | 2011-11-03 | ||
433 | ERROR | Method count: “Returns an Enumerator if neither an argument nor a block is given (which seems strange…).” This doesn’t appear to be accurate. The return value instead appears to be a count of all objects in the array (same as length). | 2011-11-03 | ||
799 | TYPO | In fixing erratum #46074, there’s a new typo: mixon instead of mixin. Also, please add the word “parent” before the word “class” in each of the next two sentences. This makes it match the list of three ways in the previous sentence. | 2011-11-03 | ||
140 | TYPO | The subtitle on this page reads “for … fn” while I believe it shoule read “for … in” | 2011-11-03 | ||
746 | ERROR | Figure 27.17 does not include the %z (note lowercase) directive. Yet this is what is actually used in time.to_s as incorrectly described on p 747, and corrected in the errata for p 747. | 2011-11-03 | ||
343 | OK | I think “A classname with a leading scope operator places that class or module in the top-level scope” should read “A classname without a leading scope operator places that class or module in the top-level scope” | 2011-11-03 | It's correct as it stands. If you define \n \n class ::Dave; end \n \nten Dave will be placed at the top level, regardless of where is it defined. | |
139 | SUGGEST | “just about everything is an expression” - everything or nearly everything? What are the exceptions? | 2011-09-19 | I think it would disrupt the flow to go into technical details here—it would involve introducing a lot of things that are forward references. | |
148 | OK | A range such as exp1..exp2 will evaluate as false until exp1 becomes true. The range will then evaluate as true until exp2 becomes true. — second sentence first true should be false | 2011-09-19 | I believe it is correct as it stands. | |
73 | 73 | OK | The Fibonacci sequence is wrong. Should be 0, 1, 1, 2, 3, 5 …. | 2011-09-19 | AGreed, but I can live with the 1, 1 version... :) |
176 | OK | Fibers can be resumed only in the thread that created them. | 2011-09-19 | A forward reference of a page... :) | |
68 | OK | ugly_word_count.rb listing, line 4: raw_text is an array due to the use of %w{}, which results in ‘undefined method ’downcase’ for Array’ error. | 2011-09-19 | There's not %w in the text. | |
326 | OK | 8th line of the top of the page a.get_var # => “top level variable” | 2011-11-03 | The output in the book is correct. It's all part of the mess that are @@ variables in Ruby. | |
703 | TYPO | Very last line on the page: sym.to_s should return a value. | 2011-11-03 | ||
28 | ERROR | > Exit an irb session by typing exit or by using On Windows, the end-of-file character is Ctrl+Z but you have to use Ctrl+D to exit irb. | 2011-11-03 | ||
295 | TYPO | Missing quotation mark after path to ruby.exe. Currently: Should read: | 2011-11-03 | ||
25 | ERROR | They’ve changed the location of the rvm installation scripts. You can add -L to the curl command to follow the redirects, or go to the beginrescueend.com/rvm/install page and get the updated links from there. | 2011-11-03 | ||
122 | TYPO | On page 122 (print4), the backslash sequence with a grave accent ( \\`) uses in fact the Unicode character (\\u2018, LEFT SINGLE QUOTATION MARK) instead of the character \\u0060 GRAVE ACCENT (also supported in ASCII-7BITS). Both characters look almost identical but the Ruby interpreter treats them differently. Obviously, this is not an issue for the paper version. However, if one wants to copy-paste the backslash sequence directly from the pdf file to a Ruby source file, this will result in an error. | 2011-11-03 | This is an artifact of our typesetting system—in body text, it maps backquotes to the unicode variant. I'm afraid we'll have to live with that. | |
173 | ERROR | In the HTTP code example there is an incorrect part of the path in the parameter given to the get method. The http.get(‘/titles/ruby3/programming-ruby-3’) will return a message of “Moved Permanently”. The path should read ‘/book/ruby3/programming-ruby-3’ or I also discovered that ‘/book/ruby3/programming-ruby-1-9’ works. | 2011-11-03 | ||
1 | TYPO | Title page says “Updated for Ruby 1.9.2” in the top right corner. Should say “…1.9.3” now. | 2012-07-13 | ||
553 | TYPO | s/8BUT/8BIT/ | 2012-05-09 | ||
442 | TYPO | Examples for repeated_permutation say “repeated_combination” instead of “repeated_permutation”. | 2012-05-08 | ||
696 | TYPO | In the definition of the String#[] method, this: “If a name follows the regular expression, the corrsponding named match is returned” should read as: “If a name follows the regular expression, the corresponding named match is returned” | 2012-05-09 | ||
647 | ERROR | The description of the sleep method says “An argument | 2012-05-09 | ||
190 | OK | In the sentence after the heading “Assertions == Expected Results”, there is a missing word “a” before the word “series”. It should read, “Rather than have you write a series of individual if statements …”. | 2012-05-08 | Actually, I meant multiple series.... | |
660 | TYPO | In the description of the daemon method, first sentence, parenthetical expression, you have misspelled setsid. You have Process.setssid instead of Process.setsid. | 2012-05-09 | ||
7 | TYPO | In “The Socket API” in the last sentence on page 7, the word “local” is misspelled as “locat”. | 2012-06-21 | ||
464 | TYPO | The return type of Complex#to_i should be integer. “complex.to_i -> float” should be “complex.to_i -> integer” | 2012-05-08 | ||
473 | TYPO | “Encoding.find(name) \\returnsenc” should be “Encoding.find(name) -> enc”. | 2012-05-09 | ||
522 | TYPO | In File::Stat#world_readable?, “File.world_readable?(filename) -> …” should be “statfile.world_readable?(filename) -> …”. The examples are also “File.world_readable?(…” should be “File.stat(…).world_readable?”. There are the same typos in File::Stat#world_writable?. | 2012-05-09 | ||
78 | ERROR | The line `triangular_numbers = Enumerator.new do |yielder|` is not correctly indented. | 2012-05-08 | ||
189 | OK | cool book, I really like it but count.times { roman << code } because if I write r = Roman(1) | 2012-02-27 | (as I show two pages on... it's a deliberate mistake) | |
710 | ERROR | The documentation for String#ord states in part “Note that it isn’t quite the inverse of\tInteger#chr, because the latter does not deal with encodings.” However, Integer#chr does take an Encoding argument. So, for example, assuming UTF-8 encoding, “ありがと”.ord.chr(Encoding::UTF_8) should == “あ”. The argument to chr would be unnecessary if the -U command line option were given. | 2012-05-09 | ||
529 | TYPO | “flt obj \\returnstrue or false" should be "flt obj -> true or false” | 2012-05-09 | ||
456 | ERROR | (This might be more of suggestion for clarifying the content.) In the description of the Binding class, the text says: “The variables, methods, value of self, and possibly an iterator block accessible in this context are all retained.” That sounds like you can access the methods as they were where/when the binding is created, which is not necessarily the case. If the example Demo class were originally defined with a `:hullo_world` method that is modified by re-opening the class definition after setting `b1 = k1.get_binding` (`b1 = …` is from your example), running `eval ‘hullo_world’, b1` would use the new definition of :hullo_world. Or if `:hullo_world` were only added to the class after the binding is created, running `eval ‘hullo_world’, b1` would still use the new definition of `:hullo_world`. Does that make sense? …It’s really the scope where the binding is made that is retained and not necessarily all the items available at that point. Unless I’m misunderstanding everything! Send me a quick email if that’s the case so I know? Thanks! Scott | 2012-05-08 | I changed it to say "access to the....": | |
536 | OK | Hash.[] has an important third form, which is not documented here: Hash[ [ [key, value], … ] ] → new_hash see www.ruby-doc.org/core-1.9.3/Hash.html#method-c-5B-5D | 2012-05-09 | Their example is actually \n \nHash[ [ [ 1,2], [3, 4] ] ] \n \nThey are passing a single array argument, whose .to_hash method is then called | |
554 | TYPO | “File.new(…” should be “IO.new(…” | 2012-05-09 | ||
355 | 355 | OK | (which must start on the same source line as the last line of the method call) i think phehaps fixed to: (which must start on the same source line as the last argument of the method call) | 2012-05-08 | I think that's also a little suspect, given the last argument can span multiple lines. I think the meaning is clear. |
157 | SUGGEST | Dave, Your use of caller[1..–1] deserves more explication elsewhere in the book so that users will learn to use range i..-j in array element reference. Use of –1 to mean the final array index is useful and important. You have introduced array indices that were negative, and ranges a..b with a and b negative and a<b, but I don’t see any explicit explanation of array[i..j] with i being positive and j negative. Nor do I see it covered in the Range or Array class documentation. In the Range documentation, one might think that 0..–1 never yields. And puts (0..–1).to_a.inspect doesn’t help one to learn this special case. Love your book. Best wishes. Walter. | 2012-02-27 | I think I'm happy the way it is—the two elements of the range are independentRuby is simply using the range in this instance as a way of packaging two numbers. | |
137 | OK | mid-page. Regarding ||=, it seems to me that the assignment does take place when the variable was already set to nil or false. I am using ruby-1.9.3-preview1. | 2012-05-08 | By set, it means not a false value (nil or false) | |
106 | OK | mid-page. The book gives the result of show_regexp(string, /\\p{Greek}/) as the pi character, whereas the first delta character matched for me. Perhaps it depends on the unicode code point of the delta character actually entered in the string? | 2012-02-27 | It does indeed. | |
41 | TYPO | The example of a while loop has a combination of conditions and init values that will not allow a single iteration. I suppose, either num_pallets should be preset to 1 instead of 101 or the limit should increased from 30 to 300. Original code below: num_pallets = 101 | 2012-05-08 | ||
614 | OK | define_singleton_method : obj.define_method => obj.define_singleton_method | 2012-05-09 | I can't find this | |
370 | TYPO | Sentence at end of fifth paragraph, “The Kernel module does defines puts” should read “does define puts.” Define not defines. | 2012-05-08 | ||
624 | ERROR | singleton_method_added, singleton_method_removed, and singleton_method_undefined appear to be inherited from BasicObject. | 2012-05-09 | ||
455 | SUGGEST | BasicObject ! method: in sentence “Returns false unless obj is false”, I believe you meant the second ‘false’ to be in Roman font, being false or nil. | 2012-05-08 | ||
613 | OK | additional (Kernel public) instance methods: | 2012-05-09 | These are documented | |
623 | SUGGEST | additional Object private instance methods: | 2012-02-27 | There are a few methods such as these that I choose to ignore because they are basically intended for the implementors, and not the rest of us folk. | |
456 | ERROR | Is BasicObject method_missing a private instance method and should not have a receiver? | 2012-05-08 | ||
588 | TYPO | Module class_variable_set: “Returns” should be “Sets”. | 2012-05-09 | ||
589 | TYPO | Should Module const_missing show a receiver, since it seems to be a public instance method, though Ruby might only invoke it on self? | 2012-05-09 | ||
592 | TYPO | Module module_eval: mod.class_eval(…) should be mod.module_eval. | 2012-05-09 | ||
461 | OK | Isn’t Class.inherited an instance method (of class Class) not a class method: Class#inherited, cls.inherited? | 2012-05-09 | Unless I'm looking at the wrong place, it is listed as a private instance method | |
478 | OK | additional Enumerable public instance methods: | 2012-05-09 | These are documented in the later printings and ebooks | |
482 | SUGGEST | Enumerable.inject: suggest adding the (5..10).inject(:*) example (as from page 60). | 2012-05-09 | ||
483 | TYPO | Enumerable.none?: the parenthesized clause copied from .any? needs to be fixed for .none? . | 2012-05-09 | ||
488 | OK | additional Enumerator public instance methods: | 2012-05-09 | These are documented | |
439 | SUGGEST | some additional Array public instance methods (some seem to override Enumerable): | 2012-02-27 | I chose not to document these, as they are (to the best of my knowledge) simply an implementation detail. They act as if they were the enumerable versions | |
295 | TYPO | Trailing ‘}’: | 2012-05-08 | ||
539 | OK | IO::foreach : io.foreach should be IO.foreach. | 2012-05-09 | I can't find this | |
274 | OK | In .irbrc file | 2012-05-08 | The prompt you type on the command line is converted.... | |
508 | TYPO | File: I don’t think lchmod and lchown are presently instance methods though they are class methods. | 2012-05-09 | ||
349 | OK | “The first two styles of Proc object are identical in use. We’ll call these objects raw procs. The third and fourth styles, generated by lambda and ->, add some functionality to the Proc object, as we’ll see in a minute.” There are only three styles mentioned (Proc.new, lambda and ->) | 2012-05-08 | See the previous page—there's also passing a block to a method with an ampersand parameter | |
660 | TYPO | The documentation for Process.daemon refers to the daemon(2) system call but it appears to be daemon(3). The link in the pdf results in an unsuccessful search. | 2012-05-09 | ||
540 | TYPO | default_proc= Should be: | 2012-05-09 | ||
545 | TYPO | for select! - the description should say “hsh” not “arr”. | 2012-05-09 | ||
632 | TYPO | The Object#untrusted? method signature; “obj.untrusted -> true or false” should be “obj.untrusted? -> …” | 2012-05-09 | ||
182 | TYPO | Paragraph beginning “We create 10 threads…” - fourth sentence (“The reason is that…”) in a tangle. “Continue” misspelled in third from last sentence. Possessive ‘its’ with apostrophe in sentence following. | 2012-05-08 | ||
858 | TYPO | In the 2nd line of tk library description, “~” between “OS” and “X” should be a space; “Window, Linux, Mac OS~X, and other …” should be “Window, Linux, Mac OS X, and other …”. | 2012-05-09 | ||
333 | ERROR | In “Ranges in Boolean Expressions,” the account of the flip-flop mechanism does not tally with the samples (which do agree with the output from IRB). Also, the subheading reads “if expr1 .. expr1 / while expr1 .. expr1” rather than “if expr1 .. expr2 / while expr1 .. expr2.” Though the following may be clumsily written compared to the rest of the book, it does at least describe what actually happens: #Ranges in Boolean Expressions \tif expr1 .. expr2 A range used in a boolean expression acts as a flip-flop. It has two states, set and unset, and is initially unset. In the three-dot form, when the condition is executed and the flip-flop is unset, Ruby checks the truth of expr1. If true, the flip-flop becomes set and the condition returns true. When the condition is executed with the flip-flop set, Ruby checks the truth of expr2. If false, the expression returns true and the state of the flip-flop remains set. If, on the other hand, expr2 returns true, the condition still returns true but the flip-flop is unset. The two-dot form works the same way, except that the state of the flip-flop does not change from unset to set if expr1 is true but expr2 is also true. | 2012-05-08 | ||
347 | OK | Just a guess, but is “…same logical line as the end of the invocation” supposed to be “same lexical line”? Hope so, cos if not I’m missing something. | 2012-05-08 | I meant it in the sense of "logically on the same line" as it could in theory appear after a \\ on the next line. I agree lexical line is more accurate, but I think it's also more confusing. I changed it to "logical source line" | |
364 | ERROR | Page 364 implies that: names = %w{ant bee cat} only works on 1.9, this seems to work on 1.8.7 also. | 2012-06-21 | ||
910 | OK | The index entry for the “Set” class reads something like Set class: 430-433, 839 However, the Set class is only documented on page 839; the earlier pages are about the Array class. | 2012-07-13 | This one's a close call—the index entries point to set operations performed within the array class. I think I'll leave it as it. | |
62 | OK | String example is confusing if you assume that Strings are mutable, as they are in Java. Might want to mention this difference. | 2012-06-21 | Ruby strings are indeed mutable. | |
503 | TYPO | It says that File.fnmatch is an alias for Dir.fnmatch. Did you mean Dir.glob? Dir.fnmatch does not exist. | 2012-06-21 | ||
210 | SUGGEST | In figure 14.3, the description of the ‘where’ command uses the term “stack frame” where the term “backtrace” (or perhaps “call stack”) seems more accurate. | 2012-06-21 | ||
382 | TYPO | (from Programming Ruby 1.9 (3rd edition) > attr_accessor should be an instance method in Module) It should be a private instance method | 2012-07-06 | ||
20 | TYPO | The example for accept_loop has nothing to do with accept_loop and is, in fact, the same as the example for getaddrinfo | |||
26 | TYPO | Note: this erratum is only for the Socket Library appendix, though the report link directs here. the ipv6only! method is misspelled in different ways in the heading and the signature (a - is invalid and it has no _), though the source is accurately reprinted | |||
68 | OK | Chapter 7 , ugly_word_count.rb This is meant to show the top 5 most frequent words, but the loop attempts to iterate 6 times, causing an error because the last time it encounters a nil value in the hash. for i in 0..5 should be for i in 0..4 This error is repeated at the start of section 4.3 on pdf page 70 | 2012-07-06 | There are three dots in the range, so it runs from 0 to 4 | |
33 | SUGGEST | At the end of the paragraph describing instance methods is the following sentence: “If the variable my_way referenced a particular Song instance, you’d be able to call that instance’s play method and play that song”. There is no other mention or use of a ‘my_way’ variable nearby and so I was momentary confused, thinking I had missed something (perhaps I still am). I think the sentence could just read: “If a variable referenced a …” | 2012-07-13 | ||
721 | ERROR | Margin alignment is erratic in the PDF. In a quick check, this appears to be pervasive throughout the entire document, impacting even vs. odd pages. Presumably this is an artifact of margin offsets for bound printing that’s crept into the PDF. Other Pragmatic PDFs don’t exhibit this and it’s visually distracting in the PDF rendering. I have an illustrative screenshot, but the errata apparently don’t allow links. Contact me directly as needed for more information. | 2012-07-24 | ||
811 | SUGGEST | Please bring back the per-letter sections of the PDF table of contents for the index. In P4.1 the Index section of the PDF had an expandable table of contents with sections A, B, C, etc. It made it a lot faster to look things up in the index. With P4.2 I have to start at the top of the index and scroll down. Not fun when I’m looking for zero? or the like. | 2012-07-14 | They'll be in the next release. I hadn't realized that _none_ of our titles had this since we moved to the new toolchain, so thanks for pointing it out. | |
411 | SUGGEST | For the Library Reference chapter it is the same as for the index: Please bring back the subsections in the PDF table of contents (which were there in P4.1). Otherwise I have to scroll through the whole library reference (or at least through the alphabetical listing in the beginning of it) when I want to look up a specific class. | 2012-07-14 | It'll be back in the next release | |
24 | TYPO | Near the top of page 24, there is an example following the statement: Similarly, num_pallets = 101 Since the point of a while statement is obviated if the condition is never true, it is obvious that something is wrong with either the initial value of 101 for num_pallets or the value of 30 that it is tested against. Since the body of the while statement increases num_pallets on every loop, it’s possible that the test value was meant to be 130 or some other value that allows the while statement to be entered (eg, not less than 101). Or possibly the comparison operator was meant to be >= (although that condition won’t ever fail so it’s of no value). Checking my old copy of Programming Ruby, I see that the while statement has been transferred without change from the original and only the lines providing initial values for weight and num_pallets have been added. So probably the initial value of num_pallets was not meant to exceed 30 — 10 and 11 are plausible values (and 1 a slim possibility) if 101 is a typo. In any case, for this while statement to be plausible, then both weight and num_pallets should pass the initial condition and conceivably either variable could fail its test condition first. Since the weight of the pallets might be anything, I suspect that a theoretical weight of approximately 5 pounds and a probable cycle of 19 or 20 loops provide the inconsequential back-story to this example, making both 10 and 11 suitable starting values. Personally, I would set the test condition at a smaller value than 30 — maybe 5 or 10 (30 pallets seems like too large a number to be carrying around, whatever it is that’s stacked on a pallet) and the initial value at 1. Then the example seems like a plausible algorithm for stacking pallets on a forklift — don’t exceed this weight or this number, but go as close as you can to the maximum — and consequently a real case for using a while statement. In any case, what a wonderful book this is! Thanks! | 2012-07-20 | ||
411 | ERROR | In “Part IV—Ruby Library Reference”, the PDF index no longer lists each class/method, as in previous versions. | 2012-07-17 | ||
207 | TYPO | Section 15.1 Command-Line Arguments - In-place Editing: There’s a line that reads: “This all means that if you can a Typo? | 2012-07-20 | ||
1 | OK | The Table of Contents for the PDF no longer contains any details. Here are 2 images showing the change in styles. Previous style: dl.dropbox.com/u/14483515/Screenshots/previous.png New style: dl.dropbox.com/u/14483515/Screenshots/new.png | 2012-07-24 | Tjis was fixed a few days ago. Try downloading from our site again. | |
110 | SUGGEST | At the end of chapter 7.4, please put in a reference table that has all the known patterns. If I need to decode a regular expression, I need such a table. It should include all the (?x expressions, all the \\x classes, etc. | 2012-07-24 | It's in the language reference chapter. | |
92 | ERROR | I believe that the second example should assume another value like 9.5, for example. Assuming 5.2 will not trigger the else clause. | 2012-07-24 | Good catch! | |
308 | SUGGEST | Please follow the discussion here: bugs.ruby-lang.org/issues/6810 to see how it turns out. For me, this is a rather fundamental change in how I view A::B and what it actually does. | 2013-02-20 | ||
370 | OK | I do not get the expected output (“Dave lives in Texas and likes Programming Languages”) for the example in the page. 1.9.3p194 :005 > class Person < Struct.new(:name, :address, :likes) ’ | 2013-02-20 | Looks like you already had a Person class defined | |
83 | OK | third last line should be | 2013-02-20 | I believe it is correct as it stands | |
811 | OK | The index entry for %{…} takes me to 298 but it should take me to the table on page 296. I have a hard time using the book as a reference guide. If possible, please consider the experienced programmer needing to look up things quickly. | 2013-02-20 | It takes you to 298 because that is the specific use of %{...} | |
224 | OK | test in book is: context “specifying words and a dictionary” do should it not read: context “specifying words and a dictionary” do | 2013-02-20 | I believe it is correct as it stands | |
145 | OK | In the first example of 10.4 catch and throw (bottom of page), you have; puts result.reverse Should that not be; puts result.sort.reverse | 2013-02-20 | I think it is OK—it prints the words in the reverse order to that in which they were added. | |
154 | SUGGEST | 11.5 Parsing HTML The Hpricot GEM is no longer maintained (github.com/hpricot), perhaps this section should be updated to use an alternative, or removed. | 2013-02-20 | ||
529 | TYPO | Under the documentation for IO.binwrite, it says: “options is an optional hash used to pass parameters to the underlying open call used by read.” Should “read” be “write”? | 2013-02-20 | ||
545 | ERROR | IO#set_encoding takes an options argument for specifying encoding behavior. | 2013-02-20 | ||
157 | TYPO | In the “Creating Ruby Threads” section, the first example iterates over the “page” variable when it should uses “pages” as defined earlier. | 2013-02-20 | ||
350 | TYPO | In the first line of the last paragraph, change “practic” to “practice”. | 2013-02-20 | ||
232 | TYPO | In the parenthetical sentence about half-way down the page, remove the comma from “another, significant use”. | 2013-02-20 | ||
50 | SUGGEST | The use of the exclusive range operator had me thinking there was a typo/off-by-one error. After messing with it in irb, I understand how it works. a quick mention of this might be helpful (although I sympathize that it’s hard to talk about one subject without dragging in all these other things you haven’t covered yet). | 2013-02-20 | ||
742 | ERROR | In the description for Time.local, the text reads: “The second form accepts ten arguments . . .” The ten argument form is actually the first form shown just above. | 2013-02-20 | ||
163 | OK | The hypothetical currency converter example, the ensure clause must be inside a begin… end. begin | 2013-02-20 | It's OK as it stands—method bodies are automatically exception handlers. | |
60 | OK | In general the path:“samples” is wrong, dont exist in the zip file. In this case: samples/book_in_stock.rb the correct path is: code/tut_classes/stock_stats . You must correct the zip file changing ‘code’ for ‘samples’ or correct the wole book. | 2013-02-20 | I don't see this in my edition | |
562 | OK | IO#gets describes behaviour for a negative limit argument that MRI does not adhere to and is not mentioned in online rubydoc or tested in rubyspec | 2013-02-20 | I believe however that the book is correct: \n \n rb_io_getline_1(VALUE rs, long limit, VALUE io) \n { \n VALUE str = Qnil; \n rb_io_t *fptr; \n int nolimit = 0; \n rb_encoding *enc; \n \n GetOpenFile(io, fptr); \n rb_io_check_char_readable(fptr); \n if (NIL_P(rs) && limit < 0) { \n\tstr = read_all(fptr, 0, Qnil); \n\tif (RSTRING_LEN(str) == 0) return Qnil; \n } \n else if (limit == 0) { \n\treturn rb_enc_str_new(0, 0, io_read_encoding(fptr)); \n } \n else if (rs == rb_default_rs && limit < 0 && !NEED_READCONV(fptr) && \n rb_enc_asciicompat(enc = io_read_encoding(fptr))) { \n\tNEED_NEWLINE_DECORATOR_ON_READ_CHECK(fptr); \n\treturn rb_io_getline_fast(fptr, enc, io); \n } \n | |
833 | TYPO | Index entry for “return” has “The ii tag should not be here.” Looks like an error from the index generator. | |||
9 | ERROR | Website for RVM lists old one: beginrescueend.com instead of new one rvm.io | |||
818 | TYPO | The order of the modules in the Standard Library chapter in P4.0 goes OpenSSL (pg 815), OptionParser (pgs 816-817), OpenStruct (pg 818). I’m pretty sure OpenStruct and OptionParser should be switched! I’m not sure if this has been fixed in newer releases since I don’t have them. | |||
99 | TYPO | show_regexp(a, /[\\d\\ Actually this returns “no match” because the regex is looking for a digit followed by a dash which the string does not have. I’m guessing the \\d should be dropped. | |||
48 | TYPO | On Page number 48, you’ve given an example of each where ‘e’ is shown. BTW: each excludes last thing. | |||
38 | ERROR | inst_section={ this code in the end of pdf-page #38 raise error in my irb(windows 7, ruby 1.9.3): please give me some feedback on e-mail: warnabas@gmail.com | |||
797 | ERROR | In the Tsort example the dependencies var in the example needs to be a: @dependencies = Hash.new {|h,k| h[k] = []} The last add_dependency in your example overrides the previous one without this. I’m doing this from memory so I hope I’ve gotten the details correct! | |||
730 | TYPO | CSV (STDOUT, col_sep: "|") do |csv| | |||
124 | ERROR | The text reads, “You can place key => value pairs in an argument list, as long as they follow any normal arguments and precede any splat and block arguments.” In Ruby 1.9.3p448, I tested this. It appears that the appropriate order for arguments is as follows: 1) Regular, 2) Default, 3) More Regular, 4) Splat, 5) Key-Value Parameters, 6) Block. Therefore, key-value parameters must be specified last before a block. | |||
140 | TYPO | Recardin the previus commmenters corexion, “shoule” should be spelt “should”. :) | |||
569 | TYPO | In the description of IO#read_nonblock(), book says “the call may return EAGAIN and EINTR errors”. Rather than saying ‘return’, a better way would be to say it ‘raises EAGAIN and EINTR’ or even ‘raises Errno::EAGAIN and Errno::EINTR’ |