summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-24 04:34:26 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-24 04:34:26 +0000
commit8b1de0b1ad49733abeddd8be359ae816b29de59a (patch)
treea7ed03dd3f6442635f694c4367bcd94be57f6dbd /re.c
parent24b9bdca25dc431aff935df7739b9c5ea0ee4077 (diff)
2000-05-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/re.c b/re.c
index 4b14001..9861d52 100644
--- a/re.c
+++ b/re.c
@@ -1060,22 +1060,20 @@ static int
rb_reg_get_kcode(re)
VALUE re;
{
- int kcode = 0;
+ int kcode;
switch (RBASIC(re)->flags & KCODE_MASK) {
case KCODE_NONE:
- kcode |= 16; break;
+ return 16;
case KCODE_EUC:
- kcode |= 32; break;
+ return 32;
case KCODE_SJIS:
- kcode |= 48; break;
+ return 48;
case KCODE_UTF8:
- kcode |= 64; break;
+ return 64;
default:
- break;
+ return 0;
}
-
- return kcode;
}
int