gitlab-org--gitlab-foss/lib/gitlab/utils
Lin Jen-Shin f71fc9328c Also verify if extending would override a class method
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.
2018-06-05 13:40:52 +08:00
..
merge_hash.rb
override.rb Also verify if extending would override a class method 2018-06-05 13:40:52 +08:00
strong_memoize.rb Use memoization for commits on diffs 2017-12-12 16:28:26 +01:00