After it goes through the block, the file is closed taking with it the results of the block’s transactional process. This is something that should be done with all programming languages, to have the code have their own built-in file handling system which ensures that a file once opened is closed upon exit to avoid destroying the contents of that file. This shows the two forms the File.open method’s behavior can be called upon, that if it is called with a block it does what it has to and then automatically closes the file. Called on without the block and it returns the file object.
Blocks for Transactions Discussed (Part 2)
This entry was posted in Development, Programming Basics and tagged Blocks, transactional processions. Bookmark the permalink. Comments are closed, but you can leave a trackback: Trackback URL.
