Skip to content
Tags

,

File.open two behaviors

April 7, 2011

File.open has two different behaviors. If File.open has  an associated block, then that block will be invoked with a file object, and the file will be closed when the block terminates. If not, it returns the file object.

Advertisements

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: