Skip to content

Commit

Permalink
Remove warnings caused by ruby 2.7 keyword args checks.
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Davis <zenspider@chef.io>
  • Loading branch information
zenspider committed Nov 22, 2019
1 parent 8c5a2ea commit 7853964
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ rvm:
- 2.4.9
- 2.5.7
- 2.6.5
- 2.7.0preview2
- ruby-head
- jruby-9.2.6.0
- jruby-head
Expand Down
4 changes: 2 additions & 2 deletions lib/strings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ module Strings
# @see Strings::Align#align
#
# @api public
def align(*args)
Align.align(*args)
def align(*args, **kws)
Align.align(*args, **kws)
end
module_function :align

Expand Down
2 changes: 1 addition & 1 deletion lib/strings/align.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module Align
def align(text, width, direction: :left, **options)
return text if width.nil?
method = to_alignment(direction)
send(method, text, width, options)
send(method, text, width, **options)
end
module_function :align

Expand Down
4 changes: 2 additions & 2 deletions lib/strings/extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
module Strings
module Extensions
refine String do
def align(*args)
Align.align(self, *args)
def align(*args, **kws)
Align.align(self, *args, **kws)
end

def align_left(*args)
Expand Down

0 comments on commit 7853964

Please sign in to comment.