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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f37c1cedd6aa237beef9c2d1141e4db110a0c038c586d9d585fd581fdccfc696
4
- data.tar.gz: 2b2e438f434fab6d285975a6fb3068e1dcb83b4d5f73ad3065d640ab0941f36b
3
+ metadata.gz: 4c93d16c4932f8938250700329e0bd001ab34ab24d4ca940f0261f4658af317b
4
+ data.tar.gz: a5fe1ade1a832a74905b7d130a5a69b3d9508b9ef95287bff7bc19a54b2e8032
5
5
  SHA512:
6
- metadata.gz: 33b3630a1457869f62d8ac4bc151f1074f17fba533fca0f1bfb08f29b40f0590df802d83567b7905029f9bc8702db4543f141e6e08f4a528551723eeb654e9d2
7
- data.tar.gz: 89c703aa13f32910f5ada00162cc75aaf4e4a4ad5f3d34c829eada22e0787c8301912f08ed25be762041f0232b04b22551823576329436a55738645e18644459
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)) {
@@ -2,7 +2,9 @@
2
2
 
3
3
  require 'mkmf'
4
4
 
5
- $CFLAGS += " -std=c99 -O3 -DNDEBUG"
5
+ unless RUBY_PLATFORM =~ /mswin|mingw/
6
+ $CFLAGS += " -std=c99 -O3 -DNDEBUG"
7
+ end
6
8
 
7
9
 
8
10
  if RUBY_PLATFORM =~ /linux/
@@ -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.");
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 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: universal-darwin
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