Ruby we might Miss

Posted on August 9, 2011

0


This is the third part of the series I started.
The topic for this post :
File

————————————————————————————————————
• File.join(*parts) is a platform-independent way to join path segments:
File.join(“..”, “test.rb”) # => “../test.rb”
————————————————————————————————————

————————————————————————————————————
•File.open can take a block, which will automatically close the file when exited.
————————————————————————————————————

Advertisements
Posted in: Ruby