Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merges fail with empty common block #82

Open
ccutrer opened this issue Dec 18, 2015 · 0 comments
Open

merges fail with empty common block #82

ccutrer opened this issue Dec 18, 2015 · 0 comments

Comments

@ccutrer
Copy link

ccutrer commented Dec 18, 2015

require 'yaml'
require 'safe_yaml'

yaml = <<-YAML
defaults: &defaults

development:
  <<: *defaults
YAML

YAML.load(yaml) # TypeError: no implicit conversion of nil into Hash
#   from /Users/cody/.gem/ruby/2.2.3/gems/safe_yaml-1.0.4/lib/safe_yaml/psych_handler.rb:42:in `merge!'

it also fails with syck:

require 'yaml'
require 'syck'
require 'safe_yaml'

yaml = <<-YAML
defaults: &defaults

development:
  <<: *defaults
YAML

YAML.load(yaml) # NoMethodError: undefined method `each' for nil:NilClass
#   from /Users/cody/.gem/ruby/2.2.3/gems/safe_yaml-1.0.4/lib/safe_yaml/resolver.rb:89:in `merge_into_hash'
ccutrer added a commit to instructure/canvas-lms that referenced this issue Dec 18, 2015
see dtao/safe_yaml#81 and
dtao/safe_yaml#82

test plan:
 * have a merge construct in your database.yml
 * canvas should boot

Change-Id: Ie5ca4dfac5d9fe4e62ad89474a2eb7d84feae02c
Reviewed-on: https://gerrit.instructure.com/69083
Tested-by: Jenkins
Reviewed-by: Simon Williams <[email protected]>
Product-Review: August Thornton <[email protected]>
QA-Review: August Thornton <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant