From 94fb7629f4b11b19481ec577250304e09716bec5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= Date: Sat, 15 Dec 2012 16:16:40 +0000 Subject: [PATCH] Apply patch 3530444 Class#methods and Class#constants returns array of symbols from Ruby 1.9 on git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13970 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- CHANGES.current | 4 ++++ Examples/test-suite/ruby/ruby_naming_runme.rb | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGES.current b/CHANGES.current index 6256f0469..5a7c98e9c 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -5,6 +5,10 @@ See the RELEASENOTES file for a summary of changes in each release. Version 2.0.9 (in progress) =========================== +2012-12-15: kkaempf + [Ruby] Apply patch 3530444, Class#methods and Class#constants returns array of + symbols in Ruby 1.9+ + 2012-12-14: kkaempf [Ruby] Apply patch 3530439 and finally replace all occurences of the STR2CSTR() macro with StringValuePtr(). STR2CSTR was deprecated since years and got removed in Ruby 1.9 diff --git a/Examples/test-suite/ruby/ruby_naming_runme.rb b/Examples/test-suite/ruby/ruby_naming_runme.rb index 8ea5f13d3..d5525bca8 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