Created
November 19, 2015 06:34
-
-
Save anonymous/c969eca9271f24580049 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
def test(date) | |
Time.utc(date) + (1000000000) | |
end | |
test(Time.utc(2011, 4, 25, 0, 0, 0)) | |
TypeError: no implicit conversion of Time into Integer | |
But I can do this in irb | |
irb(main):002:0> Time.utc(2015, 11, 19, 0, 0, 0) + (1000000000) | |
=> 2047-07-28 01:46:40 UTC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment