diff options
author | Lee Jarvis <leejarvis@fastmail.com> | 2017-11-17 23:37:52 +0000 |
---|---|---|
committer | Lee Jarvis <leejarvis@fastmail.com> | 2017-11-17 23:37:52 +0000 |
commit | 6e30144e8bbe013d80384c3ef095368a782df1ed (patch) | |
tree | 7cb131285f430d3bf95a35a76b360cd14228fd74 /lib | |
parent | d021364d5a2dc3a6b22953be215f332b3fde23b7 (diff) | |
download | slop-6e30144e8bbe013d80384c3ef095368a782df1ed.tar.gz |
Add more tests for Options#separator
And fixed the inevitable missed last separator..
Fixes #222
Diffstat (limited to 'lib')
-rw-r--r-- | lib/slop/options.rb | 4 |
1 files changed, 4 insertions, 0 deletions
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 |