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/.