rice 4.3.2 → 4.5.0

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.
Files changed (151) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +66 -25
  3. data/README.md +7 -2
  4. data/Rakefile +7 -1
  5. data/include/rice/rice.hpp +7321 -4470
  6. data/include/rice/stl.hpp +769 -222
  7. data/lib/mkmf-rice.rb +37 -95
  8. data/rice/Address_Registration_Guard.hpp +72 -3
  9. data/rice/Arg.hpp +19 -5
  10. data/rice/Arg.ipp +24 -0
  11. data/rice/Callback.hpp +21 -0
  12. data/rice/Callback.ipp +13 -0
  13. data/rice/Constructor.hpp +4 -27
  14. data/rice/Constructor.ipp +79 -0
  15. data/rice/Data_Object.hpp +74 -3
  16. data/rice/Data_Object.ipp +324 -32
  17. data/rice/Data_Type.hpp +215 -3
  18. data/rice/Data_Type.ipp +125 -64
  19. data/rice/Director.hpp +0 -2
  20. data/rice/Enum.hpp +4 -6
  21. data/rice/Enum.ipp +101 -57
  22. data/rice/Exception.hpp +62 -2
  23. data/rice/Exception.ipp +7 -12
  24. data/rice/JumpException.hpp +44 -0
  25. data/rice/JumpException.ipp +48 -0
  26. data/rice/MemoryView.hpp +11 -0
  27. data/rice/MemoryView.ipp +43 -0
  28. data/rice/Return.hpp +6 -26
  29. data/rice/Return.ipp +10 -16
  30. data/rice/detail/DefaultHandler.hpp +12 -0
  31. data/rice/detail/DefaultHandler.ipp +8 -0
  32. data/rice/detail/HandlerRegistry.hpp +5 -35
  33. data/rice/detail/HandlerRegistry.ipp +7 -11
  34. data/rice/detail/InstanceRegistry.hpp +1 -4
  35. data/rice/detail/MethodInfo.hpp +15 -5
  36. data/rice/detail/MethodInfo.ipp +78 -6
  37. data/rice/detail/Native.hpp +32 -0
  38. data/rice/detail/Native.ipp +129 -0
  39. data/rice/detail/NativeAttributeGet.hpp +51 -0
  40. data/rice/detail/NativeAttributeGet.ipp +51 -0
  41. data/rice/detail/NativeAttributeSet.hpp +43 -0
  42. data/rice/detail/NativeAttributeSet.ipp +82 -0
  43. data/rice/detail/NativeCallbackFFI.hpp +55 -0
  44. data/rice/detail/NativeCallbackFFI.ipp +151 -0
  45. data/rice/detail/NativeCallbackSimple.hpp +30 -0
  46. data/rice/detail/NativeCallbackSimple.ipp +29 -0
  47. data/rice/detail/NativeFunction.hpp +20 -21
  48. data/rice/detail/NativeFunction.ipp +199 -64
  49. data/rice/detail/NativeIterator.hpp +8 -11
  50. data/rice/detail/NativeIterator.ipp +27 -31
  51. data/rice/detail/NativeRegistry.hpp +24 -17
  52. data/rice/detail/NativeRegistry.ipp +23 -56
  53. data/rice/detail/Proc.hpp +4 -0
  54. data/rice/detail/Proc.ipp +85 -0
  55. data/rice/detail/Registries.hpp +0 -7
  56. data/rice/detail/Registries.ipp +0 -18
  57. data/rice/detail/RubyFunction.hpp +0 -3
  58. data/rice/detail/RubyFunction.ipp +4 -8
  59. data/rice/detail/RubyType.hpp +19 -0
  60. data/rice/detail/RubyType.ipp +187 -0
  61. data/rice/detail/TupleIterator.hpp +14 -0
  62. data/rice/detail/Type.hpp +5 -6
  63. data/rice/detail/Type.ipp +150 -33
  64. data/rice/detail/TypeRegistry.hpp +15 -7
  65. data/rice/detail/TypeRegistry.ipp +105 -12
  66. data/rice/detail/Wrapper.hpp +6 -5
  67. data/rice/detail/Wrapper.ipp +45 -23
  68. data/rice/detail/cpp_protect.hpp +5 -6
  69. data/rice/detail/default_allocation_func.ipp +0 -2
  70. data/rice/detail/from_ruby.hpp +37 -3
  71. data/rice/detail/from_ruby.ipp +911 -454
  72. data/rice/detail/ruby.hpp +18 -0
  73. data/rice/detail/to_ruby.hpp +41 -3
  74. data/rice/detail/to_ruby.ipp +437 -113
  75. data/rice/global_function.hpp +0 -4
  76. data/rice/global_function.ipp +1 -2
  77. data/rice/rice.hpp +105 -22
  78. data/rice/ruby_mark.hpp +4 -3
  79. data/rice/stl.hpp +4 -0
  80. data/test/embed_ruby.cpp +4 -1
  81. data/test/extconf.rb +2 -0
  82. data/test/ruby/test_multiple_extensions_same_class.rb +14 -14
  83. data/test/test_Address_Registration_Guard.cpp +5 -0
  84. data/test/test_Array.cpp +12 -1
  85. data/test/test_Attribute.cpp +103 -21
  86. data/test/test_Builtin_Object.cpp +5 -0
  87. data/test/test_Callback.cpp +231 -0
  88. data/test/test_Class.cpp +5 -31
  89. data/test/test_Constructor.cpp +69 -6
  90. data/test/test_Data_Object.cpp +9 -4
  91. data/test/test_Data_Type.cpp +428 -64
  92. data/test/test_Director.cpp +10 -5
  93. data/test/test_Enum.cpp +152 -40
  94. data/test/test_Exception.cpp +235 -0
  95. data/test/test_File.cpp +70 -0
  96. data/test/test_From_Ruby.cpp +542 -0
  97. data/test/test_Hash.cpp +5 -0
  98. data/test/test_Identifier.cpp +5 -0
  99. data/test/test_Inheritance.cpp +6 -1
  100. data/test/test_Iterator.cpp +5 -0
  101. data/test/test_JumpException.cpp +22 -0
  102. data/test/test_Keep_Alive.cpp +6 -1
  103. data/test/test_Keep_Alive_No_Wrapper.cpp +5 -0
  104. data/test/test_Memory_Management.cpp +5 -0
  105. data/test/test_Module.cpp +118 -64
  106. data/test/test_Native_Registry.cpp +2 -33
  107. data/test/test_Object.cpp +5 -0
  108. data/test/test_Overloads.cpp +631 -0
  109. data/test/test_Ownership.cpp +67 -4
  110. data/test/test_Proc.cpp +45 -0
  111. data/test/test_Self.cpp +5 -0
  112. data/test/test_Stl_Exception.cpp +109 -0
  113. data/test/test_Stl_Map.cpp +22 -8
  114. data/test/test_Stl_Optional.cpp +5 -0
  115. data/test/test_Stl_Pair.cpp +7 -2
  116. data/test/test_Stl_Reference_Wrapper.cpp +5 -0
  117. data/test/test_Stl_SmartPointer.cpp +210 -5
  118. data/test/test_Stl_String.cpp +5 -0
  119. data/test/test_Stl_String_View.cpp +5 -0
  120. data/test/test_Stl_Type.cpp +147 -0
  121. data/test/test_Stl_Unordered_Map.cpp +18 -7
  122. data/test/test_Stl_Variant.cpp +5 -0
  123. data/test/test_Stl_Vector.cpp +130 -8
  124. data/test/test_String.cpp +5 -0
  125. data/test/test_Struct.cpp +5 -0
  126. data/test/test_Symbol.cpp +5 -0
  127. data/test/test_Template.cpp +192 -0
  128. data/test/test_To_Ruby.cpp +152 -0
  129. data/test/test_Tracking.cpp +1 -0
  130. data/test/test_Type.cpp +100 -0
  131. data/test/test_global_functions.cpp +53 -6
  132. data/test/unittest.cpp +8 -0
  133. metadata +37 -20
  134. data/lib/version.rb +0 -3
  135. data/rice/Address_Registration_Guard_defn.hpp +0 -79
  136. data/rice/Data_Object_defn.hpp +0 -84
  137. data/rice/Data_Type_defn.hpp +0 -190
  138. data/rice/Exception_defn.hpp +0 -68
  139. data/rice/HandlerRegistration.hpp +0 -15
  140. data/rice/Identifier.hpp +0 -50
  141. data/rice/Identifier.ipp +0 -29
  142. data/rice/detail/ExceptionHandler.hpp +0 -8
  143. data/rice/detail/ExceptionHandler.ipp +0 -28
  144. data/rice/detail/ExceptionHandler_defn.hpp +0 -77
  145. data/rice/detail/Jump_Tag.hpp +0 -21
  146. data/rice/detail/NativeAttribute.hpp +0 -64
  147. data/rice/detail/NativeAttribute.ipp +0 -112
  148. data/rice/detail/from_ruby_defn.hpp +0 -38
  149. data/rice/detail/to_ruby_defn.hpp +0 -48
  150. data/test/test_Jump_Tag.cpp +0 -17
  151. data/test/test_To_From_Ruby.cpp +0 -399
