1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

inspect,to_s dump core

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2000-05-24 07:36:46 +00:00
parent 9cdfe3496f
commit 21f39b43b8

5
re.c
View file

@ -248,13 +248,14 @@ rb_reg_desc(s, len, re)
{
VALUE str = rb_str_new2("/");
rb_reg_check(re);
rb_reg_expr_str(str, s, len);
rb_str_cat2(str, "/");
if (re) {
rb_reg_check(re);
if (RREGEXP(re)->ptr->options & RE_OPTION_MULTILINE)
rb_str_cat2(str, "m");
if (RREGEXP(re)->ptr->options & RE_OPTION_POSIXLINE)
/* /p is obsolete; to be removed */
if ((RREGEXP(re)->ptr->options & RE_OPTION_POSIXLINE) == RE_OPTION_POSIXLINE)
rb_str_cat2(str, "p");
if (RREGEXP(re)->ptr->options & RE_OPTION_IGNORECASE)
rb_str_cat2(str, "i");