Is it the same order in which the items were added to the Hash ?
相关问题
- facebook error invalid key hash for some devices
- How to specify memcache server to Rack::Session::M
- Why am I getting a “C compiler cannot create execu
- reference to a method?
- ruby 1.9 wrong file encoding on windows
相关文章
- Ruby using wrong version of openssl
- Difference between Thread#run and Thread#wakeup?
- how to call a active record named scope with a str
- “No explicit conversion of Symbol into String” for
- Segmentation fault with ruby 2.0.0p247 leading to
- How to detect if an element exists in Watir
- Bcrypt vs Hash in laravel
- uninitialized constant Mysql2::Client::SECURE_CONN
In Ruby 1.8, there's no guaranteed order for the elements in a hash.
The top of the Ruby 1.9.2 documentation for the Hash class declares:
Cursory tests suggest that this does indeed apply to both
Hash#keys
andHash#values
, although the corresponding documentation for those methods doesn't seem to specify it.