google-protobuf 3.6.0-universal-darwin → 3.6.1-universal-darwin
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of google-protobuf might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/ext/google/protobuf_c/encode_decode.c +7 -0
- data/ext/google/protobuf_c/extconf.rb +3 -1
- data/ext/google/protobuf_c/storage.c +2 -2
- data/lib/google/2.0/protobuf_c.bundle +0 -0
- data/lib/google/2.1/protobuf_c.bundle +0 -0
- data/lib/google/2.2/protobuf_c.bundle +0 -0
- data/lib/google/2.3/protobuf_c.bundle +0 -0
- data/lib/google/2.4/protobuf_c.bundle +0 -0
- data/lib/google/2.5/protobuf_c.bundle +0 -0
- data/tests/basic.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c93d16c4932f8938250700329e0bd001ab34ab24d4ca940f0261f4658af317b
|
4
|
+
data.tar.gz: a5fe1ade1a832a74905b7d130a5a69b3d9508b9ef95287bff7bc19a54b2e8032
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9777d2c7d8db8eedac93aae4da2ad4e3876af54efad5ee13956ed94f315ad025003afdc7feb8faefd22d4883a92c8376d246f678fb4557860fde8f9892cf1a91
|
7
|
+
data.tar.gz: 9f6a3ae46434f65f89f7e86e99faa3693f252123862343b2f21cee28791db71655f14d0f0b925a3e4a6f32e158e014b4af4bfdf97d75d32e800583704cd9e34a
|
@@ -1106,6 +1106,13 @@ static void putmsg(VALUE msg_rb, const Descriptor* desc,
|
|
1106
1106
|
|
1107
1107
|
TypedData_Get_Struct(msg_rb, MessageHeader, &Message_type, msg);
|
1108
1108
|
|
1109
|
+
if (desc != msg->descriptor) {
|
1110
|
+
rb_raise(rb_eArgError,
|
1111
|
+
"The type of given msg is '%s', expect '%s'.",
|
1112
|
+
upb_msgdef_fullname(msg->descriptor->msgdef),
|
1113
|
+
upb_msgdef_fullname(desc->msgdef));
|
1114
|
+
}
|
1115
|
+
|
1109
1116
|
for (upb_msg_field_begin(&i, desc->msgdef);
|
1110
1117
|
!upb_msg_field_done(&i);
|
1111
1118
|
upb_msg_field_next(&i)) {
|
@@ -177,7 +177,7 @@ void native_slot_set_value_and_case(upb_fieldtype_t type, VALUE type_class,
|
|
177
177
|
}
|
178
178
|
case UPB_TYPE_STRING:
|
179
179
|
if (CLASS_OF(value) == rb_cSymbol) {
|
180
|
-
value = rb_funcall(value, rb_intern("to_s"), 0
|
180
|
+
value = rb_funcall(value, rb_intern("to_s"), 0);
|
181
181
|
} else if (CLASS_OF(value) != rb_cString) {
|
182
182
|
rb_raise(rb_eTypeError, "Invalid argument for string field.");
|
183
183
|
}
|
@@ -207,7 +207,7 @@ void native_slot_set_value_and_case(upb_fieldtype_t type, VALUE type_class,
|
|
207
207
|
case UPB_TYPE_ENUM: {
|
208
208
|
int32_t int_val = 0;
|
209
209
|
if (TYPE(value) == T_STRING) {
|
210
|
-
value = rb_funcall(value, rb_intern("to_sym"), 0
|
210
|
+
value = rb_funcall(value, rb_intern("to_sym"), 0);
|
211
211
|
} else if (!is_ruby_num(value) && TYPE(value) != T_SYMBOL) {
|
212
212
|
rb_raise(rb_eTypeError,
|
213
213
|
"Expected number or symbol type for enum field.");
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/tests/basic.rb
CHANGED
@@ -336,7 +336,9 @@ module BasicTest
|
|
336
336
|
|
337
337
|
# strings are immutable so we can't do this, but serialize should catch it.
|
338
338
|
m.optional_string = "asdf".encode!('UTF-8')
|
339
|
-
assert_raise
|
339
|
+
# Ruby 2.5 changed to raise FrozenError. However, assert_raise don't
|
340
|
+
# accept subclass. Don't specify type here.
|
341
|
+
assert_raise do
|
340
342
|
m.optional_string.encode!('ASCII-8BIT')
|
341
343
|
end
|
342
344
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-protobuf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.6.
|
4
|
+
version: 3.6.1
|
5
5
|
platform: universal-darwin
|
6
6
|
authors:
|
7
7
|
- Protobuf Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler-dock
|