Skip to content

Commit

Permalink
Merge pull request #597 from tenderlove/fix-warnings-2.7
Browse files Browse the repository at this point in the history
Fix warnings on Ruby 2.7

Fixes #595
  • Loading branch information
mislav authored Aug 19, 2019
2 parents 63e84fb + 0f1416c commit 27654c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/will_paginate/deprecation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def []=(key, value)
super
end

def deprecate_key(*keys)
message = block_given? ? Proc.new : keys.pop
def deprecate_key(*keys, &block)
message = block_given? ? block : keys.pop
Array(keys).each { |key| @deprecated[key] = message }
end

Expand Down

0 comments on commit 27654c1

Please sign in to comment.