ruby-changes:12738
From: yugui <ko1@a...>
Date: Sun, 9 Aug 2009 15:33:29 +0900 (JST)
Subject: [ruby-changes:12738] Ruby:r24474 (ruby_1_9_1): merges r24425 from trunk into ruby_1_9_1.
yugui 2009-08-09 00:35:29 +0900 (Sun, 09 Aug 2009) New Revision: 24474 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24474 Log: merges r24425 from trunk into ruby_1_9_1. -- * encoding.c (rb_enc_associate_index): cannot set encoding on special constants. Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/encoding.c branches/ruby_1_9_1/version.h Index: ruby_1_9_1/encoding.c =================================================================== --- ruby_1_9_1/encoding.c (revision 24473) +++ ruby_1_9_1/encoding.c (revision 24474) @@ -617,6 +617,9 @@ /* enc_check_capable(obj);*/ if (rb_enc_get_index(obj) == idx) return obj; + if (SPECIAL_CONST_P(obj)) { + rb_raise(rb_eArgError, "cannot set encoding"); + } if (!ENC_CODERANGE_ASCIIONLY(obj) || !rb_enc_asciicompat(rb_enc_from_index(idx))) { ENC_CODERANGE_CLEAR(obj); Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 24473) +++ ruby_1_9_1/ChangeLog (revision 24474) @@ -3,6 +3,9 @@ * encoding.c (enc_capable, rb_enc_get_index): Symbol is encoding capable. + * encoding.c (rb_enc_associate_index): cannot set encoding on + special constants. + Wed Aug 5 19:11:01 2009 NARUSE, Yui <naruse@r...> * ruby.c (rb_stdio_set_default_encoding): declared. Index: ruby_1_9_1/version.h =================================================================== --- ruby_1_9_1/version.h (revision 24473) +++ ruby_1_9_1/version.h (revision 24474) @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.1" -#define RUBY_PATCHLEVEL 278 +#define RUBY_PATCHLEVEL 279 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/