is more abstract than load. Strictly speaking, you don’t require a file; you require a feature. And typically, you do so without even specifying the extension on the filename. To see how this works, change this line in test.rb

 load "test.rb"

to this:

 require "./test"

When you run test.rb, you get the same result as before, even though you haven’t supplied the full name of the file you want loaded.


Author codeByPasha

More posts by codeByPasha

Leave a Reply

All rights reserved Salient.