Skip to content

Commit a15e474

Browse files
committed
Update method_missing as well
1 parent 85d04c1 commit a15e474

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ruby/src/main/java/com/google/protobuf/jruby/RubyMessage.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -455,11 +455,7 @@ public IRubyObject methodMissing(ThreadContext context, IRubyObject[] args) {
455455

456456
fieldDescriptor = descriptor.findFieldByName(methodName);
457457

458-
if (fieldDescriptor != null
459-
&& (!proto3
460-
|| fieldDescriptor.getContainingOneof() == null
461-
|| fieldDescriptor.getContainingOneof().isSynthetic())
462-
&& fieldDescriptor.hasPresence()) {
458+
if (fieldDescriptor != null && fieldDescriptor.hasPresence()) {
463459
return fields.containsKey(fieldDescriptor) ? runtime.getTrue() : runtime.getFalse();
464460
}
465461

0 commit comments

Comments
 (0)