summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-19 04:23:59 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-19 04:23:59 +0000
commit12c0cc0172591b8c6aeb4d8ce4dd1d65792645aa (patch)
tree17502af877ca916d0aa8fda8d28ad4067576713c /vm_insnhelper.c
parent350c2ac453eff853c6a084d355ddc86fcddbfb20 (diff)
vm_args.c: fix KW_SPECIFIED_BITS_MAX
* vm_args.c (KW_SPECIFIED_BITS_MAX): subtracted 1bit for FIXNUM_FLAG. [ruby-core:84921] [Bug #14373] * vm_insnhelper.c (vm_check_keyword): unsigned for bit operation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 7480815d3a..1327050b2d 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -3026,7 +3026,7 @@ vm_check_keyword(lindex_t bits, lindex_t idx, const VALUE *ep)
const VALUE kw_bits = *(ep - bits);
if (FIXNUM_P(kw_bits)) {
- int b = FIX2INT(kw_bits);
+ unsigned int b = (unsigned int)FIX2ULONG(kw_bits);
if ((idx < KW_SPECIFIED_BITS_MAX) && (b & (0x01 << idx)))
return Qfalse;
}