Alle martedÃ¬ 6 febbraio 2007, Neville F. ha scritto:
Neville F., http://www.getsoft.com http://www.surfulater.com
You can find the documentation you want with the command ‘ri require’.
rate, here’s a summary: if the filename has a .rb extension, require
as a ruby source file. If it has the extension typical of libraries on
system (for example, .so on unix or .dll on windows), it loads it as a
extension. If the extension isn’t specified, it tries adding the
to the filename, until it finds an existing file.
Regarding socket, I have a socket.so file located
in /usr/lib/ruby/1.8/i686-linux (This is on gentoo linux. I think other
distributions may have it on different paths. I don’t know about
This means that socket is a C extension. using require ‘socket’ will
I hope this helps