From f9ad824acb3923c43f68ed95f70a117be82baf97 Mon Sep 17 00:00:00 2001 From: Joe Robinson Date: Tue, 28 Apr 2020 12:36:37 +0100 Subject: Allow the input in form 'A to B' --- blaunits.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/blaunits.rb b/blaunits.rb index a047a66..2245dff 100755 --- a/blaunits.rb +++ b/blaunits.rb @@ -64,6 +64,10 @@ begin num = 1 from = words[0] to = words[1] + elsif words.length == 3 && mid == 1 + num = 1 + from = words[0] + to = words[2] elsif mid > 0 for i in 1..mid-1 from += words[i] -- cgit v1.2.3