Skip to content

Commit

Permalink
Explicitly pass &block to Proc.new
Browse files Browse the repository at this point in the history
Without this, `ruby examples/call/call.rb` fails with `tried to create Proc object without a block (ArgumentError)`.
  • Loading branch information
TastyPi committed Jul 12, 2021
1 parent d8b872a commit baf4a23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/daemons.rb
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def new(options = {}, &block)
fail 'Daemons.call: no block given' unless block_given?

options[:app_name] ||= 'proc'
options[:proc] = Proc.new
options[:proc] = Proc.new(&block)
options[:mode] = :proc
options[:dir_mode] = :normal

Expand Down

0 comments on commit baf4a23

Please sign in to comment.