Skip to content

Commit 970b5b5

Browse files
committed
Fix arguments to Logger.log_depth to pass depth keyword parameter to #log_depth.
1 parent 4f45c0e commit 970b5b5

3 files changed

Lines changed: 9 additions & 15 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,10 @@ jobs:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
ruby:
29-
- 2.6
30-
- 2.7
31-
- "3.0"
32-
- 3.1
33-
- ruby-head
34-
- jruby
28+
ruby: [2.6, 2.7, '3.0', 3.1, ruby-head, jruby]
3529
steps:
3630
- name: Clone repository
37-
uses: actions/checkout@v2
31+
uses: actions/checkout@v3
3832
- name: Set up Ruby
3933
uses: ruby/setup-ruby@v1
4034
with:
@@ -62,7 +56,7 @@ jobs:
6256
- 3.1
6357
steps:
6458
- name: Clone repository
65-
uses: actions/checkout@v2
59+
uses: actions/checkout@v3
6660
- name: Set up Ruby
6761
uses: ruby/setup-ruby@v1
6862
with:

.github/workflows/generate-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
name: Update gh-pages with docs
1111
steps:
1212
- name: Clone repository
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v3
1414
- name: Set up Ruby
1515
uses: ruby/setup-ruby@v1
1616
with:

lib/rdf/util/logger.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,10 @@ def log_debug(*args, level: :debug, **options, &block)
181181
end
182182

183183
##
184-
# @overload log_depth(options, &block)
184+
# @overload log_depth(depth: 1, **options, &block)
185185
# Increase depth around a method invocation
186+
# @param [Integer] :depth Additional recursion depth
186187
# @param [Hash{Symbol}] options (@options || {})
187-
# @option options [Integer] :depth Additional recursion depth
188188
# @option options [Logger, #<<] :logger
189189
# @yield
190190
# Yields with no arguments
@@ -194,8 +194,8 @@ def log_debug(*args, level: :debug, **options, &block)
194194
# @overload log_depth
195195
# # Return the current log depth
196196
# @return [Integer]
197-
def log_depth(**options, &block)
198-
self.logger(**options).log_depth(&block)
197+
def log_depth(depth: 1, **options, &block)
198+
self.logger(**options).log_depth(depth: depth, &block)
199199
end
200200

201201
private
@@ -244,7 +244,7 @@ def log_statistics
244244
end
245245

246246
##
247-
# @overload log_depth(options, &block)
247+
# @overload log_depth(depth: 1, **options, &block)
248248
# Increase depth around a method invocation
249249
# @param [Integer] depth (1) recursion depth
250250
# @param [Hash{Symbol}] options (@options || {})

0 commit comments

Comments
 (0)