Type casting problem when sorting array of Configatron::Dynamic values
sarmady opened this issue · comments
sarmady commented
try this in console:
configatron.test.not_sorted = [Configatron::Dynamic.new {Time.now.to_i}, Configatron::Dynamic.new {Time.now.to_i}]
=> [1413583466, 1413583466]
configatron.test.sorted = configatron.test.not_sorted
=> [1413583479, 1413583479]
configatron.test.sorted.last.to_s
=> "#Configatron::Dynamic:0x0000000394d218"
This is wrong, it should give a string of the timestamp like this:
Time.now.to_i.to_s
=> "1413583779"