Update method_missing as well

pull/11655/head
Charles Guo 2 years ago
parent 85d04c1dd4
commit a15e474da6
  1. 6
      ruby/src/main/java/com/google/protobuf/jruby/RubyMessage.java

@ -455,11 +455,7 @@ public class RubyMessage extends RubyObject {
fieldDescriptor = descriptor.findFieldByName(methodName); fieldDescriptor = descriptor.findFieldByName(methodName);
if (fieldDescriptor != null if (fieldDescriptor != null && fieldDescriptor.hasPresence()) {
&& (!proto3
|| fieldDescriptor.getContainingOneof() == null
|| fieldDescriptor.getContainingOneof().isSynthetic())
&& fieldDescriptor.hasPresence()) {
return fields.containsKey(fieldDescriptor) ? runtime.getTrue() : runtime.getFalse(); return fields.containsKey(fieldDescriptor) ? runtime.getTrue() : runtime.getFalse();
} }

Loading…
Cancel
Save