From: David Masover Date: 2009-12-04T10:31:37+09:00 Subject: Re: Variable references in yaml files Well, two complaints about this. One, you're top posting, but that's a matter of taste... And two: On Thursday 03 December 2009 05:34:33 pm dara wrote: > value = substitution_hash[value] if value.class == Symbol I doubt it matters here, but I'd do: if value.kind_of?(Symbol) I like to duck-type when I can, and when I can't, this is still closer than checking the actual class. (kind_of? checks inheritance -- it would return true if it's an instance of a child class of Symbol, or if Symbol was a module that it included/extended from, or if it's a class which overrides #kind_of? to lie and say it's a Symbol.) And yes, hash merging is probably the simpler solution.