dtao / safe_yaml

Parse YAML safely
MIT License
217 stars 63 forks source link

Does not play well with New Relic yaml config files. ' vs ". #15

Closed cziko closed 11 years ago

cziko commented 11 years ago

For some reasons values in ' ' do not work properly whereas values in " " are fine. Both ' and " are valid in terms of YAML specs.

dtao commented 11 years ago

Could you provide a sample config file and also indicate which version of Ruby and safe_yaml you're using? The gem is meant to handle single and double quotes the same, so this must just be a case that is currently overlooked.

cziko commented 11 years ago
cziko commented 11 years ago

Btw after changing ' ' to " " in sandbox env everything worked just fine.

dtao commented 11 years ago

Sorry for being dense—could you explain exactly what is wrong about the output when you leave the single quotes in there?

I think I see the problem you're encountering: basically, the environment's explicit values are not taking precedence over the default settings. Is that right? If so, I see the problem and know how to fix it; but I want to make sure this is the problem you're reporting as opposed to something else.

Incidentally, if this is what you're referring to, it is actually not related to single vs. double quotes, but rather to non-deterministic enumeration of hash keys.

knowak commented 11 years ago

That's what he's been referring to, yes.

cziko commented 11 years ago

Yes, that's the underlying issue. Sorry - late night bug report :/.

cziko commented 11 years ago

Thanks for the fix.

nazgob commented 11 years ago

@dtao works, thanks!

dtao commented 11 years ago

Sweet! OK then, closing