Skip to content

Instantly share code, notes, and snippets.

@miyucy
Created August 20, 2009 01:47
Show Gist options
  • Save miyucy/170766 to your computer and use it in GitHub Desktop.
Save miyucy/170766 to your computer and use it in GitHub Desktop.
module Kernel
def __DIR__
File.dirname(caller(0)[1])
end
end
puts __FILE__
puts __DIR__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment