tj / js-yaml

CommonJS YAML Parser -- fast, elegant and tiny yaml parser for javascript
276 stars 41 forks source link

Array parsed as Object #50

Closed truongsinh closed 11 years ago

truongsinh commented 11 years ago
myArray:
  - firstEl
  - secondEl

expected

# myArray = ['firstEl', 'secondEl']
myArray.push('thirdEl');
# myArray = ['firstEl', 'secondEl', 'thirdEl']

got

# myArray = {'0': 'firstEl', '1':'secondEl'}
myArray.push('thirdEl');
# TypeError: Object #<Object> has no method 'push'
truongsinh commented 11 years ago

Invalid. This is due to other implementation.