summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-15 08:07:35 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-15 08:07:35 +0000
commit3eac78dd88982c2f1388d7a974c58ed5d2214e12 (patch)
tree4d70ee34ceee8b4e5ffaaabba8a6ef10a5f89173 /iseq.c
parent5caf681291e48b6c89ae3458c595745831c6b3fd (diff)
iseq.c: fix values for true
* iseq.c (make_compile_option): fill with 1 of int, not char if opt is true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/iseq.c b/iseq.c
index 504e96be1e..2db1d3be56 100644
--- a/iseq.c
+++ b/iseq.c
@@ -350,7 +350,9 @@ make_compile_option(rb_compile_option_t *option, VALUE opt)
*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;