From: Jean-Pascal Billaud Date: 2011-07-24T05:57:24+09:00 Subject: Top level function definition gets in Kernel module? irb(main):001:0> def test_fun irb(main):002:1> end => nil irb(main):003:0> p Object.instance_methods.sort [...] singleton_methods", "taint", "tainted?", "tap", "test_fun", "to_a", "to_enum", "to_s", "type", "untaint"] => nil irb(main):004:0> p Kernel.methods.sort [...] "tainted?", "tap", "test", "test_fun", "throw", "to_a", "to_enum", "to_s", "trace_var", "trap", "type", "untaint", "untrace_var", "warn"] => nil So I understand that test_fun definition refers to the current class which is Object and is added to the instance_methods but I don't understand why this also appears in the Kernel module methods. Any ideas? Thanks, -- Posted via http://www.ruby-forum.com/.