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

* 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
This commit is contained in:
nobu 2008-02-29 15:29:09 +00:00
parent 99de7f24f7
commit cd89edc065
3 changed files with 15 additions and 6 deletions

View file

@ -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

View file

@ -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;

View file

@ -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[];