diff --git a/ruby/src/main/java/com/google/protobuf/jruby/RubyFieldDescriptor.java b/ruby/src/main/java/com/google/protobuf/jruby/RubyFieldDescriptor.java index 6f52e1006785..189d881fbc25 100644 --- a/ruby/src/main/java/com/google/protobuf/jruby/RubyFieldDescriptor.java +++ b/ruby/src/main/java/com/google/protobuf/jruby/RubyFieldDescriptor.java @@ -287,6 +287,8 @@ protected FieldDescriptor getDescriptor() { private void calculateLabel(ThreadContext context) { if (descriptor.isRepeated()) { this.label = context.runtime.newSymbol("repeated"); + } else if (descriptor.isRequired()) { + this.label = context.runtime.newSymbol("required"); } else if (descriptor.isOptional()) { this.label = context.runtime.newSymbol("optional"); } else {