[#2617] irb for 1.5.x — Andrew Hunt <Andy@...>
5 messages
2000/05/03
[#2639] OT: Japanese names — Dave Thomas <Dave@...>
4 messages
2000/05/09
[#2643] Ruby Toplevel — Dave Thomas <Dave@...>
7 messages
2000/05/09
[#2656] Re: Append alias for Array.append? — Aleksi Niemel<aleksi.niemela@...>
Hideto ISHIBASHI:
5 messages
2000/05/09
[#2660] win OLE / eRuby — Andrew Hunt <Andy@...>
8 messages
2000/05/09
[#2663] Re: win OLE / eRuby — Aleksi Niemel<aleksi.niemela@...>
>At Tue, 9 May 2000 09:14:51 -0400,
4 messages
2000/05/09
[#2667] The reference manual is now online — Dave Thomas <Dave@...>
6 messages
2000/05/09
[#2668] Re: The reference manual is now online — schneik@...
4 messages
2000/05/09
[#2702] Re: Append alias for Array.append? — Andrew Hunt <andy@...>
>From: Aleksi Niemel<aleksi.niemela@cinnober.com>
7 messages
2000/05/10
[#2752] RE: Array.pop and documentation [was: Append al ias for Array.append?] — Aleksi Niemel<aleksi.niemela@...>
6 messages
2000/05/11
[#2758] Re: irb install — Andrew Hunt <andy@...>
>|Excellent! Will you consider adding mod_ruby to install_app as
7 messages
2000/05/11
[#2777] Re: irb install
— "NAKAMURA, Hiroshi" <nakahiro@...>
2000/05/12
Hi,
[#2764] More code browsing questions — Albert Wagner <alwagner@...>
I see some class definitions contain "include" and "extend" statements.
6 messages
2000/05/12
[#2843] Re: editors for ruby — "Conrad Schneiker" <schneiker@...>
(Posted on comp.lang.ruby and ruby-talk ML.)
6 messages
2000/05/17
[#2874] RE: simple httpd for local use — Aleksi Niemel<aleksi.niemela@...>
> I personally use it for access to full-text indexed linux
6 messages
2000/05/18
[#2875] Re: simple httpd for local use
— hipster <hipster@...4all.nl>
2000/05/18
On Thu, 18 May 2000 09:10:28 +0200, Aleksi Niemelwrote:
[#2920] SWIG: virtual variable? — Yasushi Shoji <yashi@...>
hello,
4 messages
2000/05/22
[#2928] FYI: What our Python friends are up to. — "Conrad Schneiker" <schneiker@...>
Hi,
8 messages
2000/05/22
[#2964] Thank you — h.fulton@...
Thanks, Matz (and others) for your replies to
4 messages
2000/05/24
[#2973] Re: Socket.getnameinfo — ts <decoux@...>
>>>>> "D" == Dave Thomas <Dave@thomases.com> writes:
10 messages
2000/05/25
[#3016] rbconfig.rb — Dave Thomas <Dave@...>
5 messages
2000/05/28
[#3039] Re: Final for World Series: Python vs Ruby — "Dat Nguyen" <thucdat@...>
1 message
2000/05/30
[#3058] FailureClass? — Aleksi Niemel<aleksi.niemela@...>
Question arising from the FAQ:
7 messages
2000/05/31
[ruby-talk:03057] Re: dev.rubycentral.com
From:
Aleksi Niemel<aleksi.niemela@...>
Date:
2000-05-31 16:46:33 UTC
List:
ruby-talk #3057
> 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.