Skip to content

Commit

Permalink
Work with older versions of ruby that don't allow positional argument…
Browse files Browse the repository at this point in the history
…s after a splat.
  • Loading branch information
timmfin committed Jul 30, 2013
1 parent c268d33 commit 9e77935
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/guard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ def setup_listener
listener_options[option.to_sym] = options[option] if options.key?(option)
end

@listener = Listen.to(*@watchdirs, listener_options).change(&listener_callback)
listen_args = @watchdirs + [listener_options]
@listener = Listen.to(*listen_args).change(&listener_callback)
end

# Sets up traps to catch signals used to control Guard.
Expand Down

0 comments on commit 9e77935

Please sign in to comment.