Fix for Rails 3.1 and Ruby 1.9.2 (check trailing whitespace after document separators when formatting final output) #24

merged 2 commits into from Oct 12, 2011


None yet

5 participants


Yaml_db failing on Rails 3.1 and Ruby 1.9.2. because document separators "---" not being removed w/ trailing space. For some reason (maybe psych yaml lib) final output of yaml dump is different than expected. This patch just checks with a regex (instead of string comparison) to remove unnecessary separators "---" in the document.

as016194 commented Jul 8, 2011


(though I probably would have used

yaml.sub!(/---\s?\n/, '')

instead of

yaml.sub!(/---\s\n|---\n/, '')

+1 to as016194


+1 for the fix, although it's not related to Rails 3.1. Verified working patch.

@ludicast ludicast merged commit c67dc36 into yamldb:master Oct 12, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment