From a6675b2e60448e8648f5ae40927cef367663cd80 Mon Sep 17 00:00:00 2001 From: Felix Wolfsteller Date: Wed, 16 Jan 2019 22:25:28 +0100 Subject: [PATCH] Fix make_sprue unit_conversion FROM mm to other. (#260) Before, val_mm resulted in nil which broke execution in evaluation of division operation ("/"). Fixes #259. --- lib/squib/commands/make_sprue.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/squib/commands/make_sprue.rb b/lib/squib/commands/make_sprue.rb index 6fd69fb..f004cd2 100644 --- a/lib/squib/commands/make_sprue.rb +++ b/lib/squib/commands/make_sprue.rb @@ -156,6 +156,8 @@ module Squib val_mm = val * 25.4 elsif from_unit == :cm val_mm = val * 10.0 + else + val_mm = val end if to_unit == :in