Skip to content

yield in class body produces two SyntaxError outputs #7370

Closed
@headius

Description

@headius

It's working, but why do we get two reports?

[] ~/work/jruby $ jruby -e 'class Foo; yield; end'
SyntaxError: -e:1: Invalid yield
SyntaxError: -e:1: Invalid yield

[] ~/work/jruby $ jruby -e 'class Foo; class << self; yield; end; end'
SyntaxError: -e:1: Invalid yield
SyntaxError: -e:1: Invalid yield

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions