google-protobuf 3.6.0 → 3.6.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28049363eebcb842bbc56cbca6225c1459acc909c4f1f116ef0a267fdfad0ef5
4
- data.tar.gz: 86bdaa737c380e1e7f0629b845503519fbc1d9761e8197efef00c16928bf4a1b
3
+ metadata.gz: 9d569f11638f86d200646f0e97e5728a6064c2d4339128cacdc21f8179795756
4
+ data.tar.gz: 5834db27d3d49a3c98f1e6f751250622085bf216d6f09c76acf85b6a7c8668d6
5
5
  SHA512:
6
- metadata.gz: c1ecf4b286637c8c7212b5e8b8232293aa5094d8d2d6ec919529f0a875cfc36a80bdf36612a74abef2913f1102c31ec261ba3ee87890f3d42899ddeecb0bb9a6
7
- data.tar.gz: 91e283f37c9cada200e7d0021ab7cf8721ac7a838d17e8b357e58474b8d5c93e1030078b8885dd2ee4c9cef710d629f699ba356893b7c9a47aceeab10e9ebed4
6
+ metadata.gz: 71807cae129bb0a8df615d538d1c3bdada1bed8164f15cd57eb857da83e139d000b07f94471b8fbe4f9057b84803ea3bb1b3bee309b1ccb787285cdaf2dc5e02
7
+ data.tar.gz: 33b10d0c2d5c3d964ae23c451b2fa8cef10fac1a606233f8c82b3a6a3cb62cedd76728a7227013ed7a968551f543d02684bb1e70afb0341ed5d08e4706f3d875
@@ -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, NULL);
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, NULL);
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.");
@@ -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 RuntimeError do
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.0
4
+ version: 3.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Protobuf Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-22 00:00:00.000000000 Z
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