An error occurred fetching the project authors.
  1. 22 Aug, 2019 1 commit
  2. 22 Dec, 2018 1 commit
  3. 05 Jun, 2018 1 commit
    • Lin Jen-Shin's avatar
      Also verify if extending would override a class method · f71fc932
      Lin Jen-Shin authored
      Since extending a class means including on the singleton class of the
      class, this should now complain this:
      
      ``` ruby
      module M
        extend Gitlab::Utils::Override
      
        override :f
        def f
          super.succ
        end
      end
      
      class C
        extend M
      
        def self.f
          0
        end
      end
      ```
      
      It should complain because `C.f` wasn't calling `M#f`.
      This should pass verification:
      
      ``` ruby
      module M
        extend Gitlab::Utils::Override
      
        override :f
        def f
          super.succ
        end
      end
      
      class B
        def self.f
          0
        end
      end
      
      class C < B
        extend M
      end
      ```
      
      Because `C.f` would now call `M#f`, and `M#f` does override something.
      f71fc932
  4. 26 Dec, 2017 1 commit