crystal-community / icr

Interactive console for Crystal programming language
MIT License
505 stars 40 forks source link

Time stored in a variable changes on every access #43

Closed ltran closed 7 years ago

ltran commented 7 years ago

When you store Time.now into a variable. Any access to the variable will always be different.

steps to reproduce.

15:11 $ icr
icr(0.21.0) > current_time = Time.now
 => 2017-03-06 15:38:40 -0800
icr(0.21.0) > current_time
 => 2017-03-06 15:38:43 -0800
icr(0.21.0) > current_time
 => 2017-03-06 15:38:48 -0800
icr(0.21.0) >

icr version

$ icr -v
icr version 0.2.13
Author: Potapov Sergey
Homepage: https://github.com/greyblake/crystal-icr

crystal-version

$ crystal -v
Crystal 0.21.0 (2017-02-21)
greyblake commented 7 years ago

Thanks for being proactive and opening the issue. However, there is nothing to do about it. It's due to nature, how icr implemented.

You should be careful using ICR with: