Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8089633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:27:34+00:00 2026-06-05T19:27:34+00:00

I have encountered what appears to be a bug with the YAML parser. Take

  • 0

I have encountered what appears to be a bug with the YAML parser. Take this simple yaml file for example:

new account:
  - FLEETBOSTON
  - 011001742

If you parse it using this ruby line of code:

INPUT_DATA = YAML.load_file("test.yml")

Then I get this back:

{"new account"=>["FLEETBOSTON", 2360290]}

Am I doing something wrong? Because I’m pretty sure this is never supposed to happen.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T19:27:35+00:00Added an answer on June 5, 2026 at 7:27 pm

    It is supposed to happen. Numbers starting with 0 are in octal notation. Unless the next character is x, in which case they’re hexadecimal.

    07 == 7
    010 == 8
    011 == 9
    
    0x9 == 9
    0xA == 10
    0xF == 15
    0x10 == 16
    0x11 == 17
    

    Go into irb and just type in 011001742.

    1.9.2-p290 :001 > 011001742
     => 2360290 
    

    PEBKAC. 🙂

    Your number is a number, so it’s treated as a number. If you want to make it explictly a string, enclose it into quotes, so YAML will not try to make it a number.

    new account:
      - FLEETBOSTON
      - '011001742'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have encountered a wierd problem, I have a class that appears in the
I have encountered a list of errors when i was trying to execute this
I have encountered the following code: class a { public: void * operator new(size_t
I am new to Flex, so please bear with me. I have encountered a
I have a div that appears if errors were encountered during a processing step.
I encountered an interesting thing today that I have never noticed before. It appears
I have encountered a slightly bizarre bug while using the ajax control toolkit TabPanel.
I have encountered a somewhat baffling problem with the simple task of filling an
I've encountered this apparently common problem and have been unable to resolve it. If
Had this working well in Emacs 23.1.x but it appears to have broke in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.