Last active
August 29, 2015 14:13
-
-
Save JoelQ/1c1f83694940c3461761 to your computer and use it in GitHub Desktop.
__dir__ and others
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# all outputs should be the same | |
puts __dir__ | |
puts File.expand_path(__dir__) | |
puts File.expand_path File.dirname(__FILE__) | |
puts File.expand_path("../", __FILE__) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment