From 6e30144e8bbe013d80384c3ef095368a782df1ed Mon Sep 17 00:00:00 2001 From: Lee Jarvis Date: Fri, 17 Nov 2017 23:37:52 +0000 Subject: Add more tests for Options#separator And fixed the inevitable missed last separator.. Fixes #222 --- lib/slop/options.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/slop/options.rb b/lib/slop/options.rb index 41913e0..3a1e429 100644 --- a/lib/slop/options.rb +++ b/lib/slop/options.rb @@ -111,6 +111,10 @@ module Slop str << "#{prefix}#{opt.to_s(offset: len)}\n" end + if sep = separators[options.size] + str << "#{sep}\n" + end + str end -- cgit v1.2.1