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
This commit is contained in:
Klaus Kämpf 2012-12-15 16:16:40 +00:00
commit 94fb7629f4
2 changed files with 10 additions and 6 deletions

View file

@ -5,6 +5,10 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 2.0.9 (in progress) 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 2012-12-14: kkaempf
[Ruby] Apply patch 3530439 and finally replace all occurences of the STR2CSTR() macro [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 with StringValuePtr(). STR2CSTR was deprecated since years and got removed in Ruby 1.9

View file

@ -35,23 +35,23 @@ if Ruby_naming::CONSTANT3 != 3
raise RuntimeError, "Incorrect value for CONSTANT3" raise RuntimeError, "Incorrect value for CONSTANT3"
end 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" raise RuntimeError, "Incorrect mapping for constant4"
end 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" raise RuntimeError, "Incorrect mapping for constant5"
end 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" raise RuntimeError, "Incorrect mapping for constant6"
end 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" raise RuntimeError, "Incorrect mapping for constant7"
end 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" raise RuntimeError, "Incorrect mapping for constant8"
end end
@ -64,7 +64,7 @@ if Ruby_naming::TestConstants::CONSTANT10 != 10
raise RuntimeError, "Incorrect value for CONSTANT10" raise RuntimeError, "Incorrect value for CONSTANT10"
end 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" raise RuntimeError, "Incorrect mapping for constant11"
end end