Skip to content

False positive syntax error on endless method definition on 10.0 #8776

@slbug

Description

@slbug
jruby -e 'eval("def ===(v) = v")'

Related to https://github.com/dry-rb/dry-types/blob/main/lib/dry/types/constrained.rb#L108

Environment Information

jruby 10.0.0.0 (3.4.2) 2025-04-13 6ed59bc847 Java HotSpot(TM) 64-Bit Server VM 24.0.1+9-30 on 24.0.1+9-30 +indy +jit [x86_64-darwin]

Expected Behavior

No SyntaxError

Actual Behavior

SyntaxError: (eval at -e:1):1: setter method cannot be defined in an endless method definition
    eval at org/jruby/RubyKernel.java:1258
  <main> at -e:1

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