- From: Phil Dibowitz <
>
- To:
- Subject: [chef] FYI - .to_hash bug
- Date: Fri, 04 Oct 2013 11:33:44 -0700
Hey guys,
I just wanted to let people know I recently filed CHEF-4596.
It's a common thing in chef to call `.to_hash` on an attribute so you can loop
on it (iterating on attributes will usually give you not the thing you want
because of the way Chef autovivifies)...
Turns out in Chef 10... at least some versions... .to_hash will sometimes
de-dupe internal arrays of a hash. So if you have {:foo=>['a', 'b', 'a']} in
your hash somewhere, what you'll get is {:foo=>['a', 'b']} and this could
seriously mess some people up in very subtle ways.
--
Phil Dibowitz
Open Source software and tech docs Insanity Palace of Metallica
http://www.phildev.net/ http://www.ipom.com/
"Be who you are and say what you feel, because those who mind don't matter
and those who matter don't mind."
- Dr. Seuss
Attachment:
signature.asc
Description: OpenPGP digital signature
- [chef] FYI - .to_hash bug, Phil Dibowitz, 10/04/2013
Archive powered by MHonArc 2.6.16.