mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
merges r24425 from trunk into ruby_1_9_1.
-- * encoding.c (rb_enc_associate_index): cannot set encoding on special constants. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ff3f19a16c
commit
217fbb2cf0
3 changed files with 7 additions and 1 deletions
|
@ -3,6 +3,9 @@ Thu Aug 6 16:25:08 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
* encoding.c (enc_capable, rb_enc_get_index): Symbol is encoding
|
* encoding.c (enc_capable, rb_enc_get_index): Symbol is encoding
|
||||||
capable.
|
capable.
|
||||||
|
|
||||||
|
* encoding.c (rb_enc_associate_index): cannot set encoding on
|
||||||
|
special constants.
|
||||||
|
|
||||||
Wed Aug 5 19:11:01 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
Wed Aug 5 19:11:01 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* ruby.c (rb_stdio_set_default_encoding): declared.
|
* ruby.c (rb_stdio_set_default_encoding): declared.
|
||||||
|
|
|
@ -617,6 +617,9 @@ rb_enc_associate_index(VALUE obj, int idx)
|
||||||
/* enc_check_capable(obj);*/
|
/* enc_check_capable(obj);*/
|
||||||
if (rb_enc_get_index(obj) == idx)
|
if (rb_enc_get_index(obj) == idx)
|
||||||
return obj;
|
return obj;
|
||||||
|
if (SPECIAL_CONST_P(obj)) {
|
||||||
|
rb_raise(rb_eArgError, "cannot set encoding");
|
||||||
|
}
|
||||||
if (!ENC_CODERANGE_ASCIIONLY(obj) ||
|
if (!ENC_CODERANGE_ASCIIONLY(obj) ||
|
||||||
!rb_enc_asciicompat(rb_enc_from_index(idx))) {
|
!rb_enc_asciicompat(rb_enc_from_index(idx))) {
|
||||||
ENC_CODERANGE_CLEAR(obj);
|
ENC_CODERANGE_CLEAR(obj);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#define RUBY_VERSION "1.9.1"
|
#define RUBY_VERSION "1.9.1"
|
||||||
#define RUBY_PATCHLEVEL 278
|
#define RUBY_PATCHLEVEL 279
|
||||||
#define RUBY_VERSION_MAJOR 1
|
#define RUBY_VERSION_MAJOR 1
|
||||||
#define RUBY_VERSION_MINOR 9
|
#define RUBY_VERSION_MINOR 9
|
||||||
#define RUBY_VERSION_TEENY 1
|
#define RUBY_VERSION_TEENY 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue