summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-12-05 09:57:00 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-12-05 09:57:00 +0000
commitb526738c3b27bc67a3e1017a051aab1163a34117 (patch)
tree05effc78bbcafc051bdd7a057993893ef75ea6c9 /bignum.c
parent8baffe6ef664e53a6acf0c3f52e900d37780fabb (diff)
* bignum.c (big_rshift), compile.c (validate_label,
iseq_build_from_ary_exception), cont.c (cont_capture), dir.c (dir_open_dir), gc.c (objspace_each_objects), io.c (pipe_open) (rb_io_advise), parse.y (parser_compile_string) (rb_parser_compile_file), proc.c (binding_free), process.c (rb_proc_exec_n, rb_seteuid_core, proc_setegid, rb_setegid_core) (p_uid_exchange, p_gid_exchange), regparse.c (strdup_with_null), signal.c (sig_dfl), vm.c (rb_iseq_eval, rb_iseq_eval_main), vm_insnhelper.c (vm_expandarray): suppress unused-but-set-variable warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bignum.c b/bignum.c
index ede52e1613..80db6999b9 100644
--- a/bignum.c
+++ b/bignum.c
@@ -3542,9 +3542,10 @@ big_rshift(VALUE x, unsigned long shift)
return INT2FIX(-1);
}
if (!RBIGNUM_SIGN(x)) {
- save_x = x = rb_big_clone(x);
+ x = rb_big_clone(x);
get2comp(x);
}
+ save_x = x;
xds = BDIGITS(x);
i = RBIGNUM_LEN(x); j = i - s1;
if (j == 0) {
@@ -3564,6 +3565,7 @@ big_rshift(VALUE x, unsigned long shift)
if (!RBIGNUM_SIGN(x)) {
get2comp(z);
}
+ RB_GC_GUARD(save_x);
return z;
}