def foo; BEGIN {}; end
         ^~~~~ BEGIN is permitted only at toplevel

