summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-17 06:33:50 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-17 06:33:50 +0000
commit35e731649da88fda916509eb1cb0a745d772f21c (patch)
tree08681d28d0e918cc08444eefd241ed639fdb8bd4 /re.c
parent133ff3421a9867ec49a23df97aba3db63fc78755 (diff)
thread problems
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/re.c b/re.c
index 729daee..f90e6ee 100644
--- a/re.c
+++ b/re.c
@@ -91,6 +91,7 @@ rb_str_cicmp(str1, str2)
#define REG_IGNORECASE FL_USER1
#define REG_EXTENDED FL_USER2
#define REG_POSIXLINE FL_USER3
+#define REG_MULTILINE FL_USER3
#define KCODE_NONE 0
#define KCODE_EUC FL_USER4
@@ -249,8 +250,8 @@ rb_reg_desc(s, len, re)
rb_str_cat2(str, "i");
if (FL_TEST(re, REG_EXTENDED))
rb_str_cat2(str, "x");
- if (FL_TEST(re, REG_POSIXLINE))
- rb_str_cat2(str, "p");
+ if (FL_TEST(re, REG_MULTILINE))
+ rb_str_cat2(str, "m");
if (FL_TEST(re, KCODE_FIXED)) {
switch ((RBASIC(re)->flags & KCODE_MASK)) {
case KCODE_NONE:
@@ -757,7 +758,7 @@ rb_reg_new_1(klass, s, len, options)
int len;
int options; /* CASEFOLD = 1 */
/* EXTENDED = 2 */
- /* POSIXLINE = 4 */
+ /* MULTILINE = 4 */
/* CODE_NONE = 8 */
/* CODE_EUC = 16 */
/* CODE_SJIS = 24 */
@@ -774,8 +775,8 @@ rb_reg_new_1(klass, s, len, options)
if (options & RE_OPTION_EXTENDED) {
FL_SET(re, REG_EXTENDED);
}
- if (options & RE_OPTION_POSIXLINE) {
- FL_SET(re, REG_POSIXLINE);
+ if (options & RE_OPTION_MULTILINE) {
+ FL_SET(re, REG_MULTILINE);
}
switch (options & ~0x7) {
case 0:
@@ -1297,6 +1298,7 @@ Init_Regexp()
rb_define_const(rb_cRegexp, "IGNORECASE", INT2FIX(RE_OPTION_IGNORECASE));
rb_define_const(rb_cRegexp, "EXTENDED", INT2FIX(RE_OPTION_EXTENDED));
rb_define_const(rb_cRegexp, "POSIXLINE", INT2FIX(RE_OPTION_POSIXLINE));
+ rb_define_const(rb_cRegexp, "MULTILINE", INT2FIX(RE_OPTION_MULTILINE));
rb_global_variable(&reg_cache);