diff options
Diffstat (limited to 'ruby/examples')
-rw-r--r-- | ruby/examples/create_disk.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ruby/examples/create_disk.rb b/ruby/examples/create_disk.rb index 026ea2e7..32fb1171 100644 --- a/ruby/examples/create_disk.rb +++ b/ruby/examples/create_disk.rb @@ -54,6 +54,11 @@ g.mkdir("/foo") # the disk image. g.upload("/etc/resolv.conf", "/foo/resolv.conf") +# Because we wrote to the disk and we want to detect write +# errors, call g.shutdown. You don't need to do this: +# g.close will do it implicitly. +g.shutdown() + # Note also that handles are automatically closed if they are # reaped by the garbage collector. You only need to call close # if you want to close the handle right away. |