ruby-changes:9162
From: yugui <ko1@a...>
Date: Sat, 13 Dec 2008 10:03:57 +0900 (JST)
Subject: [ruby-changes:9162] Ruby:r20699 (ruby_1_9_1): merges r20626 from trunk into ruby_1-9_1.
yugui 2008-12-13 10:02:51 +0900 (Sat, 13 Dec 2008) New Revision: 20699 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20699 Log: merges r20626 from trunk into ruby_1-9_1. * re.c (reg_enc_error): raise EncodingCompatibilityError for encoding incompatibility. [ruby-core:18600] * re.c (rb_reg_prepare_enc): more consistent error message. [ruby-core:18611] Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/re.c Index: ruby_1_9_1/re.c =================================================================== --- ruby_1_9_1/re.c (revision 20698) +++ ruby_1_9_1/re.c (revision 20699) @@ -1168,7 +1168,7 @@ static void reg_enc_error(VALUE re, VALUE str) { - rb_raise(rb_eArgError, + rb_raise(rb_eEncCompatError, "incompatible encoding regexp match (%s regexp with %s string)", rb_enc_name(RREGEXP(re)->ptr->enc), rb_enc_name(rb_enc_get(str))); @@ -1181,7 +1181,7 @@ if (rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN) { rb_raise(rb_eArgError, - "broken %s string", + "invalid byte sequence in %s", rb_enc_name(rb_enc_get(str))); } Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 20698) +++ ruby_1_9_1/ChangeLog (revision 20699) @@ -1,3 +1,11 @@ +Thu Dec 11 13:09:01 2008 Yukihiro Matsumoto <matz@r...> + + * re.c (reg_enc_error): raise EncodingCompatibilityError for + encoding incompatibility. [ruby-core:18600] + + * re.c (rb_reg_prepare_enc): more consistent error message. + [ruby-core:18611] + Fri Dec 12 19:29:07 2008 Yuki Sonoda (Yugui) <yugui@y...> * encoding.c (rb_enc_set_default_external): default_internal can be -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/