Thursday, April 4, 2013

What is the difference between 'load' and 'require' in Ruby?

'require' looks for the library in all the defined search paths and also appends '.rb' or '.so' to the file name. It ensures that the library is included only once.

'load' needs the full name of the library and it gets loaded each time you call.

No comments :