[Bug #2972] Windows での gets(nil)

Bug #2972: Windows e$B$G$Ne(B gets(nil)
http://redmine.ruby-lang.org/issues/show/2972

e$B5/I<<Te(B: Takaya KUBOTA
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal
ruby -v: ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-mingw32]

e$B5WJ]ED$H?=$7$^$9!#e(B

mingw e$BHGe(B 1.8.7 e$B$Ge(B gets(nil)
e$B$NF0:n$KIT6q9g$,$"$k$h$&$J$N$Ge(B
e$B$4Js9p$5$;[email protected]$-$^$9!#e(B
(cygwin e$BHG$G$OH/@8$7$^$;$se(B)

e$BFI$_9~$^$l$k%P%$%H?t$,IT0BDj$J$N$H!"e(B
[email protected]$i$l$?J8;zNs$bESCf$+$iF~NO$N%U%!%$%k$H0[$J$C$F$$$^$9!#e(B

$ wc -c a.aes-128-ecb
557088 a.aes-128-ecb

$ od -j 352 -t x1z a.aes-128-ecb | head
0000540 a9 22 c5 6c b2 f5 e3 0a 92 ca 4e e5 72 a2 b5 b6

.".lN.r<
0000560 e8 dd 15 ab 5e 8b bc 5b 93 5e c6 43 ab e1 18 a9
^[.^.C<
0000600 fa 54 58 e4 97 46 11 72 d9 30 53 48 07 b3 75 d3
.TXF.r.0SHu.<
0000620 0b f0 5a 20 1a b4 2f 7d 42 08 e5 4f 73 57 83 65 >Z
/}BOsW.e<
0000640 28 c2 62 7e fb 0b 34 ff a5 62 3a 40 a8 46 28 21
(.b~4b:@.F(!<
0000660 d6 4a fd 84 39 57 3b f5 0b 21 26 6a a2 36 d3 6b
.J9W;!&j.6.k<
0000700 70 b3 c2 63 f6 3e 3d 8b c2 59 96 f6 f2 5c 07 6d
pc.>=Ym<
0000720 13 87 9c 43 68 63 09 87 9a 81 18 f3 e2 25 f0 b4
Chc%<
0000740 91 66 20 de f5 b4 c7 e3 3d 8d 5d 6a a5 86 51 eb >.f
=.]jQ.<
0000760 07 62 bb fd 52 d1 80 d1 1c 0f 36 7e d1 75 71 1c
.bR6~.uq.<

$ ~/make/ruby-1.8.7-p249-mingw/ruby.exe -e p gets(nil).size
a.aes-128-ecb
9706

$ ruby -e p gets(nil).size a.aes-128-ecb (e$B$3$A$i$Oe(B cygwin
e$BHG$G$9e(B)
557088


s = gets(nil)
0.step(s.length, 16) do |i|
p s[i, 16].unpack(H*)
end

e$B>e5-$N$h$&$J%9%/%j%W%H$G!"e(Bmingw e$BHG$He(B cygwin e$BHG$Ge(B diff
e$B$r<h$k$H!"e(B

*** mingw32.txt 2010-03-16 15:42:19.888875000 +0900
cygwin.txt 2010-03-16 15:40:22.357625000 +0900


*** 23,466 ****
[a922c56cb2f5e30a92ca4ee572a2b5b6]
[e8dd15ab5e8bbc5b935ec643abe118a9]
[fa5458e497461172d930534807b375d3]
! [0bf05a20cb49805ff0d5f3cd3bb15cc4]
! [73e9bde65892c2f2a642beccbe916869]
! [fb810aaa96be7a3b08e0aec907b27164]

e$B$H$J$j$^$9e(B(0xcb e$B$+$i0[$J$ke(B)e$B!#e(B
e$BG0$N$?$a!">e5-$N%9%/%j%W%H$G;HMQ$7$?e(B a.aes-128-ecb
e$B$rE:IU$$$?$7$^$9!#e(B

e$B5WJ]ED5.Lie(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