summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-12 01:06:24 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-12 01:06:24 +0000
commit0e586b35b80985097489c68e8085457d91165696 (patch)
treef8591c9934ab873db13a2f37dbee6ebe6067516f /re.c
parent01cd3467fbd3e9ea212063d0a7405642b8746b94 (diff)
* re.c (rb_reg_initialize_m): fix wrong index for the lang
option's value 'N'. reported by Masaya TARUI via IRC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/re.c b/re.c
index b1e5c1d34d..e4f1968733 100644
--- a/re.c
+++ b/re.c
@@ -2894,7 +2894,7 @@ rb_reg_initialize_m(int argc, VALUE *argv, VALUE self)
enc = 0;
if (argc == 3 && !NIL_P(argv[2])) {
char *kcode = StringValuePtr(argv[2]);
- if (kcode[0] == 'n' || kcode[1] == 'N') {
+ if (kcode[0] == 'n' || kcode[0] == 'N') {
enc = rb_ascii8bit_encoding();
flags |= ARG_ENCODING_NONE;
}