1 %module(ruby_minherit="1") evil_diamond_prop
2 
3 %warnfilter(SWIGWARN_RUBY_WRONG_NAME) foo;		// Ruby, wrong class name
4 %warnfilter(SWIGWARN_RUBY_WRONG_NAME) bar;		// Ruby, wrong class name
5 %warnfilter(SWIGWARN_RUBY_WRONG_NAME) baz;		// Ruby, wrong class name
6 %warnfilter(SWIGWARN_RUBY_WRONG_NAME,
7 	    SWIGWARN_JAVA_MULTIPLE_INHERITANCE,
8 	    SWIGWARN_CSHARP_MULTIPLE_INHERITANCE,
9 	    SWIGWARN_D_MULTIPLE_INHERITANCE,
10 	    SWIGWARN_PHP_MULTIPLE_INHERITANCE) spam;	// Ruby, wrong class name - C# & Java, PHP multiple inheritance
11 
12 %inline %{
13 
14 class foo {
15   public:
16     int _foo;
foo()17     foo() : _foo(1) {}
18 };
19 
20 class bar : public foo {
21   public:
22     int _bar;
bar()23     bar() : _bar(2) {}
24 };
25 
26 class baz : public foo {
27   public:
28     int _baz;
baz()29     baz() : _baz(3) {}
30 };
31 
32 class spam : public bar, public baz {
33   public:
34     int _spam;
spam()35     spam() : _spam(4) {}
36 };
37 
test(foo * f)38 foo *test(foo *f) { return f; }
39 %}
40 
41