aboutsummaryrefslogtreecommitdiffhomepage
path: root/ruby/src/main/java/com/google/protobuf/jruby/RubyMap.java
diff options
context:
space:
mode:
authorGravatar Josh Haberman <jhaberman@gmail.com>2016-07-25 01:26:14 -0700
committerGravatar Josh Haberman <jhaberman@gmail.com>2016-07-25 01:26:14 -0700
commitd07a9963df7c01d978c0749eb5753f98a3f0dc65 (patch)
tree988466b2010ee121799582f77fd54e6d1ac3c767 /ruby/src/main/java/com/google/protobuf/jruby/RubyMap.java
parentff7f68ae9fcf4f4e3bdef3c8c372c7ae91b7720b (diff)
Ruby: fixed string freezing for JRuby.
Diffstat (limited to 'ruby/src/main/java/com/google/protobuf/jruby/RubyMap.java')
-rw-r--r--ruby/src/main/java/com/google/protobuf/jruby/RubyMap.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/ruby/src/main/java/com/google/protobuf/jruby/RubyMap.java b/ruby/src/main/java/com/google/protobuf/jruby/RubyMap.java
index 2d4c03b5..3adaa2a8 100644
--- a/ruby/src/main/java/com/google/protobuf/jruby/RubyMap.java
+++ b/ruby/src/main/java/com/google/protobuf/jruby/RubyMap.java
@@ -148,8 +148,8 @@ public class RubyMap extends RubyObject {
*/
@JRubyMethod(name = "[]=")
public IRubyObject indexSet(ThreadContext context, IRubyObject key, IRubyObject value) {
- Utils.checkType(context, keyType, key, (RubyModule) valueTypeClass);
- Utils.checkType(context, valueType, value, (RubyModule) valueTypeClass);
+ key = Utils.checkType(context, keyType, key, (RubyModule) valueTypeClass);
+ value = Utils.checkType(context, valueType, value, (RubyModule) valueTypeClass);
IRubyObject symbol;
if (valueType == Descriptors.FieldDescriptor.Type.ENUM &&
Utils.isRubyNum(value) &&