@@ -0,0 +1,231 @@
1
+ #include <functional>
2
+
3
+ #include "unittest.hpp"
4
+ #include "embed_ruby.hpp"
5
+ #include <rice/rice.hpp>
6
+ #include <rice/stl.hpp>
7
+
8
+ using namespace Rice;
9
+
10
+ TESTSUITE(Callback);
11
+
12
+ SETUP(Callback)
13
+ {
14
+ embed_ruby();
15
+ }
16
+
17
+ TEARDOWN(Callback)
18
+ {
19
+ rb_gc_start();
20
+ }
21
+
22
+ namespace
23
+ {
24
+ using Callback_T = char*(*)(int, double, bool, char*);
25
+ Callback_T globalCallback;
26
+
27
+ void registerCallback(Callback_T callback)
28
+ {
29
+ globalCallback = callback;
30
+ }
31
+
32
+ char* triggerCallback(int anInt, double aDouble, bool aBool, char* aString)
33
+ {
34
+ if (globalCallback)
35
+ {
36
+ return globalCallback(anInt, aDouble, aBool, aString);
37
+ }
38
+ throw std::runtime_error("Callback has not been registered");
39
+ }
40
+ }
41
+
42
+ TESTCASE(LambdaCallBack)
43
+ {
44
+ Module m = define_module("TestingLambda");
45
+ m.define_module_function("register_callback", registerCallback).
46
+ define_module_function("trigger_callback", triggerCallback);
47
+
48
+ ASSERT_EQUAL(globalCallback, nullptr);
49
+
50
+ std::string code = R"(callback = lambda do |an_int, a_double, a_bool, a_string|
51
+ values = [an_int, a_double, a_bool, a_string]
52
+ values.map {|value| value.to_s}.join(" - ")
53
+ end
54
+ register_callback(callback))";
55
+
56
+
57
+ m.module_eval(code);
58
+ ASSERT((globalCallback != nullptr));
59
+
60
+ String result = m.call("trigger_callback", 1, 2, true, "hello");
61
+ ASSERT_EQUAL("1 - 2.0 - true - hello", result.c_str());
62
+ }
63
+
64
+ TESTCASE(BlockCallBack)
65
+ {
66
+ Module m = define_module("TestingBlock");
67
+ m.define_module_function("register_callback", registerCallback).
68
+ define_module_function("trigger_callback", triggerCallback);
69
+
70
+ std::string code = R"(register_callback do |an_int, a_double, a_bool, a_string|
71
+ values = [an_int, a_double, a_bool, a_string]
72
+ values.map {|value| value.to_s}.join(" - ")
73
+ end)";
74
+
75
+ m.module_eval(code);
76
+
77
+ String result = m.call("trigger_callback", 4, 5.5, false, "Hello block");
78
+ ASSERT_EQUAL("4 - 5.5 - false - Hello block", result.c_str());
79
+ }
80
+
81
+ TESTCASE(ProcCallBack)
82
+ {
83
+ Module m = define_module("TestingProc");
84
+ m.define_module_function("register_callback", registerCallback).
85
+ define_module_function("trigger_callback", triggerCallback);
86
+
87
+ std::string code = R"(callback = Proc.new do |an_int, a_double, a_bool, a_string|
88
+ values = [an_int, a_double, a_bool, a_string]
89
+ values.map {|value| value.to_s}.join(" - ")
90
+ end
91
+ register_callback(callback))";
92
+
93
+ m.module_eval(code);
94
+
95
+ String result = m.call("trigger_callback", 8, 4.4, true, "Hello proc");
96
+ ASSERT_EQUAL("8 - 4.4 - true - Hello proc", result.c_str());
97
+ }
98
+
99
+ TESTCASE(MethodCallBack)
100
+ {
101
+ Module m = define_module("TestingMethod");
102
+ m.define_module_function("register_callback", registerCallback).
103
+ define_module_function("trigger_callback", triggerCallback);
104
+
105
+ std::string code = R"(def self.callback(an_int, a_double, a_bool, a_string)
106
+ values = [an_int, a_double, a_bool, a_string]
107
+ values.map {|value| value.to_s}.join(" - ")
108
+ end
109
+ register_callback(method(:callback).to_proc))";
110
+
111
+ m.module_eval(code);
112
+
113
+ String result = m.call("trigger_callback", 11.1, 22.9, true, "Hello method");
114
+ ASSERT_EQUAL("11 - 22.9 - true - Hello method", result.c_str());
115
+ }
116
+
117
+ namespace
118
+ {
119
+ int functionArg(int i, int(*f)(int))
120
+ {
121
+ return f(i);
122
+ }
123
+ }
124
+
125
+ TESTCASE(FunctionArg)
126
+ {
127
+ Module m = define_module("TestingFunctionArg");
128
+ m.define_module_function("function_arg", functionArg);
129
+
130
+ std::string code = R"(function_arg(4) do |i|
131
+ i * i
132
+ end)";
133
+
134
+ Object result = m.module_eval(code);
135
+ ASSERT_EQUAL(16, detail::From_Ruby<int>().convert(result));
136
+ }
137
+
138
+ namespace
139
+ {
140
+ using Callback_T2 = char*(*)();
141
+ std::vector<Callback_T2> callbacks;
142
+
143
+ void registerCallback(Callback_T2 callback1, Callback_T2 callback2)
144
+ {
145
+ callbacks.push_back(callback1);
146
+ callbacks.push_back(callback2);
147
+ }
148
+
149
+ char* triggerCallback(int callBackIndex)
150
+ {
151
+ Callback_T2 callback = callbacks[callBackIndex];
152
+ return callback();
153
+ }
154
+ }
155
+
156
+ #ifdef HAVE_LIBFFI
157
+ TESTCASE(MultipleCallbacks)
158
+ {
159
+ Module m = define_module("TestingMultipleCallbacks");
160
+ m.define_module_function<void(*)(Callback_T2, Callback_T2)>("register_callback", registerCallback).
161
+ define_module_function<char*(*)(int)>("trigger_callback", triggerCallback);
162
+
163
+ std::string code = R"(proc1 = Proc.new do
164
+ "Proc 1"
165
+ end
166
+
167
+ proc2 = Proc.new do
168
+ "Proc 2"
169
+ end
170
+
171
+ register_callback(proc1, proc2))";
172
+
173
+ m.module_eval(code);
174
+
175
+ String result = m.call("trigger_callback", 0);
176
+ ASSERT_EQUAL("Proc 1", result.c_str());
177
+
178
+ result = m.call("trigger_callback", 1);
179
+ ASSERT_EQUAL("Proc 2", result.c_str());
180
+ }
181
+ #endif
182
+
183
+ namespace
184
+ {
185
+ using Callback_T3 = char*(*)(void* userData);
186
+ Callback_T3 globalCallback3;
187
+ void* globalUserData = nullptr;
188
+
189
+ void registerCallback3(Callback_T3 callback, void* userData)
190
+ {
191
+ globalCallback3 = callback;
192
+ globalUserData = userData;
193
+ }
194
+
195
+ char* triggerCallback3()
196
+ {
197
+ if (globalCallback3)
198
+ {
199
+ return globalCallback3(globalUserData);
200
+ }
201
+ throw std::runtime_error("Callback has not been registered");
202
+ }
203
+ }
204
+
205
+ TESTCASE(UserData)
206
+ {
207
+ Module m = define_module("TestingUserData");
208
+ m.define_module_function("register_callback", registerCallback3, Arg("callback"), Arg("user_data").setOpaque()).
209
+ define_module_function("trigger_callback", triggerCallback3);
210
+
211
+ define_callback<Callback_T3>(Arg("user_data").setOpaque());
212
+
213
+ std::string code = R"(class UserDataClass
214
+ end
215
+
216
+ user_data_1 = UserDataClass.new
217
+
218
+ callback = Proc.new do |user_data_2|
219
+ unless user_data_1.equal?(user_data_2)
220
+ raise("Unexpected user data object")
221
+ end
222
+ user_data_2.class.name
223
+ end
224
+
225
+ register_callback(callback, user_data_1))";
226
+
227
+ m.module_eval(code);
228
+
229
+ String result = m.call("trigger_callback");
230
+ ASSERT_EQUAL("TestingUserData::UserDataClass", result.c_str());
231
+ }
data/test/test_Class.cpp CHANGED
@@ -11,6 +11,11 @@ SETUP(Class)
11
11
  embed_ruby();
