I don’t
understand why this also appears in the Kernel module methods.
It doesn’t. The Kernel module and the Kernel object itself are two
different things.
Almost everything in ruby is an object. All objects inherit from
Object. Kernel is a class, but Kernel itself is also an object, so it,
like all objects, inherits from Object. Therefore, all instance methods
in Object are inherited by the Kernel object.
Note the circularity: Object includes the Kernel module, so all the
Kernel methods become instance methods of Object. As noted above, the
Kernel object inherits from
Object, so the Kernel object actually inherits all the instance methods
defined in the Kernel module.
By the way, the results you posted are not true for any recent version
of ruby (and I have no interest in what irb outputs):
VERSION = 1.8.6-p420
CMD = ~/.multiruby/install/1.8.6-p420/bin/ruby ruby.rb
taint
tainted?
to_a
to_s
type
taint
tainted?
test
throw
to_a
to_s
trace_var
trap
type
RESULT = pid 92571 exit 0
VERSION = 1.8.7-p352
CMD = ~/.multiruby/install/1.8.7-p352/bin/ruby ruby.rb
taint
tainted?
tap
to_a
to_enum
to_s
type
taint
tainted?
tap
test
throw
to_a
to_enum
to_s
trace_var
trap
type
RESULT = pid 92572 exit 0
VERSION = 1.9.1-p431
CMD = ~/.multiruby/install/1.9.1-p431/bin/ruby ruby.rb
taint
tainted?
tap
to_enum
to_s
trust
taint
tainted?
tap
test
throw
to_enum
to_s
trace_var
trap
trust
RESULT = pid 92573 exit 0
VERSION = 1.9.2-p290
CMD = ~/.multiruby/install/1.9.2-p290/bin/ruby ruby.rb
taint
tainted?
tap
to_enum
to_s
trust
taint
tainted?
tap
test
throw
to_enum
to_s
trace_var
trap
trust
RESULT = pid 92574 exit 0
TOTAL RESULT = 0 failures out of 4
Passed: 1.8.6-p420, 1.8.7-p352, 1.9.1-p431, 1.9.2-p290
Failed: