diff options
-rwxr-xr-x | blaunits.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/blaunits.rb b/blaunits.rb index 39557a3..a9a4f56 100755 --- a/blaunits.rb +++ b/blaunits.rb @@ -3,7 +3,7 @@ require 'net/http' require 'json' -VERSION = "2.1.0" +VERSION = "2.2.0" BINARY_NAME = "units" begin @@ -84,10 +84,10 @@ begin puts "Invalid input! Try !convert [amount] [from-unit] to [to-unit] e.g !convert 2 cm to inches" exit end - if from == "F" && to == "C" + if from.upcase == "F" && to.upcase == "C" temp = (num - 32) / 1.8 puts "#{num} F = #{temp} C" - elsif from == "C" && to == "F" + elsif from/upcase == "C" && to.upcase == "F" temp = (num * 1.8) + 32 puts "#{num} C = #{temp} F" else |