Skip to content

Conversation

@jonathanhefner
Copy link
Contributor

This commit prevents "method redefined" warnings when overriding methods within a DelegateClass block, such as in the following example:

Base = Class.new do
  def foo
    "foo"
  end
end

Overridden = DelegateClass(Base) do
  def foo
    super + "!"
  end
end

Fixes https://bugs.ruby-lang.org/issues/19047.

This commit prevents "method redefined" warnings when overriding methods
within a `DelegateClass` block, such as in the following example:

  ```ruby
  Base = Class.new do
    def foo
      "foo"
    end
  end

  Overridden = DelegateClass(Base) do
    def foo
      super + "!"
    end
  end
  ```

Fixes https://bugs.ruby-lang.org/issues/19047.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants