> From: Aleksi Niemel > So here are the first five chapters, the latter half may come at some > distant future. And here are first part of the the rest (chapter 6 and 7.1): General notes: The "online html"-version didn't work. - You're not copying the whole credit list from the original FAQ. 6.2 You could add "Ruby does not have class variables (which sucks)." And if it doesn't suck, it would be nice to provide an explanation. - It would be nice if the code example comment is "# pseudo class variable F[0] with initial value 0" - And give an example how to use Hash as a pseudo class variable, since its cleaner than array. class Foo F = { "foo" => 0 } # pseudo class variable F["foo"] def foo F["foo"] += 1 puts F["foo"] end end 6.3 Even now I don't know the difference between class variable, class instance variable and instance variable. 6.5 "Methods which are defined..." should be separated to stand on its own (you could use the Note: -notation). 6.6 One could note that singleton classes are good when - one have to add attributes - wants to add methods so that it's very easy to make real subclass later 6.7 Add a line before the example: "Yes, it's possible. Here's the easy way:" - The two paragraphs after the example seem to be related with 6.6 instead of 6.7. 6.8 I'd like to see more complete example: class MyClass include Comparable @name, @legs = nil, nil attr_accessor :name, :legs def initialize(name, legs) @name, @legs = name, legs end def <=>(o) return legs <=> o.legs end end c = MyClass.new('cat', 4) s = MyClass.new('snake', 0) p = MyClass.new('parrot', 2) p c < s) # -> false p s < c) # -> true p p >= s) # -> true p p.between?(s, c)# -> true p [p, s, c].sort # -> [snake, parrot, cat] 6.12 Has different notation than the others: Q: ... A: ... Moreover the title "How can I define a class method?" is not the same as the question "What is the difference between defining a class method in the class definition and directly at the top level?" 6.13 Change 'included' to "ensures that a feature is never" loaded "more than once". Add "So you have to use load if you want code reloading and reloading dynamic libraries is not possible at all." 6.14 Give an example of "function-style" call. Give an example of "extend"ed object (some source code). 6.15 In 6.14 "A function form ... call" was called function-style call. I think there should be consistent naming. - It should be mentioned what are the cases where self *is* required. 7.1 The FAQ (sub)topics should be reordered everywhere but this case is worse than normally. Normal user hits "How do random number seeds work" way before "What does instance_methods(nil) return?" - The header should be changed to "What does Module_name.instance_methods(nil)..." or Module.instance_methods(nil)". - This whole subtopic could be deleted or it could point to http://www.rubycentral.com/ref/ref_c_module.html#instance_methods And it could be pointed that nil evaluates as false in boolean context.