12
12
  }
13
13
 
14
+ TEARDOWN(Class)
15
+ {
16
+ rb_gc_start();
17
+ }
18
+
14
19
  TESTCASE(construct)
15
20
  {
16
21
  Class c(rb_cObject);
@@ -125,37 +130,6 @@ TESTCASE(module_function)
125
130
  );
126
131
  }
127
132
 
128
- namespace
129
- {
130
- class Silly_Exception
131
- : public std::exception
132
- {
133
- };
134
-
135
- void handle_silly_exception(Silly_Exception const & ex)
136
- {
137
- throw Exception(rb_eRuntimeError, "SILLY");
138
- }
139
-
140
- void throw_silly_exception()
141
- {
142
- throw Silly_Exception();
143
- }
144
- }
145
-
146
- TESTCASE(add_handler)
147
- {
148
- register_handler<Silly_Exception>(handle_silly_exception);
149
-
150
- Class c(rb_cObject);
151
- c.define_function("foo", throw_silly_exception);
152
-
153
- Object exc = detail::protect(rb_eval_string, "begin; foo; rescue Exception; $!; end");
154
- ASSERT_EQUAL(rb_eRuntimeError, CLASS_OF(exc));
155
- Exception ex(exc);
156
- ASSERT_EQUAL("SILLY", ex.what());
157
- }
158
-
159
133
  TESTCASE(define_class)
