crystal-community / icr

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

redeclaring method issue #57

Closed Porcupine96 closed 7 years ago

Porcupine96 commented 7 years ago

Redefining method with the same name causes that all previous usages of that method are recalled again.

For example:

duplicate method call

Is that expected behaviour?

greyblake commented 7 years ago

Hey, thanks for reporting.

It's not what we'd like to see, but it's totally expected behaviour if you take into consideration how ICR is implemented: https://github.com/crystal-community/icr#how-does-it-work Keep in mind, that ICR is not a proper REPL, but rather a very hacky workaround for something REPL-like.

You may see unexpected behaviour working with network, file system, random numbers... Since there is no way to fix it, I am gonna close the issue.