Use same exception class in ruby and jruby

pull/997/head
Anders Carling 9 years ago
parent 0df1e398eb
commit 8bcd0d7fc7
  1. 2
      ruby/src/main/java/com/google/protobuf/jruby/RubyMessage.java

@ -93,7 +93,7 @@ public class RubyMessage extends RubyObject {
maps.put(fieldDescriptor, map);
} else if (fieldDescriptor.isRepeated()) {
if (!(value instanceof RubyArray))
throw runtime.newTypeError("Expected array as initializer var for repeated field.");
throw runtime.newArgumentError("Expected array as initializer var for repeated field.");
RubyRepeatedField repeatedField = rubyToRepeatedField(context, fieldDescriptor, value);
addRepeatedField(fieldDescriptor, repeatedField);
} else {

Loading…
Cancel
Save