160
134
  {
161
135
  Class object(rb_cObject);
@@ -7,6 +7,16 @@ using namespace Rice;
7
7
 
8
8
  TESTSUITE(Constructor);
9
9
 
10
+ SETUP(Constructor)
11
+ {
12
+ embed_ruby();
13
+ }
14
+
15
+ TEARDOWN(Constructor)
16
+ {
17
+ rb_gc_start();
18
+ }
19
+
10
20
  namespace
11
21
  {
12
22
  class Default_Constructible
@@ -18,11 +28,6 @@ namespace
18
28
  };
19
29
  }
20
30
 
21
- SETUP(Array)
22
- {
23
- embed_ruby();
24
- }
25
-
26
31
  TESTCASE(default_constructor)
27
32
  {
28
33
  Data_Type<Default_Constructible> rb_cDefault_Constructible(anonymous_class());
@@ -31,7 +36,6 @@ TESTCASE(default_constructor)
31
36
  ASSERT_EQUAL(rb_cDefault_Constructible, o.class_of());
32
37
  }
33
38
 
34
-
35
39
  namespace
36
40
  {
37
41
  class Non_Default_Constructible
@@ -125,3 +129,62 @@ TESTCASE(constructor_supports_single_default_argument)
125
129
  klass.call("new", 6);
126
130
  ASSERT_EQUAL(6, withArgX);
127
131
  }
