Skip to content

Instantly share code, notes, and snippets.

@danp
Created August 18, 2008 21:58
Show Gist options
  • Save danp/6108 to your computer and use it in GitHub Desktop.
Save danp/6108 to your computer and use it in GitHub Desktop.
spark dpeterson % ls -la /etc
lrwxr-xr-x@ 1 root admin 11 Jul 17 03:22 /etc@ -> private/etc
spark dpeterson % irb
>> require 'pathname'
=> true
>> p = Pathname.new('/etc')
=> #<Pathname:/etc>
>> puts p.realpath
/private/etc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment