Encode! は変換しないときに <nil> になってしまう瘢雹。

e$BCfED$5$s!"$3$s$K$A$O!#e(B

test/ruby/test_transcode.rb e$B$Ne(B 37
e$B9TL$G%(%i!<$K$J$C$F$7$^$C$F$$$^$9!#e(B

assert_equal('abc'.force_encoding('Shift_JIS'), 

abc.force_encoding(Shift_JIS).encode!(Shift_JIS))
e$B$Ge(B <abc> expected but was .

e$B$K$J$C$F$$$^$9!#860x$O$h$/J,$+$j$^$;$s!#$b$7?4Ev$?$j$,$"$l$Pe(B
e$B65$([email protected]$1$^$9$G$7$g$&$+!#e(B

e$B59$7$/$*4j$$$7$^$9!#e(B Martin.

P.S.: e$B:#=5$O<x6H$,G$"$j$^$7$?$7!"e(Bcommit
[email protected]_Dj$b;~4V$,$+$+$j$^$7$?$,!"e(B
e$B$3$l$+$i$A$g$/$A$g$/e(B commit e$B$7$?$$$H;W$C$F$$$^$9!#e(B

#-#-# Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University
#-#-# http://www.sw.it.aoyama.ac.jp mailto:[email protected]

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

In message Re: [ruby-dev:32662] encode! e$B$OJQ49$7$J$$$H$-$Ke(B
e$B$K$J$C$F$7$^$&!#e(B
on Fri, 21 Dec 2007 16:17:42 +0900, Martin D.
[email protected] writes:

|test/ruby/test_transcode.rb e$B$Ne(B 37 e$B9TL$G%(%i!<$K$J$C$F$7$^$C$F$$$^$9!#e(B
|
| assert_equal(abc.force_encoding(Shift_JIS), abc.force_encoding(Shift_JIS).encode!(Shift_JIS))
|e$B$Ge(B <abc> expected but was .
|
|e$B$K$J$C$F$$$^$9!#860x$O$h$/J,$+$j$^$;$s!#$b$7?4Ev$?$j$,$"$l$Pe(B
|e$B65$([email protected]$1$^$9$G$7$g$&$+!#e(B

Rubye$B$G$OEAE}E*$Ke(B!e$B%a%=%C%I$OJQ99$,9T$o$l$J$+$C$?>l9g!"e(Bnile$B$rJVe(B
e$B$9$N$G$=$NEAE}$K=>[email protected]$H;W$$$^$9!#e(B

e$B$N$G!"$3$NBP1~$r$I$&$9$k$+$G$9$,!#e(B

  • String#encode! e$B$OMW$i$J$$$N$G$O$J$$$+!#7k6IFbItE*$KJQ49$Oe(B
    e$BI,MW$G$5$[$I8zN($,NI$$$o$1$G$O$J$$$N$G!#e(B

  • String#encode! e$B$r;D$9$K$7$F$b!VJQ49$J$7$Ge(Bnile$B!W$H$$$&5sF0e(B
    e$B$OF3F~$7$J$$!#Lr$KN)$D%1!<%9$r;W$$$D$+$J$$$+$ie(B

e$B$N$$$:$l$+$G$O$J$$$+$H;W$$$^$9!#e(B

|P.S.: e$B:#=5$O<x6H$,G$"$j$^$7$?$7!"e(Bcommit [email protected]_Dj$b;~4V$,$+$+$j$^$7$?$,!"e(B
| e$B$3$l$+$i$A$g$/$A$g$/e(B commit e$B$7$?$$$H;W$C$F$$$^$9!#e(B

e$B$*4j$$$7$^$9!#e(B

In article [email protected],
Martin D. [email protected] writes:

assert_equal('abc'.force_encoding('Shift_JIS'), 'abc'.force_encoding('Shift_JIS').encode!('Shift_JIS'))

e$B$Ge(B <abc> expected but was .

e$B$K$J$C$F$$$^$9!#860x$O$h$/J,$+$j$^$;$s!#$b$7?4Ev$?$j$,$"$l$Pe(B
e$B65$([email protected]$1$^$9$G$7$g$&$+!#e(B

e$B$=$&$$$($P!"e(Bencode! e$B$C$FI,MW$J$s$G$7$g$&$+e(B?

e$B>>K$5$s!"$3$s$K$A$O!#e(B

At 16:40 07/12/21, Yukihiro M. wrote:

abc.force_encoding(Shift_JIS).encode!(Shift_JIS))
|e$B$Ge(B <abc> expected but was .
|
|e$B$K$J$C$F$$$^$9!#860x$O$h$/J,$+$j$^$;$s!#$b$7?4Ev$?$j$,$"$l$Pe(B
|e$B65$([email protected]$1$^$9$G$7$g$&$+!#e(B

Rubye$B$G$OEAE}E*$Ke(B!e$B%a%=%C%I$OJQ99$,9T$o$l$J$+$C$?>l9g!"e(Bnile$B$rJVe(B
e$B$9$N$G$=$NEAE}$K=>[email protected]$H;W$$$^$9!#e(B

e$B$=$&$+$b$7$l$^$;$s!#$3$A$i$G:#$^$G$N7P83$r$$$$$^$9$H!"e(Bnil
e$B$rJV$9e(B
e$B$N$G$&$+$/$$$/%1!<%9$Oe(B nil
e$B$rJV$9$HLdBj$K$J$k%1!<%9$h$j>/$J$$$G$9$,!"e(B
e$B3$5$s$N7P83$,D9$$$7!"0c$&$+$b$7$l$^$;$s!#e(B

e$B$N$G!"$3$NBP1~$r$I$&$9$k$+$G$9$,!#e(B

  • String#encode! e$B$OMW$i$J$$$N$G$O$J$$$+!#7k6IFbItE*$KJQ49$Oe(B
    e$BI,MW$G$5$[$I8zN($,NI$$$o$1$G$O$J$$$N$G!#e(B

e$B3N$+$K8zN($OM}M3$K$J$C$F$$$^$;$s!#e(B

  • String#encode! e$B$r;D$9$K$7$F$b!VJQ49$J$7$Ge(Bnile$B!W$H$$$&5sF0e(B
    e$B$OF3F~$7$J$$!#Lr$KN)$D%1!<%9$r;W$$$D$+$J$$$+$ie(B

variable.encode!.. e$B$NJQ$o$j$Ke(B variable = variable.encode
e$B$r=q$/$N$OI,MW0J>e$KD9$$$H;W$$$^$9!#e(B

e$B!VJQ49L5$7$Ge(B nile$B!W$O$J$<$3$N>l9g$KLdBj$J$N$+$H$$$&$H!e(B
e$BA0$b$C$FEY$N%(%s%3!<%G%#%s%0$+$i$I$N%(%s%3!<%G%#%s%0$Xe(B
e$B$I$N%G!<%?$rJQ49$9$k$N$+J,$+$l$P$$$$$G$9$,!$?$^$?$^e(B ASCII
[email protected]$1$H$+$?$^$?$^F1$8%(%s%3!<%G%#%s%0$K$J$C$F$7$^$C$?>l9g$Ke(B
nil e$B$K$J$C$F$7$^$&$HHs>o$KITJX$K46$8$^$9!#e(B

e$B$N$$$:$l$+$G$O$J$$$+$H;W$$$^$9!#e(B

|P.S.: e$B:#=5$O<x6H$,G$"$j$^$7$?$7!"e(Bcommit [email protected]_Dj$b;~4V$,$+$+$j$^$7$?$,!"e(B
| e$B$3$l$+$i$A$g$/$A$g$/e(B commit e$B$7$?$$$H;W$C$F$$$^$9!#e(B

e$B$*4j$$$7$^$9!#e(B

[email protected]$$$F$7$^$$$^$7$?$,!4hD%$C$F$_$^$9!#e(B
e$B$H$3$m$G!:G8e$N:G8e$N;E>e$2$N$H$3$m$O$I$&$$$&$+$s$8$Ge(B
e$B9T$o$l$^$9$G$7$g$&$+!#e(BRuby e$B$Ne(B release
e$B$O=i$a$F$J$N$G$5$C$Q$jJ,$+$j$^$;$s!#e(B

e$B59$7$/$*4j$$$7$^$9!#e(B Martin.

#-#-# Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University
#-#-# http://www.sw.it.aoyama.ac.jp mailto:[email protected]

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

Yukihiro M. e$B$5$s$O=q$-$^$7$?e(B:

e$B!VK\5$$+!W$H5?Ld;k$5$l$J$,$i$be(B25e$BF|%j%j!<%9$rM=Dj$7$F$$$^$9!#e(B
e$B$G!"$3$l$Oe(B25e$BF|$G$G$-$F$$$k$H$3$m$^$G$G$G$=$N$^$^%j%j!<%9$7$^e(B
e$B$9!#e(B24e$BF|e(B(e$BLke(B)e$B$K$O3F<o%F%9%H$,%(%i!<$r=P$5$J$$$H$3$m$^$G;}$C$Fe(B
e$B$$$-$?$$$G$9!#e(B

e$B%j%j!<%[email protected]$,I,MW$H;W$o$l$k%P%0e(B(e$B%$%s%9%H!<%k$G$-$J$$$H$+e(B)e$B$,e(B
e$BH/8+$5$l$?>l9g!"$=$NBP=h$O$I$N$h$&$J7A$G9T$o$l$^$9$+e(B?

e$B!&e(B1.9.2e$B$^$GJ|CVe(B
e$B!&ITDj4|e(B/e$BDj4|E*$Ke(B 1.9.1 p-xxx
e$B$N$h$&$J%j%j!<%[email protected]$rE,MQe(B
e$B!&$=$NB>e(B

e$B$/$l$0$l$bL>[email protected]$1$I<BBN$O0c$&$J$s$F$3$H$OFsEY$H$J$$$h$&$Ke(B
e$B$*4j$$$7$^$9!#e(B

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

In message Re: [ruby-dev:32666] Re: encode! e$B$OJQ49$7$J$$$H$-$Ke(B
e$B$K$J$C$F$7$^$&!#e(B
on Fri, 21 Dec 2007 16:59:22 +0900, Martin D.
[email protected] writes:

|>e$B$N$G!"$3$NBP1~$r$I$&$9$k$+$G$9$,!#e(B
|>
|> * String#encode! e$B$OMW$i$J$$$N$G$O$J$$$+!#7k6IFbItE*$KJQ49$Oe(B
|> e$BI,MW$G$5$[$I8zN($,NI$$$o$1$G$O$J$$$N$G!#e(B
|
|e$B3N$+$K8zN($OM}M3$K$J$C$F$$$^$;$s!#e(B
|
|> * String#encode! e$B$r;D$9$K$7$F$b!VJQ49$J$7$Ge(Bnile$B!W$H$$$&5sF0e(B
|> e$B$OF3F~$7$J$$!#Lr$KN)$D%1!<%9$r;W$$$D$+$J$$$+$ie(B
|
|variable.encode!.. e$B$NJQ$o$j$Ke(B variable = variable.encode
|e$B$r=q$/$N$OI,MW0J>e$KD9$$$H;W$$$^$9!#e(B

e$BD9$$$H$$$&$N$OJ,$+$j$^$7$?!#e(Bencode!e$B$N>l9ge(B(e$BB>$Ne(BStringe$B%a%=%C%Ie(B
e$B$H$O0[$J$je(B)e$B!"e(Bnile$B$rJV$7$F4r$7$$$3$H$O$J$$$N$G!"e(Bnile$B$OJV$5$J$$e(B
e$B$H$$$&$N$,$h$5$=$&$G$9$M!#J,$+$j$^$7$?!#e(B

[email protected]$5$s$Ke(Bencode!e$B$,e(Bnile$B$rJV$5$J$$$h$&$KJQ99$7$F$b$i$$$^$9!#e(B

|[email protected]$$$F$7$^$$$^$7$?$,!4hD%$C$F$_$^$9!#e(B
|e$B$H$3$m$G!:G8e$N:G8e$N;E>e$2$N$H$3$m$O$I$&$$$&$+$s$8$Ge(B
|e$B9T$o$l$^$9$G$7$g$&$+!#e(BRuby e$B$Ne(B release e$B$O=i$a$F$J$N$G$5$C$Q$jJ,$+$j$^$;$s!#e(B

e$B!VK\5$$+!W$H5?Ld;k$5$l$J$,$i$be(B25e$BF|%j%j!<%9$rM=Dj$7$F$$$^$9!#e(B
e$B$G!"$3$l$Oe(B25e$BF|$G$G$-$F$$$k$H$3$m$^$G$G$G$=$N$^$^%j%j!<%9$7$^e(B
e$B$9!#e(B24e$BF|e(B(e$BLke(B)e$B$K$O3F<o%F%9%H$,%(%i!<$r=P$5$J$$$H$3$m$^$G;}$C$Fe(B
e$B$$$-$?$$$G$9!#e(B

                            e$B$^$D$b$He(B e$B$f$-$R$me(B /:|)

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

In message Re: [ruby-dev:32669] Re: encode! e$B$OJQ49$7$J$$$H$-$Ke(B
e$B$K$J$C$F$7$^$&!#e(B
on Fri, 21 Dec 2007 22:34:19 +0900, KIMURA Koichi
[email protected] writes:

|e$B%j%j!<%[email protected]$,I,MW$H;W$o$l$k%P%0e(B(e$B%$%s%9%H!<%k$G$-$J$$$H$+e(B)e$B$,e(B
|e$BH/8+$5$l$?>l9g!"$=$NBP=h$O$I$N$h$&$J7A$G9T$o$l$^$9$+e(B?
|
|e$B!&e(B1.9.2e$B$^$GJ|CVe(B
|e$B!&ITDj4|e(B/e$BDj4|E*$Ke(B 1.9.1 p-xxx e$B$N$h$&$J%j%j!<%[email protected]$rE,MQe(B
|e$B!&$=$NB>e(B

e$B$^$:e(Bsnapshote$B$rMQ0U$7$F!"$=$l$K$OKh2se(B(svne$B$Ne(B)e$B%j%S%8%g%s$r4^$a$?e(B
e$B7A$G%Q%C%1!<%8$7$^$9!#$^$?!ITDj4|$Ke(Bpatchlevel xxxe$B$H$$$&$b$Ne(B
e$B$r=P$7$^$9!#4|4V$=$NB>$O;vA0$K$ODj$a$^$;$s!#$?$V$s!?t%v7n$4e(B
e$B$H$K$J$k$N$G$O$J$$$+$H;W$$$^$9!#e(B

|e$B$/$l$0$l$bL>[email protected]$1$I<BBN$O0c$&$J$s$F$3$H$OFsEY$H$J$$$h$&$Ke(B
|e$B$*4j$$$7$^$9!#e(B

e$B?4$7$^$9!#e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs