summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
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