I need to work with decimals. In my program, the user needs to put a number with decimal places to convert this number.
Problem: if I try to convert the argument to a number, I get an integer without decimals.
# ARGV[0] is: 44.33 size = ARGV[0] puts size.to_i
decimal ruby numbers
ElektroStudios Mar 31 2018-12-12T00: 00Z
source share