Created
December 15, 2010 08:13
-
-
Save deepak/741761 to your computer and use it in GitHub Desktop.
Dir#chdir in ruby
This file contains hidden or 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
| # either use the cli option | |
| # ruby -C /this/dir chdir.rb | |
| # or explicitly set in code. this has some options - | |
| # missing a gotcha check 'the ruby programming language' book | |
| #puts "=== Dir.chdir: #{Dir.chdir(File.expand_path('..',__FILE__))}" | |
| puts "=== Dir.pwd: #{Dir.pwd}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment