summaryrefslogtreecommitdiff
path: root/upb
diff options
context:
space:
mode:
Diffstat (limited to 'upb')
-rw-r--r--upb/bindings/ruby/upb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/upb/bindings/ruby/upb.c b/upb/bindings/ruby/upb.c
index 936baef..0d25610 100644
--- a/upb/bindings/ruby/upb.c
+++ b/upb/bindings/ruby/upb.c
@@ -245,6 +245,8 @@ static VALUE msg_accessor(int argc, VALUE *argv, VALUE obj) {
// method_missing protocol: (method [, arg1, arg2, ...])
assert(argc >= 1 && SYMBOL_P(argv[0]));
+ // OPT(haberman): find a better way to get the method name.
+ // This is allocating a new string each time, which should not be necessary.
VALUE method = rb_id2str(SYM2ID(argv[0]));
const char *method_str = RSTRING_PTR(method);
size_t method_len = RSTRING_LEN(method);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback