What is the difference between Kernel#require and Kernel#load?

Technology CommunityCategory: RubyWhat is the difference between Kernel#require and Kernel#load?
VietMX Staff asked 3 years ago

Kernel#require can load binary extensions. Kernel#require does not require a filename extension. Kernel#require prevents multiple loads of the same file path. Kernel#load loads the specified file at the current $SAFE level while Kernel#require loads the specified file with a $SAFE level of 0.