[Chunky_bacon] instance variables not inherited?

travis+ml-chunky-bacon at subspacefield.org travis+ml-chunky-bacon at subspacefield.org
Wed Jul 6 20:15:44 UTC 2011


Ooops that was my mistake.  I was failing to set the variable.

That reminds me:

        begin
	  ...
        # NOTE: do not just trap RuntimeException here, since we want to catch SIGINT (^c)
        rescue
          # TODO: Is there a better way to do this rescue/ensure stuff?
          bv.umount()
          # propogate exception
          raise
        else
          # TODO: as noted above, this is tedious.
          bv.umount()
        end

I used to have the code expanded out, but now I've encapsulated it
into bv.umount, so it's not nearly as bad, though there is a violation
of DRY, I think.

IIRC, I couldn't use ensure since it won't propogate the exception, or
if I raised during the rescue, the ensure clause wouldn't get run - I
believe because it's not in the begin block, and so raising from within
rescue causes it to avoid running ensure.  I could be misremembereing,
though, it has been a while.
-- 
http://www.subspacefield.org/~travis/ | Meijin ni joseki nashi
"Who wants flowers when you're dead?  Nobody." -- Catcher in the Rye
If you are a spammer, please email john at subspacefield.org to get blacklisted.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.noisebridge.net/pipermail/chunky_bacon/attachments/20110706/cb895828/attachment-0003.sig>


More information about the Chunky_bacon mailing list