Ryan D. wrote in post #1129771:
I have no idea what the one green line is supposed to represent.
Module is a class, not a module.
Yeah, I think that’s what the one green line is supposed to represent.
(I.e. the inverse relationship of a red edge.)
There is no class named “unknown”.
ENV is an instance, not a class.
Same with ARGF (tho it’s an oddity when you ask for its class).
Artem S. wrote in post #1129771:
“unknown”, ENV and ARGF were taken from http://ruby-doc.org/core-2.0/
If it is incorrect, I would expect for correction on the official
site at first.
That’s a bit of a presumptuous statement. Knowingly perpetuating known
bugs just because they’re on the “official” source doesn’t make them any
less buggy or incorrect.
As I understand it, “unknown” is the result of uncertainty in rdoc when
scanning combinations of C and ruby sources. If you’re taking
ruby-doc.org as the official info source, you’ll note that
http://ruby-doc.org/core-2.0/unknown.html doesn’t list any methods,
subclasses, inclusions, etc. It’s not a real thing. It’s also useless
information in the diagram, because “unknown” (with a small “u”) is a
variable which is undefined (even when you trick the parser into
acknowledging that it’s a variable – not a function – in the first
place.)
if false; unknown=42; end
unknown
#=> nil
Granted, the site does seem to list ENV as a class (it has a grey C
beside it), but you’ll note that in ruby:
ENV.class == Object
…and:
class X < ENV; end
#=> TypeError: superclass must be a Class (Object given)
class Y; include ENV; end
#=> TypeError: wrong argument type Object (expected Module)
Similarly for ARGF, but its class has a weird name.
The diagram seems to suggest that anything in the big green box can have
a red arrow head (“class a < b”), and anything in the big blue box can
have a blue arrow head (“include b”), with the slightly confusing
exceptions of Module and Class. But for unknown, ENV, and ARGF that
isn’t true. Correct, precise, or otherwise, their value in the diagram
is questionable.