Skip to content
  • Koichi Sasada's avatar
    e9d7478d
    relax unused block warning for duck typing · e9d7478d
    Koichi Sasada authored
    if a method `foo` uses a block, other (unrelated) method `foo`
    can receives a block. So try to relax the unused block warning
    condition.
    
    ```ruby
          class C0
            def f = yield
          end
    
          class C1 < C0
            def f = nil
          end
    
          [C0, C1].f{ block } # do not warn
    ```
    e9d7478d
    relax unused block warning for duck typing
    Koichi Sasada authored
    if a method `foo` uses a block, other (unrelated) method `foo`
    can receives a block. So try to relax the unused block warning
    condition.
    
    ```ruby
          class C0
            def f = yield
          end
    
          class C1 < C0
            def f = nil
          end
    
          [C0, C1].f{ block } # do not warn
    ```
Loading