I receive the following hash:
my_hash = {a:(1/20), b:(1/26)}
But when I see the hash I get the following:
irb(main):019:0> my_hash = {a:(1/20), b:(1/26)}
=> {:a=>0, :b=>0}
irb(main):020:0> my_hash
=> {:a=>0, :b=>0}
As you can see it convert to Integer (0)
How can I leave as Rational, or float so I can sort my_hash.sort_by {|key, value| value}
?