diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2018-07-17 18:50:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-17 18:50:04 -0700 |
commit | d85ffdce419eb3e5b8444e2fed7c9e13f3b9637e (patch) | |
tree | 6224f98ad30e99dc2d896423853892f2142f16ed /ruby/ext/google/protobuf_c/storage.c | |
parent | 22503a01722939385a7584c3b65f1c43dc5b2ef8 (diff) | |
parent | 8356d270a54e18c21f4feac6f5e2b6f1061dc8d5 (diff) | |
download | protobuf-d85ffdce419eb3e5b8444e2fed7c9e13f3b9637e.tar.gz protobuf-d85ffdce419eb3e5b8444e2fed7c9e13f3b9637e.tar.bz2 protobuf-d85ffdce419eb3e5b8444e2fed7c9e13f3b9637e.zip |
Merge pull request #4924 from xfxyjwf/3.6.x
Cherry-pick master build fixes and kokoro changes to 3.6.x
Diffstat (limited to 'ruby/ext/google/protobuf_c/storage.c')
-rw-r--r-- | ruby/ext/google/protobuf_c/storage.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ruby/ext/google/protobuf_c/storage.c b/ruby/ext/google/protobuf_c/storage.c index 1437c0b5..5d842b74 100644 --- a/ruby/ext/google/protobuf_c/storage.c +++ b/ruby/ext/google/protobuf_c/storage.c @@ -177,7 +177,7 @@ void native_slot_set_value_and_case(upb_fieldtype_t type, VALUE type_class, } case UPB_TYPE_STRING: if (CLASS_OF(value) == rb_cSymbol) { - value = rb_funcall(value, rb_intern("to_s"), 0, NULL); + value = rb_funcall(value, rb_intern("to_s"), 0); } else if (CLASS_OF(value) != rb_cString) { rb_raise(rb_eTypeError, "Invalid argument for string field."); } @@ -207,7 +207,7 @@ void native_slot_set_value_and_case(upb_fieldtype_t type, VALUE type_class, case UPB_TYPE_ENUM: { int32_t int_val = 0; if (TYPE(value) == T_STRING) { - value = rb_funcall(value, rb_intern("to_sym"), 0, NULL); + value = rb_funcall(value, rb_intern("to_sym"), 0); } else if (!is_ruby_num(value) && TYPE(value) != T_SYMBOL) { rb_raise(rb_eTypeError, "Expected number or symbol type for enum field."); |