Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #3361 > unrolled thread

dump in yaml & unexpected result

Started bySiratinee Sukachai <ploy.sukachai@gmail.com>
First post2011-04-22 00:23 -0500
Last post2011-04-22 00:23 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.ruby


Contents

  dump in yaml & unexpected result Siratinee Sukachai <ploy.sukachai@gmail.com> - 2011-04-22 00:23 -0500

#3361 — dump in yaml & unexpected result

FromSiratinee Sukachai <ploy.sukachai@gmail.com>
Date2011-04-22 00:23 -0500
Subjectdump in yaml & unexpected result
Message-ID<aabaaa6f62d38d9c3fa381fcc7903e5f@ruby-forum.com>
I have a Hash which value is Array of Hashes. And I expected to generate
the yaml like this:

---
  Session:
    singular: Session
    email: Email
    password: Password
    rememberMe: Remember Me!


But when I use dump method to generate yaml file and the result is:

---
- Session:
    - singular: |
        Session

    - email: |
        Email

    - password: |
        Password

    - rememberMe: |
        Remember Me!


When I print out my hash on command line, it look like this:

SessionsingularSession
emailEmail
passwordPassword
rememberMeRemember Me!


What do you think? Am I wrong with any steps?
If I need to generate yaml look like above, how can I do?

-- 
Posted via http://www.ruby-forum.com/.

[toc] | [standalone]


Back to top | Article view | comp.lang.ruby


csiph-web