swig/0007-Ruby-1.9-methods-returns-array-of-Symbols-now.patch
Klaus Kämpf 7af15c657f Accepting request 122517 from home:kwk:branches:devel:tools:building
- Port SWIG to Ruby 1.9 (various patches)
- Disable broken tests

- Update to 2.0.7
  * Important regression fixes since 2.0.5 for typemaps in general and
    in Python.
  * Fixes and enhancements for Go, Java, Octave and PHP.

OBS-URL: https://build.opensuse.org/request/show/122517
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/swig?expand=0&rev=37
2012-05-26 21:53:07 +00:00

55 lines
2.2 KiB
Diff

From b395eb4f56557bd70840de073d999234922acd00 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@suse.de>
Date: Sat, 26 May 2012 21:41:07 +0200
Subject: [PATCH 07/10] Ruby 1.9: #methods returns array of Symbols now
---
Examples/test-suite/ruby/ruby_naming_runme.rb | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Examples/test-suite/ruby/ruby_naming_runme.rb b/Examples/test-suite/ruby/ruby_naming_runme.rb
index 8ea5f13..d5525bc 100644
--- a/Examples/test-suite/ruby/ruby_naming_runme.rb
+++ b/Examples/test-suite/ruby/ruby_naming_runme.rb
@@ -35,23 +35,23 @@ if Ruby_naming::CONSTANT3 != 3
raise RuntimeError, "Incorrect value for CONSTANT3"
end
-if not Ruby_naming::methods.include?("constant4")
+if not (Ruby_naming::methods.include?("constant4") || Ruby_naming::methods.include?(:constant4))
raise RuntimeError, "Incorrect mapping for constant4"
end
-if not Ruby_naming::methods.include?("constant5")
+if not (Ruby_naming::methods.include?("constant5") || Ruby_naming::methods.include?(:constant5))
raise RuntimeError, "Incorrect mapping for constant5"
end
-if not Ruby_naming::methods.include?("constant6")
+if not (Ruby_naming::methods.include?("constant6") || Ruby_naming::methods.include?(:constant6))
raise RuntimeError, "Incorrect mapping for constant6"
end
-if not Ruby_naming::TestConstants.instance_methods.include?("constant7")
+if not (Ruby_naming::TestConstants.instance_methods.include?("constant7") || Ruby_naming::TestConstants.instance_methods.include?(:constant7))
raise RuntimeError, "Incorrect mapping for constant7"
end
-if not Ruby_naming::TestConstants.methods.include?("constant8")
+if not (Ruby_naming::TestConstants.methods.include?("constant8") || Ruby_naming::TestConstants.methods.include?(:constant8))
raise RuntimeError, "Incorrect mapping for constant8"
end
@@ -64,7 +64,7 @@ if Ruby_naming::TestConstants::CONSTANT10 != 10
raise RuntimeError, "Incorrect value for CONSTANT10"
end
-if not Ruby_naming::methods.include?("constant11")
+if not (Ruby_naming::methods.include?("constant11") || Ruby_naming::methods.include?(:constant11))
raise RuntimeError, "Incorrect mapping for constant11"
end
--
1.7.9.2