132
+
133
+ namespace
134
+ {
135
+ class MyClass
136
+ {
137
+ public:
138
+ MyClass() = default;
139
+ MyClass(const MyClass& other) = default;
140
+ MyClass(MyClass&& other) = default;
141
+ int value;
142
+ };
143
+ }
144
+
145
+ TESTCASE(constructor_clone)
146
+ {
147
+ Class c = define_class<MyClass>("MyClass")
148
+ .define_constructor(Constructor<MyClass>())
149
+ .define_constructor(Constructor<MyClass, const MyClass&>())
150
+ .define_attr("value", &MyClass::value);
151
+
152
+ // Default constructor
153
+ Object o1 = c.call("new");
154
+ o1.call("value=", 7);
155
+ ASSERT_EQUAL(c, o1.class_of());
156
+
157
+ // Clone
158
+ Object o2 = o1.call("clone");
159
+ Object value = o2.call("value");
160
+ ASSERT_EQUAL(c, o2.class_of());
161
+ ASSERT_EQUAL(7, detail::From_Ruby<int>().convert(value));
162
+ }
163
+
164
+ TESTCASE(constructor_dup)
165
+ {
166
+ Class c = define_class<MyClass>("MyClass").
167
+ define_constructor(Constructor<MyClass>()).
168
+ define_constructor(Constructor<MyClass, const MyClass&>()).
169
+ define_attr("value", &MyClass::value);
170
+
171
+ // Default constructor
172
+ Object o1 = c.call("new");
173
+ o1.call("value=", 7);
174
+ ASSERT_EQUAL(c, o1.class_of());
175
+
176
+ // Clone
177
+ Object o2 = o1.call("dup");
178
+ Object value = o2.call("value");
179
+ ASSERT_EQUAL(c, o2.class_of());
180
+ ASSERT_EQUAL(7, detail::From_Ruby<int>().convert(value));
181
+ }
182
+
183
+ TESTCASE(constructor_move)
184
+ {
185
+ Data_Type<MyClass> c = define_class<MyClass>("MyClass").
186
+ define_constructor(Constructor<MyClass>());
187
+
188
+ // This intentionally will not compile due to a static_assert
189
+ //c.define_constructor(Constructor<MyClass, MyClass&&>());
190
+ }
@@ -48,7 +48,7 @@ SETUP(Data_Object)
48
48
  if (!Data_Type<MyDataType>::is_bound())
