diff --git a/Examples/test-suite/ruby/abstract_inherit_ok_runme.rb b/Examples/test-suite/ruby/abstract_inherit_ok_runme.rb index f269b9b1b..b91c223d3 100644 --- a/Examples/test-suite/ruby/abstract_inherit_ok_runme.rb +++ b/Examples/test-suite/ruby/abstract_inherit_ok_runme.rb @@ -12,6 +12,10 @@ begin Foo.new rescue NameError exceptionRaised = true +rescue TypeError + # In Ruby 1.8 the exception raised is: + # TypeError: allocator undefined for Abstract_inherit_ok::Foo + exceptionRaised = true ensure raise RuntimeError unless exceptionRaised end diff --git a/Examples/test-suite/ruby/abstract_inherit_runme.rb b/Examples/test-suite/ruby/abstract_inherit_runme.rb index f8a6942db..f71c1d1c5 100644 --- a/Examples/test-suite/ruby/abstract_inherit_runme.rb +++ b/Examples/test-suite/ruby/abstract_inherit_runme.rb @@ -1,4 +1,4 @@ -require 'abstract_inherit' + require 'abstract_inherit' include Abstract_inherit @@ -13,6 +13,10 @@ begin Foo.new rescue NameError exceptionRaised = true +rescue TypeError + # In Ruby 1.8 the exception raised is: + # TypeError: allocator undefined for Abstract_inherit::Foo + exceptionRaised = true ensure raise RuntimeError unless exceptionRaised end @@ -22,6 +26,10 @@ begin Bar.new rescue NameError exceptionRaised = true +rescue TypeError + # In Ruby 1.8 the exception raised is: + # TypeError: allocator undefined for Abstract_inherit::Bar + exceptionRaised = true ensure raise RuntimeError unless exceptionRaised end @@ -31,6 +39,10 @@ begin Spam.new rescue NameError exceptionRaised = true +rescue TypeError + # In Ruby 1.8 the exception raised is: + # TypeError: allocator undefined for Abstract_inherit::Spam + exceptionRaised = true ensure raise RuntimeError unless exceptionRaised end diff --git a/Examples/test-suite/ruby/abstract_signature_runme.rb b/Examples/test-suite/ruby/abstract_signature_runme.rb index 5c727f8d2..78aed011e 100644 --- a/Examples/test-suite/ruby/abstract_signature_runme.rb +++ b/Examples/test-suite/ruby/abstract_signature_runme.rb @@ -12,6 +12,10 @@ begin Abstract_foo.new rescue NameError exceptionRaised = true +rescue TypeError + # In Ruby 1.8 the exception raised is: + # TypeError: allocator undefined for Abstract_signature::Abstract_foo + exceptionRaised = true ensure raise RuntimeError unless exceptionRaised end @@ -26,6 +30,10 @@ begin Abstract_bar.new rescue NameError exceptionRaised = true +rescue TypeError + # In Ruby 1.8 the exception raised is: + # TypeError: allocator undefined for Abstract_signature::Abstract_bar + exceptionRaised = true ensure raise RuntimeError unless exceptionRaised end diff --git a/Examples/test-suite/ruby/default_constructor_runme.rb b/Examples/test-suite/ruby/default_constructor_runme.rb index fc1f42937..b262c6729 100755 --- a/Examples/test-suite/ruby/default_constructor_runme.rb +++ b/Examples/test-suite/ruby/default_constructor_runme.rb @@ -18,6 +18,10 @@ begin b = B.new rescue ArgumentError # pass +rescue TypeError + # In Ruby 1.8 the exception raised is: + # TypeError: allocator undefined for Default_constructor::BB + exceptionRaised = true end # The two-argument constructor for B should work @@ -29,6 +33,10 @@ begin puts "Whoa. new BB created." rescue NoConstructorError # pass +rescue TypeError + # In Ruby 1.8 the exception raised is: + # TypeError: allocator undefined for Default_constructor::BB + exceptionRaised = true end # C's constructor is protected, so this should raise an exception @@ -37,6 +45,14 @@ begin print "Whoa. new C created." rescue NoConstructorError # pass +rescue TypeError + # In Ruby 1.8 the exception raised is: + # TypeError: allocator undefined for Default_constructor::C + # pass +rescue TypeError + # In Ruby 1.8 the exception raised is: + # TypeError: allocator undefined for Default_constructor::C + # pass end # CC gets a default constructor, so no problem here @@ -48,6 +64,10 @@ begin puts "Whoa. new D created" rescue NoConstructorError # pass +rescue TypeError + # In Ruby 1.8 the exception raised is: + # TypeError: allocator undefined for Default_constructor::D + # pass end # DD shouldn't get a default constructor, so this should fail @@ -56,6 +76,18 @@ begin puts "Whoa. new DD created" rescue NoConstructorError # pass +rescue TypeError + # In Ruby 1.8 the exception raised is: + # TypeError: allocator undefined for Default_constructor::DD + # pass +rescue TypeError + # In Ruby 1.8 the exception raised is: + # TypeError: allocator undefined for Default_constructor::D + # pass +rescue TypeError + # In Ruby 1.8 the exception raised is: + # TypeError: allocator undefined for Default_constructor::DD + # pass end # AD shouldn't get a default constructor, so this should fail @@ -64,6 +96,14 @@ begin puts "Whoa. new AD created" rescue NoConstructorError # pass +rescue TypeError + # In Ruby 1.8 the exception raised is: + # TypeError: allocator undefined for Default_constructor::AD + # pass +rescue TypeError + # In Ruby 1.8 the exception raised is: + # TypeError: allocator undefined for Default_constructor::AD + # pass end # Both of the arguments to E's constructor have default values, @@ -79,6 +119,14 @@ begin puts "Whoa. new EB created" rescue NoConstructorError # pass +rescue TypeError + # In Ruby 1.8 the exception raised is: + # TypeError: allocator undefined for Default_constructor::EB + # pass +rescue TypeError + # In Ruby 1.8 the exception raised is: + # TypeError: allocator undefined for Default_constructor::EB + # pass end # This should work fine