assert_throws("Function already defined", [](){ def foo(x) { x + 1 }; def foo(x) { x + 1 } } );