Merge pull request #4167 from mike9005/patch-1

Ruby: Fix scope resolution for MessageExts
pull/4313/merge
Joshua Haberman 7 years ago committed by GitHub
commit 4f110257c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      ruby/ext/google/protobuf_c/message.c

@ -540,9 +540,9 @@ VALUE build_class_from_descriptor(Descriptor* desc) {
get_def_obj(desc->msgdef));
rb_define_alloc_func(klass, Message_alloc);
rb_require("google/protobuf/message_exts");
rb_include_module(klass, rb_eval_string("Google::Protobuf::MessageExts"));
rb_include_module(klass, rb_eval_string("::Google::Protobuf::MessageExts"));
rb_extend_object(
klass, rb_eval_string("Google::Protobuf::MessageExts::ClassMethods"));
klass, rb_eval_string("::Google::Protobuf::MessageExts::ClassMethods"));
rb_define_method(klass, "method_missing",
Message_method_missing, -1);

Loading…
Cancel
Save