I will write a test case to confirm this, but wanted feedback as to whether this was even the right thing.
call to_s on value to make sure it is a string. plataformatec/devise#…
Calling to_s shouldn't be necessary. Please include a test case. Thanks!
yes, wrote a test case, and to_s is not necessary. I found the origin of the problem: some changes we did in our application to Hash::encode_with() to sort the keys, since SortKeys is a no-op with psych.
If I add that monkey patch into test_hash.rb, my simple test case fails.