summaryrefslogtreecommitdiff
path: root/regex.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-02-13 05:10:46 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-02-13 05:10:46 +0000
commit2db6b52feb61614cad74ce417d66b8af09ba39db (patch)
tree8d34430272d3aa8a2c0dd4918766b96da7f86782 /regex.c
parente393a67aa9fa9a5a6c2ed1f051dc93c1d239012f (diff)
downloadruby-2db6b52feb61614cad74ce417d66b8af09ba39db.tar.gz
* parse.y (primary): preserve and clear in_single and in_def using
stack to prevent nested method errors in singleton class bodies. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/regex.c b/regex.c
index d4c1c2a915..07963b5d1d 100644
--- a/regex.c
+++ b/regex.c
@@ -3461,7 +3461,8 @@ re_search(bufp, string, size, startpos, range, regs)
#define PREV_IS_A_LETTER(d) ((current_mbctype == MBCTYPE_SJIS)? \
IS_A_LETTER((d)-(!AT_STRINGS_BEG((d)-1)&& \
ismbchar((d)[-2])?2:1)): \
- ((d)[-1] >= 0x80 || IS_A_LETTER((d)-1)))
+ ((current_mbctype && ((d)[-1] >= 0x80)) || \
+ IS_A_LETTER((d)-1)))
static void
init_regs(regs, num_regs)