Why is YAML.load returning the wrong value?
ruby-1.9.2-p0 :006 > a = YAML.load('merchant_id: 014213245611111')
=> {"merchant_id"=>843333440073}
ruby-1.9.2-p0 :007 > a["merchant_id"]
=> 843333440073
I’m on ruby 1.9.2-p0, rvm, ubuntu10.10, 64bit.
The YAML parser is treating “014213245611111” as an octal (base-8) number, rather than a string. Wrap it in quotes to preserve the leading 0.