rice 1.5.2 → 1.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Doxyfile CHANGED
@@ -38,7 +38,7 @@ PROJECT_NAME = "Rice"
38
38
  # could be handy for archiving the generated documentation or if some version
39
39
  # control system is used.
40
40
 
41
- PROJECT_NUMBER = 1.5.2
41
+ PROJECT_NUMBER = 1.5.3
42
42
 
43
43
  # Using the PROJECT_BRIEF tag one can provide an optional one line description
44
44
  # for a project that appears at the top of each page and should give viewer a
data/rice/Hash.hpp CHANGED
@@ -199,7 +199,7 @@ protected:
199
199
 
200
200
  private:
201
201
  Hash hash_;
202
- int current_index_;
202
+ size_t current_index_;
203
203
  VALUE keys_;
204
204
 
205
205
  mutable typename detail::remove_const<Value_T>::Type tmp_;
data/rice/Module_impl.ipp CHANGED
@@ -4,7 +4,6 @@
4
4
  #include "Data_Object.hpp"
5
5
  #include "Data_Type.hpp"
6
6
  #include "Symbol.hpp"
7
- #include "Exception.hpp"
8
7
  #include "protect.hpp"
9
8
 
10
9
  #include "Module.hpp"
@@ -186,9 +185,7 @@ define_module_function(
186
185
  {
187
186
  if(this->rb_type() != T_MODULE)
188
187
  {
189
- throw Rice::Exception(
190
- rb_eTypeError,
191
- "can only define module functions for modules");
188
+ throw std::runtime_error("can only define module functions for modules");
192
189
  }
193
190
 
194
191
  define_method(name, func, arguments);
@@ -1,6 +1,6 @@
1
1
  #ifndef Rice__detail__ruby_version_code__hpp
2
2
  #define Rice__detail__ruby_version_code__hpp
3
3
 
4
- #define RICE__RUBY_VERSION_CODE 193
4
+ #define RICE__RUBY_VERSION_CODE 200
5
5
 
6
6
  #endif // Rice__detail__ruby_version_code__hpp
data/ruby/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rice
2
- VERSION = "1.5.2"
2
+ VERSION = "1.5.3"
3
3
  end
data/test/test_Class.cpp CHANGED
@@ -119,13 +119,9 @@ TESTCASE(define_module_function_simple)
119
119
  // module_function only works with Module, not Class
120
120
  Class c(anonymous_class());
121
121
  ASSERT_EXCEPTION_CHECK(
122
- Exception,
123
- c.define_module_function("foo", &define_method_simple_helper),
124
- ASSERT_EQUAL(
125
- Object(rb_eTypeError),
126
- Object(CLASS_OF(ex.value()))
127
- )
128
- );
122
+ std::runtime_error,
123
+ c.define_module_function("foo", &define_method_simple_helper),
124
+ );
129
125
  }
130
126
 
131
127
  namespace
@@ -1,4 +1,5 @@
1
1
  #include "unittest.hpp"
2
+ #include "rice/Exception.hpp"
2
3
  #include "rice/Director.hpp"
3
4
  #include "rice/Constructor.hpp"
4
5
  #include "rice/Data_Type.hpp"
@@ -40,7 +40,8 @@ TESTCASE(message)
40
40
 
41
41
  TESTCASE(what)
42
42
  {
43
+ const char* foo = "foo";
43
44
  Exception ex(rb_eRuntimeError, "%s", "foo");
44
- ASSERT_EQUAL("foo", ex.what());
45
+ ASSERT_EQUAL(foo, ex.what());
45
46
  }
46
47
 
@@ -247,8 +247,9 @@ TESTCASE(char_const_ptr_to_ruby)
247
247
 
248
248
  TESTCASE(char_const_ptr_from_ruby)
249
249
  {
250
+ char const* foo = "foo";
250
251
  ASSERT_EQUAL("", from_ruby<char const *>(rb_str_new2("")));
251
- ASSERT_EQUAL("foo", from_ruby<char const *>(rb_str_new2("foo")));
252
+ ASSERT_EQUAL(foo, from_ruby<char const *>(rb_str_new2("foo")));
252
253
  }
253
254
 
254
255
  TESTCASE(char_from_ruby_single_character_string)
data/test/test_rice.rb CHANGED
@@ -1,7 +1,9 @@
1
- require 'test/unit'
1
+ require 'rubygems'
2
+ gem 'minitest'
3
+ require 'minitest/autorun'
2
4
  require 'rbconfig'
3
5
 
4
- class RiceTest < Test::Unit::TestCase
6
+ class RiceTest < Minitest::Test
5
7
  # TODO: probably a better way to find this out...
6
8
  VERBOSE = ARGV.include?('-v')
7
9
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rice
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.5.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-10-07 00:00:00.000000000 Z
13
+ date: 2013-10-14 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: ! 'Rice is a C++ interface to Ruby''s C API. It provides a type-safe
16
16
  and