summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTeemu Matilainen <teemu.matilainen@iki.fi>2019-01-20 14:54:09 +0200
committerTeemu Matilainen <teemu.matilainen@iki.fi>2019-01-20 19:16:59 +0200
commit0c9175428655993b994d7fd5988002c437ab56a6 (patch)
tree27156f491f45ce58119837ba894b6041fcf9df85 /lib
parent7037ef0867bf6da9149121b3efa3e80e6a70732c (diff)
downloadslop-0c9175428655993b994d7fd5988002c437ab56a6.tar.gz
Allow calling `Options#separator` without args, defaulting to an empty string
It's clear that we want an empty line when calling `opts.separator` without arguments. Leave the examples in the Readme still for a while with the empty string to avoid confusion when using older versions.
Diffstat (limited to 'lib')
-rw-r--r--lib/slop/options.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/slop/options.rb b/lib/slop/options.rb
index 3a1e429..009964a 100644
--- a/lib/slop/options.rb
+++ b/lib/slop/options.rb
@@ -59,7 +59,7 @@ module Slop
# Add a separator between options. Used when displaying
# the help text.
- def separator(string)
+ def separator(string = "")
if separators[options.size]
separators[-1] += "\n#{string}"
else