1 #include <iostream> 2 3 #ruby <<END 4 puts '#define FOO BAR' 5 '#define BAR BAZ' 6 END 7 8 #ruby def foo(x) ; \ 9 x.to_s.chop ; \ 10 end 11 12 extern "C" { 13 int foo(int a) { 14 std::cout << "1" << std::endl; 15 } 16 17 int foo(double a) { 18 std::cout << "2" << std::endl; 19 } 20 21 main() { 22 foo(1); 23 foo(1.0); 24 std::cout << "#{foo(1.0)}" << std::endl; 25 }