rice 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/COPYING +1 -1
- data/Doxyfile +1 -1
- data/rice/Enum.ipp +1 -1
- data/rice/Hash.ipp +2 -2
- data/rice/Module_impl.ipp +1 -1
- data/rice/Object.cpp +1 -1
- data/rice/detail/ruby_version_code.hpp +1 -1
- data/ruby/lib/version.rb +1 -1
- data/test/test_Enum.cpp +22 -2
- data/test/unittest.cpp +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd0d5de4b2af1de7c8f7e812f7e3266b83a18054
|
4
|
+
data.tar.gz: 2a719d9807aac1bfe4207d39312adc9447aa1f8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bca41abf092893dabf1ba768515e9287da6e1d3b617bbc866a9f8ace30ac509229cf5f033c183985db7821779e688dd7854b80a2c27fcd85d7877a9ca0c32c21
|
7
|
+
data.tar.gz: 7d47b281817209c3838a1c55b7be6c2984e851cf605ba91626fb73e84053e05b9c056c1fd714f28e66c12d69c962d2ac8c82acbfc7bf3707c2efb9bfc6f4ce59
|
data/COPYING
CHANGED
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 = 2.1.
|
41
|
+
PROJECT_NUMBER = 2.1.1
|
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/Enum.ipp
CHANGED
@@ -75,7 +75,7 @@ initialize(
|
|
75
75
|
.define_method("to_i", to_i)
|
76
76
|
.define_method("inspect", inspect)
|
77
77
|
.define_method("<=>", compare)
|
78
|
-
|
78
|
+
.define_method("hash", hash)
|
79
79
|
.define_method("eql?", eql)
|
80
80
|
.define_method("==", eql)
|
81
81
|
.define_method("===", eql)
|
data/rice/Hash.ipp
CHANGED
@@ -292,13 +292,13 @@ begin() const
|
|
292
292
|
inline Rice::Hash::iterator Rice::Hash::
|
293
293
|
end()
|
294
294
|
{
|
295
|
-
return iterator(*this, size());
|
295
|
+
return iterator(*this, (int)size());
|
296
296
|
}
|
297
297
|
|
298
298
|
inline Rice::Hash::const_iterator Rice::Hash::
|
299
299
|
end() const
|
300
300
|
{
|
301
|
-
return const_iterator(*this, size());
|
301
|
+
return const_iterator(*this, (int)size());
|
302
302
|
}
|
303
303
|
|
304
304
|
inline bool Rice::
|
data/rice/Module_impl.ipp
CHANGED
data/rice/Object.cpp
CHANGED
data/ruby/lib/version.rb
CHANGED
data/test/test_Enum.cpp
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
#include "rice/Array.hpp"
|
4
4
|
#include "rice/String.hpp"
|
5
5
|
#include "rice/Constructor.hpp"
|
6
|
+
#include "rice/global_function.hpp"
|
6
7
|
#include <iostream>
|
7
8
|
|
8
9
|
using namespace Rice;
|
@@ -147,14 +148,12 @@ TESTCASE(different_objects_eql)
|
|
147
148
|
ASSERT_EQUAL(true, red1 == red2);
|
148
149
|
}
|
149
150
|
|
150
|
-
/*
|
151
151
|
TESTCASE(hash)
|
152
152
|
{
|
153
153
|
Enum<Color> rb_cColor = define_color_enum();
|
154
154
|
Data_Object<Color> red(new Color(RED));
|
155
155
|
ASSERT_EQUAL(to_ruby(int(RED)), red.call("hash"));
|
156
156
|
}
|
157
|
-
*/
|
158
157
|
|
159
158
|
TESTCASE(from_int)
|
160
159
|
{
|
@@ -193,3 +192,24 @@ TESTCASE(nested_enums)
|
|
193
192
|
ASSERT_EQUAL(to_ruby(int(2)), Object(protect(rb_eval_string, "Inner::Props::VALUE3.to_i")));
|
194
193
|
}
|
195
194
|
|
195
|
+
namespace
|
196
|
+
{
|
197
|
+
Color getEnum()
|
198
|
+
{
|
199
|
+
return GREEN;
|
200
|
+
}
|
201
|
+
}
|
202
|
+
|
203
|
+
TESTCASE(return_enum_value_to_ruby)
|
204
|
+
{
|
205
|
+
Enum<Color> rb_cColor = define_color_enum();
|
206
|
+
define_global_function("get_enum", &getEnum);
|
207
|
+
|
208
|
+
ASSERT_EQUAL(
|
209
|
+
Data_Object<Color>(protect(rb_eval_string, "Color::GREEN")),
|
210
|
+
Data_Object<Color>(protect(rb_eval_string, "get_enum"))
|
211
|
+
);
|
212
|
+
|
213
|
+
ASSERT_EQUAL(String("GREEN"), String(protect(rb_eval_string, "get_enum.to_s")));
|
214
|
+
ASSERT_EQUAL(String("#<Color::GREEN>"), String(protect(rb_eval_string, "get_enum.inspect")));
|
215
|
+
}
|
data/test/unittest.cpp
CHANGED
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: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Brannan
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-01-07 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: |
|
15
15
|
Rice is a C++ interface to Ruby's C API. It provides a type-safe and
|
@@ -238,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
238
238
|
version: '0'
|
239
239
|
requirements: []
|
240
240
|
rubyforge_project:
|
241
|
-
rubygems_version: 2.
|
241
|
+
rubygems_version: 2.6.7
|
242
242
|
signing_key:
|
243
243
|
specification_version: 4
|
244
244
|
summary: Ruby Interface for C++ Extensions
|