diff options
author | Paul Yang <TeBoring@users.noreply.github.com> | 2017-12-08 12:38:25 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-08 12:38:25 -0800 |
commit | cf7c15e31a456f634d4e3deaf4ef74a6bfad825d (patch) | |
tree | b46faa0d6c198764257b874e963c8f5f066792fd /ruby/ext/google/protobuf_c/map.c | |
parent | 0e7b58956684c7c2fc228eff9173ea2ae50de911 (diff) | |
download | protobuf-cf7c15e31a456f634d4e3deaf4ef74a6bfad825d.tar.gz protobuf-cf7c15e31a456f634d4e3deaf4ef74a6bfad825d.tar.bz2 protobuf-cf7c15e31a456f634d4e3deaf4ef74a6bfad825d.zip |
Fix ruby gc_test in ruby 2.4 (#4011)
* Fix ruby gc_test in ruby 2.4
* Initialize global variables to Qnil.
Diffstat (limited to 'ruby/ext/google/protobuf_c/map.c')
-rw-r--r-- | ruby/ext/google/protobuf_c/map.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ruby/ext/google/protobuf_c/map.c b/ruby/ext/google/protobuf_c/map.c index 26e22dc7..8c2f6424 100644 --- a/ruby/ext/google/protobuf_c/map.c +++ b/ruby/ext/google/protobuf_c/map.c @@ -825,8 +825,8 @@ VALUE Map_iter_value(Map_iter* iter) { void Map_register(VALUE module) { VALUE klass = rb_define_class_under(module, "Map", rb_cObject); rb_define_alloc_func(klass, Map_alloc); - cMap = klass; rb_gc_register_address(&cMap); + cMap = klass; rb_define_method(klass, "initialize", Map_init, -1); rb_define_method(klass, "each", Map_each, 0); |