summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-22 08:29:58 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-22 08:29:58 +0000
commit44cf56d6e70dbe06a160b004494ba40dd4cfb426 (patch)
tree10e665c60414c3070ce957e5c534e30ed499bc2d /re.c
parent4b4cad81e7d2bdc4750ea5043ce44bf37adb3997 (diff)
2000-06-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/re.c b/re.c
index a28ac4a..a778efc 100644
--- a/re.c
+++ b/re.c
@@ -373,7 +373,7 @@ static VALUE
rb_reg_kcode_m(re)
VALUE re;
{
- char *kcode = "$KCODE";
+ char *kcode;
if (FL_TEST(re, KCODE_FIXED)) {
switch (RBASIC(re)->flags & KCODE_MASK) {
@@ -386,11 +386,12 @@ rb_reg_kcode_m(re)
case KCODE_UTF8:
kcode = "utf8"; break;
default:
+ rb_bug("unknow kcode - should not happen");
break;
}
+ return rb_str_new2(kcode);
}
-
- return rb_str_new2(kcode);
+ return Qnil;
}
static Regexp*