Index: third_party/protobuf/ruby/src/main/java/com/google/protobuf/jruby/RubyRepeatedField.java |
diff --git a/third_party/protobuf/ruby/src/main/java/com/google/protobuf/jruby/RubyRepeatedField.java b/third_party/protobuf/ruby/src/main/java/com/google/protobuf/jruby/RubyRepeatedField.java |
index ae2907a98501c1499749de8fd632900103186f38..946f9e7468bbf0df3a50d860037e305f474c7838 100644 |
--- a/third_party/protobuf/ruby/src/main/java/com/google/protobuf/jruby/RubyRepeatedField.java |
+++ b/third_party/protobuf/ruby/src/main/java/com/google/protobuf/jruby/RubyRepeatedField.java |
@@ -110,7 +110,7 @@ public class RubyRepeatedField extends RubyObject { |
@JRubyMethod(name = "[]=") |
public IRubyObject indexSet(ThreadContext context, IRubyObject index, IRubyObject value) { |
int arrIndex = normalizeArrayIndex(index); |
- value = Utils.checkType(context, fieldType, value, (RubyModule) typeClass); |
+ Utils.checkType(context, fieldType, value, (RubyModule) typeClass); |
IRubyObject defaultValue = defaultValue(context); |
for (int i = this.storage.size(); i < arrIndex; i++) { |
this.storage.set(i, defaultValue); |
@@ -166,7 +166,7 @@ public class RubyRepeatedField extends RubyObject { |
public IRubyObject push(ThreadContext context, IRubyObject value) { |
if (!(fieldType == Descriptors.FieldDescriptor.Type.MESSAGE && |
value == context.runtime.getNil())) { |
- value = Utils.checkType(context, fieldType, value, (RubyModule) typeClass); |
+ Utils.checkType(context, fieldType, value, (RubyModule) typeClass); |
} |
this.storage.add(value); |
return this.storage; |