Skip to content

Incorrect warning: given block not used #8728

@notEthan

Description

@notEthan

Working with a subclass of Set, JRuby throws a warning from #initialize - minimal reproduction:

require 'set'
class ASet < Set
  def initialize(&block)
    super()
    block[]
  end
end
ASet.new { }

test.rb:4: warning: given block not used. Doesn't seem to happen with a different superclass or method other than #initialize.

Environment Information

  • jruby 9.4.12.0
  • macos & ubuntu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions