Created
August 18, 2009 10:27
-
-
Save nrk/169660 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> t1 = Time.new | |
=> Tue Aug 18 12:26:40 +02:00 2009 | |
>>> t2 = Time.at(t1) | |
=> Tue Aug 18 12:26:40 +02:00 2009 | |
>>> | |
>>> "t1: #{t1.object_id}" | |
=> "t1: 44" | |
>>> "t2: #{t1.object_id}" | |
=> "t2: 44" | |
>>> | |
>>> t1.object_id != t2.object_id | |
=> false | |
>>> t1.hash != t2.hash | |
=> false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):001:0> t1 = Time.new | |
=> Tue Aug 18 12:29:48 +0200 2009 | |
irb(main):002:0> t2 = Time.at(t1) | |
=> Tue Aug 18 12:29:48 +0200 2009 | |
irb(main):003:0> | |
irb(main):004:0* "t1: #{t1.object_id}" | |
=> "t1: 1335450" | |
irb(main):005:0> "t2: #{t2.object_id}" | |
=> "t2: 1321590" | |
irb(main):006:0> | |
irb(main):007:0* t1.object_id != t2.object_id | |
=> true | |
irb(main):008:0> t1.hash != t2.hash | |
=> false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment