Actions
Bug #20647
closedInvalid return in class/module body from within singleton class
Bug #20647:
Invalid return in class/module body from within singleton class
Description
Currently, Ruby will raise a syntax error for invalid returns within class and module bodies, but skips it for singleton classes. I think we should be able to add this same error for singleton classes, as I believe these always raise a LocalJumpError.
class << Object
return
end
Actions