Fix line number calculation
Fix yaml parsing syntax error

Addresses a discrepancy between MRI/psych and jruby/snakeyaml parsing,
see: https://github.com/jruby/jruby/issues/2199