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

Merged
merged 2 commits into from Oct 12, 2011

Projects

None yet

5 participants

@seanbehan

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
as016194 commented Jul 8, 2011

+1

(though I probably would have used

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

instead of

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

+1 to as016194

@davelnewton

+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