Well, preferably [1, "hello", "10", "kitty"] shouldn't sort at all, just like in Ruby. But as Puppet gives strings instead of numbers to the function there is no way to differentiate [1, "hello", "10", "kitty"] from ["1", "hello", "10", "kitty"] from the functions perspective.