ruby-changes:31602
From: nobu <ko1@a...>
Date: Fri, 15 Nov 2013 17:07:42 +0900 (JST)
Subject: [ruby-changes:31602] nobu:r43681 (trunk): iseq.c: fix values for true
nobu 2013-11-15 17:07:35 +0900 (Fri, 15 Nov 2013) New Revision: 43681 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43681 Log: iseq.c: fix values for true * iseq.c (make_compile_option): fill with 1 of int, not char if opt is true. Modified files: trunk/iseq.c Index: iseq.c =================================================================== --- iseq.c (revision 43680) +++ iseq.c (revision 43681) @@ -350,7 +350,9 @@ make_compile_option(rb_compile_option_t https://github.com/ruby/ruby/blob/trunk/iseq.c#L350 *option = COMPILE_OPTION_FALSE; } else if (opt == Qtrue) { - memset(option, 1, sizeof(rb_compile_option_t)); + int i; + for (i = 0; i < (int)(sizeof(rb_compile_option_t) / sizeof(int)); ++i) + ((int *)option)[i] = 1; } else if (CLASS_OF(opt) == rb_cHash) { *option = COMPILE_OPTION_DEFAULT; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/