diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-18 06:51:19 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-18 06:51:19 +0000 |
commit | 4ccfa1e9f8c99d28863b7de6f10eaf718cac49c7 (patch) | |
tree | baf72da71c1c6275840088a46b96e8cee1d08435 | |
parent | ad5ff1c23758bf23bc58ec16dd7dc2152ab68c21 (diff) |
* re.c (rb_reg_desc): re might be NULL.
* regerror.c (onig_error_code_to_format): message updated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | re.c | 2 | ||||
-rw-r--r-- | regerror.c | 2 |
3 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,9 @@ +Tue Nov 18 15:50:11 2008 Yukihiro Matsumoto <matz@ruby-lang.org> + + * re.c (rb_reg_desc): re might be NULL. + + * regerror.c (onig_error_code_to_format): message updated. + Tue Nov 18 09:42:11 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> * lib/optparse.rb (OptionParser::make_switch): makes default @@ -380,7 +380,7 @@ static VALUE rb_reg_desc(const char *s, long len, VALUE re) { VALUE str = rb_str_buf_new2("/"); - if (rb_enc_asciicompat(rb_enc_get(re))) { + if (re && rb_enc_asciicompat(rb_enc_get(re))) { rb_enc_copy(str, re); } else { diff --git a/regerror.c b/regerror.c index d5d1f4008e..780ba94a0e 100644 --- a/regerror.c +++ b/regerror.c @@ -51,7 +51,7 @@ onig_error_code_to_format(int code) case ONIG_NO_SUPPORT_CONFIG: p = "no support in this configuration"; break; case ONIGERR_MEMORY: - p = "fail to memory allocation"; break; + p = "failed to allocate memory"; break; case ONIGERR_MATCH_STACK_LIMIT_OVER: p = "match-stack limit over"; break; case ONIGERR_TYPE_BUG: |