Permalink
Browse files

fix a missing write barrier

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5111 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information...
1 parent 2be7f67 commit 4cb9b659f96770286ee478a3c9ab6a9acd36ea67 @lrz lrz committed Jan 4, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 parse.y
View
7 parse.y
@@ -9916,7 +9916,12 @@ ripper_initialize(VALUE self, SEL sel, int argc, VALUE *argv)
struct lex_get_str_context *ctx = (struct lex_get_str_context *)
xmalloc(sizeof(struct lex_get_str_context));
GC_WB(&ctx->str, src);
- ctx->chars = chars; // FIXME need write barrier?
+ if (need_free) {
+ GC_WB(&ctx->chars, chars);
+ }
+ else {
+ ctx->chars = chars;
+ }
ctx->chars_len = chars_len;
parser->parser_lex_gets = lex_get_str;

0 comments on commit 4cb9b65

Please sign in to comment.