From 137a2f316ec85debe731e641e58ff82f21c6c96c Mon Sep 17 00:00:00 2001 From: naruse Date: Thu, 21 Feb 2008 01:36:50 +0000 Subject: * include/ruby/encoding.h (rb_enc_asciicompat): dummy encoding is not ascii compatible. [ruby-dev:33878] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/encoding.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/ruby/encoding.h') diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h index dcae15a03..622e2fe73 100644 --- a/include/ruby/encoding.h +++ b/include/ruby/encoding.h @@ -154,7 +154,7 @@ int rb_enc_codelen(int code, rb_encoding *enc); #define rb_enc_isspace(c,enc) ONIGENC_IS_CODE_SPACE(enc,c) #define rb_enc_isdigit(c,enc) ONIGENC_IS_CODE_DIGIT(enc,c) -#define rb_enc_asciicompat(enc) (rb_enc_mbminlen(enc)==1) +#define rb_enc_asciicompat(enc) (!rb_enc_dummy_p(enc) && rb_enc_mbminlen(enc)==1) int rb_enc_casefold(char *to, const char *p, const char *e, rb_encoding *enc); int rb_enc_toupper(int c, rb_encoding *enc); -- cgit