Skip to content
  • Koichi Sasada's avatar
    9180e33c
    show warning for unused block · 9180e33c
    Koichi Sasada authored
    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
    https://github.com/minitest/minitest/commit/ea9caafc0754b1d6236a490d59e624b53209734a
    for `test-bundled-gems`.
    9180e33c
    show warning for unused block
    Koichi Sasada authored
    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
    https://github.com/minitest/minitest/commit/ea9caafc0754b1d6236a490d59e624b53209734a
    for `test-bundled-gems`.
Loading