49
49
  {
50
50
  Class object(rb_cObject);
51
- if(object.const_defined("MyDataType"))
51
+ if (object.const_defined("MyDataType"))
52
52
  {
53
53
  object.remove_const("MyDataType");
54
54
  }
@@ -58,13 +58,18 @@ SETUP(Data_Object)
58
58
  }
59
59
  }
60
60
 
61
+ TEARDOWN(Data_Object)
62
+ {
63
+ rb_gc_start();
64
+ }
65
+
61
66
  TESTCASE(construct_from_pointer)
62
67
  {
63
68
  MyDataType* myDataType = new MyDataType;
64
69
  Data_Object<MyDataType> wrapped_foo(myDataType);
65
70
  ASSERT_EQUAL(myDataType, wrapped_foo.get());
66
71
  ASSERT_EQUAL(Data_Type<MyDataType>::klass(), wrapped_foo.class_of());
67
- ASSERT_EQUAL(myDataType, detail::unwrap<MyDataType>(wrapped_foo, Data_Type<MyDataType>::ruby_data_type()));
72
+ ASSERT_EQUAL(myDataType, detail::unwrap<MyDataType>(wrapped_foo, Data_Type<MyDataType>::ruby_data_type(), false));
68
73
  }
69
74
 
70
75
  TESTCASE(construct_from_ruby_object)
@@ -76,7 +81,7 @@ TESTCASE(construct_from_ruby_object)
76
81
  ASSERT_EQUAL(myDataType, data_object_foo.get());
77
82
  ASSERT_EQUAL(Data_Type<MyDataType>::klass(), data_object_foo.class_of());
78
83
  ASSERT_EQUAL(RTYPEDDATA(wrapped_foo), RTYPEDDATA(data_object_foo.value()));
79
- ASSERT_EQUAL(myDataType, detail::unwrap<MyDataType>(wrapped_foo, Data_Type<MyDataType>::ruby_data_type()));
84
+ ASSERT_EQUAL(myDataType, detail::unwrap<MyDataType>(wrapped_foo, Data_Type<MyDataType>::ruby_data_type(), false));
80
85
  }
81
86
 
82
87
  TESTCASE(construct_from_ruby_object_and_wrong_class)
@@ -105,7 +110,7 @@ TESTCASE(copy_construct)
105
110
  ASSERT_EQUAL(myDataType, data_object_foo.get());
106
111
  ASSERT_EQUAL(Data_Type<MyDataType>::klass(), data_object_foo.class_of());
107
112
  ASSERT_EQUAL(RTYPEDDATA(wrapped_foo), RTYPEDDATA(data_object_foo.value()));
108
- ASSERT_EQUAL(myDataType, detail::unwrap<MyDataType>(wrapped_foo, Data_Type<MyDataType>::ruby_data_type()));
113
+ ASSERT_EQUAL(myDataType, detail::unwrap<MyDataType>(wrapped_foo, Data_Type<MyDataType>::ruby_data_type(), false));
109
114
  }
110
115
 
111
116
  TESTCASE(move_construct)