[BUG:trunk] r20625 default_internal is nil


#1

e$B9bHx9(<#$G$9!#e(B

trunk e$B$Ne(B r20625 e$B0J9_!"%3%^%s%I%i%$%s%*%W%7%g%s$GEO$7$?e(B
default_internal e$B$,e(B nil e$B$K$J$C$F$$$^$9!#e(B

$ svn up -r20624 && make && ./ruby -Eutf-8:utf-8 -e
‘p([Encoding.default_external, Encoding.default_internal])’
[#Encoding:UTF-8, #Encoding:UTF-8]

$ svn up -r20624 && make && ./ruby -Eutf-8:utf-8 -e
‘p([Encoding.default_external, Encoding.default_internal])’
[#Encoding:UTF-8, nil]

e$BD4$Y$?$H$3$m!"%3%^%s%I%i%$%s%%W%7%g%s$Ne(B default_internal
e$B$rE,@Z$K=hM}$7$?$"$H$G!"e(B
shebang e$B$Ne(B default_internal e$B$r2r@O$7$^$9!#e(B
e$B$=$7$F!"e(Bshebang e$B$Ke(B default_internal
e$B$N;XDj$,$J$+$C$?>l9g!"e(B
e$B6/@)E
$Ke(B default_internal e$B$Ke(B nil
e$B$r@_Dj$7$F$$$k$h$&$G$9!#e(B
r20624 e$B$^$G$O!"e(Bdefault_internal
e$B$r:F@_Dj$G$-$J$+$C$?$?$aLdBj$J$+$C$?$h$&$G$9!#e(B

e$B0J2<$N=$@5$G<j85$G$OLdBj$,2r7h$7$F$$$^$9!#e(B

Index: ruby.c

— ruby.c (revision 20679)
+++ ruby.c (working copy)
@@ -1244,7 +1244,7 @@
enc = rb_enc_from_index(opt->intern.enc.index);
rb_enc_set_default_internal(rb_enc_from_encoding(enc));
}

  • else
  • else if (!rb_default_internal_encoding())
    /* Freeze default_internal */
    rb_enc_set_default_internal(Qnil);

#2

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:37409] [BUG:trunk] r20625 default_internal is
nil.”
on Sat, 13 Dec 2008 00:48:09 +0900, Takao K. removed_email_address@domain.invalid
writes:

|trunk e$B$Ne(B r20625 e$B0J9_!"%3%^%s%I%i%$%s%*%W%7%g%s$GEO$7$?e(B
|default_internal e$B$,e(B nil e$B$K$J$C$F$$$^$9!#e(B

|e$B0J2<$N=$@5$G<j85$G$OLdBj$,2r7h$7$F$$$^$9!#e(B

e$B%3%_%C%H$7$F$/$@$5$$!#e(B


#3

e$B%A%1%C%He(B #862 e$B$,99?7$5$l$^$7$?!#e(B (by Kouji T.)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

Applied in changeset r20720.

http://redmine.ruby-lang.org/issues/show/862