Skip to content

Commit dd493df

Browse files
ko1hsbt
authored andcommitted
show warning for unused block
With verbopse mode (-w), the interpreter shows a warning if a block is passed to a method which does not use the given block. Warning on: * the invoked method is written in C * the invoked method is not `initialize` * not invoked with `super` * the first time on the call-site with the invoked method (`obj.foo{}` will be warned once if `foo` is same method) [Feature #15554] `Primitive.attr! :use_block` is introduced to declare that primitive functions (written in C) will use passed block. For minitest, test needs some tweak, so use minitest/minitest@ea9caaf for `test-bundled-gems`.
1 parent 3ecf346 commit dd493df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rdoc/context.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ def display(method_attr) # :nodoc:
710710
# This method exists to make it easy to work with Context subclasses that
711711
# aren't part of RDoc.
712712

713-
def each_ancestor # :nodoc:
713+
def each_ancestor(&_) # :nodoc:
714714
end
715715

716716
##

0 commit comments

Comments
 (0)