Skip to content

Commit

Permalink
Add alias to Map#length
Browse files Browse the repository at this point in the history
  • Loading branch information
miyucy committed Nov 19, 2020
1 parent d7a2643 commit 2ac9eb3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ruby/ext/google/protobuf_c/map.c
Expand Up @@ -826,6 +826,7 @@ void Map_register(VALUE module) {
rb_define_method(klass, "delete", Map_delete, 1);
rb_define_method(klass, "clear", Map_clear, 0);
rb_define_method(klass, "length", Map_length, 0);
rb_define_alias(klass, "size", "length");
rb_define_method(klass, "dup", Map_dup, 0);
rb_define_method(klass, "==", Map_eq, 1);
rb_define_method(klass, "hash", Map_hash, 0);
Expand Down

0 comments on commit 2ac9eb3

Please sign in to comment.