rice 4.2.1 → 4.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +169 -162
- data/include/rice/rice.hpp +8762 -8672
- data/include/rice/stl.hpp +128 -10
- data/lib/version.rb +3 -3
- data/rice/Data_Object.ipp +386 -313
- data/rice/Data_Type.ipp +1 -0
- data/rice/Identifier.hpp +50 -50
- data/rice/Identifier.ipp +28 -28
- data/rice/detail/NativeFunction.hpp +119 -119
- data/rice/detail/NativeFunction.ipp +300 -300
- data/rice/detail/NativeIterator.hpp +1 -1
- data/rice/detail/NativeIterator.ipp +101 -101
- data/rice/detail/Wrapper.ipp +11 -1
- data/rice/stl.hpp +1 -0
- data/test/embed_ruby.cpp +2 -2
- data/test/test_Array.cpp +301 -301
- data/test/test_Iterator.cpp +356 -290
- data/test/test_Stl_SmartPointer.cpp +45 -2
- data/test/test_Stl_String_View.cpp +88 -0
- data/test/test_Stl_Unordered_Map.cpp +38 -34
- data/test/test_Stl_Vector.cpp +871 -811
- data/test/test_String.cpp +15 -0
- metadata +4 -3
data/test/test_String.cpp
CHANGED
@@ -54,6 +54,21 @@ TESTCASE(construct_from_std_string)
|
|
54
54
|
ASSERT_EQUAL("foo", RSTRING_PTR(s.value()));
|
55
55
|
}
|
56
56
|
|
57
|
+
TESTCASE(construct_from_std_string_view)
|
58
|
+
{
|
59
|
+
std::string_view foo("foo");
|
60
|
+
String s(foo);
|
61
|
+
ASSERT_EQUAL(T_STRING, rb_type(s));
|
62
|
+
ASSERT_EQUAL("foo", RSTRING_PTR(s.value()));
|
63
|
+
|
64
|
+
{
|
65
|
+
foo = "foo 2";
|
66
|
+
s = foo;
|
67
|
+
}
|
68
|
+
ASSERT_EQUAL(T_STRING, rb_type(s));
|
69
|
+
ASSERT_EQUAL("foo 2", RSTRING_PTR(s.value()));
|
70
|
+
}
|
71
|
+
|
57
72
|
TESTCASE(format)
|
58
73
|
{
|
59
74
|
String s(String::format("%s %d", "foo", 42));
|
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: 4.
|
4
|
+
version: 4.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Brannan
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-
|
13
|
+
date: 2024-02-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -197,6 +197,7 @@ files:
|
|
197
197
|
- test/test_Stl_Reference_Wrapper.cpp
|
198
198
|
- test/test_Stl_SmartPointer.cpp
|
199
199
|
- test/test_Stl_String.cpp
|
200
|
+
- test/test_Stl_String_View.cpp
|
200
201
|
- test/test_Stl_Unordered_Map.cpp
|
201
202
|
- test/test_Stl_Variant.cpp
|
202
203
|
- test/test_Stl_Vector.cpp
|
@@ -231,7 +232,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
231
232
|
- !ruby/object:Gem::Version
|
232
233
|
version: '0'
|
233
234
|
requirements: []
|
234
|
-
rubygems_version: 3.5.
|
235
|
+
rubygems_version: 3.5.5
|
235
236
|
signing_key:
|
236
237
|
specification_version: 4
|
237
238
|
summary: Ruby Interface for C++ Extensions
|