Re: [Puppet Users] stdlib: result from join_keys_to_values() is unstable

2014-03-11 Thread Gabriel Filion
On 11/03/14 12:58 PM, Matthaus Owens wrote: > I don't know about the specific implementation of join_keys_to_values, > but ruby's hash behavior changed between the 1.8 series and 1.9 and > later[1]. In ruby 1.8 hashes are enumerated in a seemingly unsorted > manner, while in ruby 1.9 and later hash

Re: [Puppet Users] stdlib: result from join_keys_to_values() is unstable

2014-03-11 Thread Matthaus Owens
Gabriel, I don't know about the specific implementation of join_keys_to_values, but ruby's hash behavior changed between the 1.8 series and 1.9 and later[1]. In ruby 1.8 hashes are enumerated in a seemingly unsorted manner, while in ruby 1.9 and later hashes are enumerated in insertion order. If yo

[Puppet Users] stdlib: result from join_keys_to_values() is unstable

2014-03-11 Thread Gabriel Filion
Hi there, Say I have a hash like {a=>'1',b=>'2'} and I'd like to get a string that looks like "a=1,b=2". I tried using a combination of join_keys_to_values() and join() and the result looked correct, but was unstable. That unstability is because hashes are not always "sorted" the same way. An uns