Skip to content

Instantly share code, notes, and snippets.

@takaokouji
Created February 15, 2010 15:03
Show Gist options
  • Save takaokouji/304705 to your computer and use it in GitHub Desktop.
Save takaokouji/304705 to your computer and use it in GitHub Desktop.
diff --git a/array.c b/array.c
index 7cf2d4a..3f70acc 100644
--- a/array.c
+++ b/array.c
@@ -50,7 +50,7 @@ rary_reserve(VALUE ary, size_t newlen)
for (size_t i = 0; i < rary->len; i++) {
GC_WB(&new_elements[i], rary->elements[i]);
}
- GC_WB(&ary->elements, new_elements);
+ GC_WB(&rary->elements, new_elements);
#else
VALUE *new_elements = xrealloc(rary->elements,
sizeof(VALUE) * newlen);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment