Updates to examples so that they run correctly under Ruby 1.8

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7491 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Charlie Savage 2005-09-23 17:36:37 +00:00
commit 5cff7abd73
4 changed files with 73 additions and 1 deletions

View file

@ -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