[Bug:trunk] incompatibility of Marshal of Time with nanosecond

e$B1sF#$G$9!#e(B

e$B%J%NIC$N>pJs$r4^$`e(B Time e$B$K$D$$$F!“e(B1.9.1-p378 e$B$Ge(B
Marshal.dump e$B$7$?$b$N$re(B
trunk e$B$Ge(B load e$B$9$k$H!”>pJs$,Mn$A$k$h$&$G$9!#e(B

ruby-1.9.1-p378 [email protected]$9e(B

$ ruby-1.9.1-p378 -e ’
t = Time.at(Math::PI)
p t.nsec
open(“t”, “wb”) {|f| f.write(Marshal.dump(t)) }

141592654

ruby-1.9.1-p378 e$B$J$iFI$a$ke(B

$ ruby-1.9.1-p378 -e ‘p Marshal.load(File.binread(“t”)).nsec’
141592654

trunk [email protected]$H2<e(B 3 e$B7e$/$i$$$,Mn$A$ke(B

$ ./ruby -e ‘p Marshal.load(File.binread(“t”)).nsec’
141592000

e$B%A%1%C%He(B #2627 e$B$,99?7$5$l$^$7$?!#e(B (by Akira 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

This issue was solved with changeset r26377.
Yusuke, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


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

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