Q: Are these 2 require statements the same in Ruby? Is:
require './test_req.rb'

same with this:
require './test_req'

and this
require_relative 'test_req.rb'

in Ruby? I have been researching the difference between these 3, and can't seem to find any functionality-wise.

A: 
Is:
require './test_req.rb'

same with this:
require './test_req'


No. The first one will look for a file named test_req.rb in the current working directory. The second one will look for an implementation-defined set of files in the current working directory. YARV will look for test_req.rb, test_req.rbw, test_req.so, test_req.dll, and test_req.dylib. JRuby will look for test_req.rb, test_req.rbw, test_req.so, test_req.dll, test_req.dylib, test_req.class, and test_req.jar. Rubinius will look for test_req.rb, test_req.rbw, test_req.so, test_req.dll, test_req.dylib, and test_req.rba. (Note: this list is from memory, I didn't double-check it.)
Note that both of these should never be used. The current working directory is outside of the control of the script. In the best case, this can lead to a brittle script which will sometimes fail with a LoadError depending on whatever the current working directory happens to be when the script is executed. It's even worse, though: not only is the current working directory outside of the control of the script, it is under the control of the caller. Which means that the caller can inject arbitrary code into your script by providing his own test_req.rb in some directory under their control and setting that directory as the current working directory before calling your script.
That's why . was removed from the $LOAD_PATH in Ruby 1.9, and that's why you should never use it.

and this
require_relative 'test_req.rb'


This is not equivalent to either of the other two. This will look for a file named test_req.rb in the same directory that the currently executing file is in rather than the current working directory.
