From: Lars Gierth Date: 2010-03-08T19:25:26+09:00 Subject: Kernel#autoload ignores custom monkey patched Kernel#require Hi, I'm playing with FakeFS and want to fake Kernel#require. That's working quite well now, but somehow Kernel#autoload doesn't recognize my custom #require. The documentation says that #autoload would try to load the file via Kernel::require, which is contradictory, as there's only Kernel#require. The following snippet doesn't print "foo/bar", as I would expect. module Kernel def require fn puts fn end end module Foo autoload :Bar, "foo/bar" end Foo::Bar Does anyone have an idea on this? Best regards, Lars -- Posted via http://www.ruby-forum.com/.