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

**URL:** <https://www.ruby-forum.com/t/bug-trunk-incompatibility-of-marshal-of-time-with-nanosecond/182086>\
**Category:** Development\
**Created:** [January 22, 2010, 11:50am UTC](https://www.ruby-forum.com/t/bug-trunk-incompatibility-of-marshal-of-time-with-nanosecond/182086 "2010-01-22T11:50:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yusuke\_ENDOH](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/c89c15/32.png) [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Post date:** [January 22, 2010, 11:50am UTC](https://www.ruby-forum.com/t/bug-trunk-incompatibility-of-marshal-of-time-with-nanosecond/182086/1 "2010-01-22T11:50:14Z")

</div>

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 e$B$G=q$-$@$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 e$B$@$H2\<e(B 3 e$B7e$/$i$$$,Mn$A$ke(B

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

---

<div class="post-metadata">

**Author:** ![Yusuke\_ENDOH](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/c89c15/32.png) [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Post date:** [January 22, 2010, 1:17pm UTC](https://www.ruby-forum.com/t/bug-trunk-incompatibility-of-marshal-of-time-with-nanosecond/182086/2 "2010-01-22T13:17:27Z")

</div>

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](http://redmine.ruby-lang.org/issues/show/2627)
