зеркало из https://github.com/github/ruby.git
* parse.y (parser_set_encode): check if encoding is ASCII compatible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
b980803a6e
Коммит
7c69f166bd
|
@ -1,3 +1,7 @@
|
|||
Mon Jan 28 00:39:09 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* parse.y (parser_set_encode): check if encoding is ASCII compatible.
|
||||
|
||||
Sun Jan 27 23:33:35 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* sprintf.c (rb_str_format): fix for left justify flag.
|
||||
|
|
8
parse.y
8
parse.y
|
@ -5746,10 +5746,16 @@ static void
|
|||
parser_set_encode(struct parser_params *parser, const char *name)
|
||||
{
|
||||
int idx = rb_enc_find_index(name);
|
||||
rb_encoding *enc;
|
||||
|
||||
if (idx < 0) {
|
||||
rb_raise(rb_eArgError, "unknown encoding name: %s", name);
|
||||
}
|
||||
parser->enc = rb_enc_from_index(idx);
|
||||
enc = rb_enc_from_index(idx);
|
||||
if (!rb_enc_asciicompat(enc)) {
|
||||
rb_raise(rb_eArgError, "%s is not ASCII compatible", rb_enc_name(enc));
|
||||
}
|
||||
parser->enc = enc;
|
||||
}
|
||||
|
||||
#ifndef RIPPER
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#define RUBY_VERSION "1.9.0"
|
||||
#define RUBY_RELEASE_DATE "2008-01-26"
|
||||
#define RUBY_RELEASE_DATE "2008-01-28"
|
||||
#define RUBY_VERSION_CODE 190
|
||||
#define RUBY_RELEASE_CODE 20080126
|
||||
#define RUBY_RELEASE_CODE 20080128
|
||||
#define RUBY_PATCHLEVEL 0
|
||||
|
||||
#define RUBY_VERSION_MAJOR 1
|
||||
|
@ -9,7 +9,7 @@
|
|||
#define RUBY_VERSION_TEENY 0
|
||||
#define RUBY_RELEASE_YEAR 2008
|
||||
#define RUBY_RELEASE_MONTH 1
|
||||
#define RUBY_RELEASE_DAY 26
|
||||
#define RUBY_RELEASE_DAY 28
|
||||
|
||||
#ifdef RUBY_EXTERN
|
||||
RUBY_EXTERN const char ruby_version[];
|
||||
|
|
Загрузка…
Ссылка в новой задаче