Преглед на файлове

Added debugging output to debug type= problem on Travis.

Josh Haberman преди 9 години
родител
ревизия
bf50ec4ac9
променени са 2 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 1 1
      ruby/Gemfile.lock
  2. 2 1
      ruby/ext/google/protobuf_c/defs.c

+ 1 - 1
ruby/Gemfile.lock

@@ -1,7 +1,7 @@
 PATH
   remote: .
   specs:
-    google-protobuf (3.0.0.alpha.4.0)
+    google-protobuf (3.0.0.alpha.5.0)
 
 GEM
   remote: https://rubygems.org/

+ 2 - 1
ruby/ext/google/protobuf_c/defs.c

@@ -543,7 +543,8 @@ VALUE FieldDescriptor_name_set(VALUE _self, VALUE str) {
 
 upb_fieldtype_t ruby_to_fieldtype(VALUE type) {
   if (TYPE(type) != T_SYMBOL) {
-    rb_raise(rb_eArgError, "Expected symbol for field type.");
+    rb_raise(rb_eArgError, "Expected symbol for field type, not: %s (%d)",
+             RSTRING_PTR(rb_inspect(type)), TYPE(type));
   }
 
 #define CONVERT(upb, ruby)                                           \