p Object.private_method_defined?(:foo) def foo(msg = :foo) p msg end p Object.private_method_defined?(:foo) Object.send(:foo) bar = :foo send(bar) send(bar, :bar)
Standard input is empty
false true :foo :foo :bar
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!