Skip to content

Commit b9e2e4b

Browse files
committed
make sure options is set
1 parent d26a175 commit b9e2e4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rugged/index.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class Index
102102
# marked with a single entry in the diff. If this flag is set to true,
103103
# all files under ignored directories will be included in the diff, too.
104104
def diff(*args)
105-
options = args.pop if args.last.is_a?(Hash)
105+
options = args.last.is_a?(Hash) ? args.pop : {}
106106
other = args.shift
107107
if other.nil?
108108
diff_index_to_workdir options

0 commit comments

Comments
 (0)