From d1b52a00e002fd7a4adbcdeafa0634de6088a88f Mon Sep 17 00:00:00 2001 From: Adam Greene Date: Sun, 3 May 2015 10:55:10 -0700 Subject: adding and simplifying encoders/decoders * make consistent between mri and jruby * create a #to_h and have it use symbols for keys * add #to_json and #to_proto helpers on the Google::Protobuf message classes --- ruby/src/main/java/com/google/protobuf/jruby/RubyMap.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ruby/src/main/java/com/google/protobuf/jruby/RubyMap.java') 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 b25dc6e1..2d4c03b5 100644 --- a/ruby/src/main/java/com/google/protobuf/jruby/RubyMap.java +++ b/ruby/src/main/java/com/google/protobuf/jruby/RubyMap.java @@ -338,7 +338,7 @@ public class RubyMap extends RubyObject { return newMap; } - @JRubyMethod(name = "to_h") + @JRubyMethod(name = {"to_h", "to_hash"}) public RubyHash toHash(ThreadContext context) { return RubyHash.newHash(context.runtime, table, context.runtime.getNil()); } -- cgit v1.2.3