summaryrefslogtreecommitdiff
path: root/lib/highline
diff options
context:
space:
mode:
Diffstat (limited to 'lib/highline')
-rw-r--r--lib/highline/menu.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/highline/menu.rb b/lib/highline/menu.rb
index b1205d8..5f73cd7 100644
--- a/lib/highline/menu.rb
+++ b/lib/highline/menu.rb
@@ -269,11 +269,11 @@ class HighLine
def index=(style)
@index = style
+ return unless @index == :none || @index.is_a?(::String)
+
# Default settings.
- if @index == :none || @index.is_a?(::String)
- @index_suffix = " "
- @select_by = :name
- end
+ @index_suffix = " "
+ @select_by = :name
end
#