diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-29 15:29:09 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-29 15:29:09 +0000 |
commit | cd89edc065296409f55ab15a45c4dd580950829f (patch) | |
tree | b733d13027c4b37a4a78c6b9f9c2a6d35b4f5037 | |
parent | 99de7f24f76a0ea1dc61a404a815611801107e0e (diff) | |
download | ruby-cd89edc065296409f55ab15a45c4dd580950829f.tar.gz |
* encoding.c (rb_enc_dummy_p): bootstrap encodings can not be dummy.
* encoding.c (rb_enc_ascget): no needs to call rb_enc_precise_mbclen()
twice.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | encoding.c | 6 | ||||
-rw-r--r-- | version.h | 8 |
3 files changed, 15 insertions, 6 deletions
@@ -1,3 +1,10 @@ +Sat Mar 1 00:29:07 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * encoding.c (rb_enc_dummy_p): bootstrap encodings can not be dummy. + + * encoding.c (rb_enc_ascget): no needs to call rb_enc_precise_mbclen() + twice. + Fri Feb 29 23:14:38 2008 Yukihiro Matsumoto <matz@ruby-lang.org> * test/ruby/test_m17n_comb.rb (TestM17NComb::test_str_chomp): test diff --git a/encoding.c b/encoding.c index 5c24c98505..92ed9db1d5 100644 --- a/encoding.c +++ b/encoding.c @@ -349,7 +349,9 @@ encdb_dummy(const char *name) int rb_enc_dummy_p(rb_encoding *enc) { - VALUE encoding = rb_enc_from_encoding(enc); + VALUE encoding; + if (!enc_initialized_p(enc)) return Qfalse; + encoding = rb_enc_from_encoding(enc); return ENC_DUMMY_P(encoding); } @@ -772,7 +774,7 @@ rb_enc_ascget(const char *p, const char *e, int *len, rb_encoding *enc) l = rb_enc_precise_mbclen(p, e, enc); if (!MBCLEN_CHARFOUND_P(l)) return -1; - c = rb_enc_codepoint(p, e, enc); + c = rb_enc_mbc_to_codepoint(p, e, enc); if (!rb_enc_isascii(c, enc)) return -1; if (len) *len = l; @@ -1,15 +1,15 @@ #define RUBY_VERSION "1.9.0" -#define RUBY_RELEASE_DATE "2008-02-29" +#define RUBY_RELEASE_DATE "2008-03-01" #define RUBY_VERSION_CODE 190 -#define RUBY_RELEASE_CODE 20080229 +#define RUBY_RELEASE_CODE 20080301 #define RUBY_PATCHLEVEL 0 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 0 #define RUBY_RELEASE_YEAR 2008 -#define RUBY_RELEASE_MONTH 2 -#define RUBY_RELEASE_DAY 29 +#define RUBY_RELEASE_MONTH 3 +#define RUBY_RELEASE_DAY 1 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[]; |