-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REPL changes context on each evaluation #1444
Comments
Yeah, the REPL has some issues with global objects currently, likely all my fault. See #1425 and #1035 for the others. These three are on the top of my TODO list, but it could be up to a week before I get enough time to actually sit down and figure these out. edit: Actually, I'll probably get to them tomorrow. edit: Actually, probably not... ugh. |
For what it's worth, I'm getting varied and inconsistent results for |
@telemachus I posted an answer to your Stack Overflow question: http://stackoverflow.com/questions/6396467/a-puzzle-about-this-in-javascript-coffeescript/6397029#6397029 The inconsistency is because |
Renamed title. ("Function context can't be global in REPL" was inaccurate.) |
Check this out:
@TrevorBurnham: After playing around with this for a while, I'm pretty sure you've found a bug with node's
I'll post back here with the issue number as soon as I file it. update: See node issue #1280. |
CoffeeScript.eval. Instead of writing about all the changes and why I made those decisions, I'll just answer any questions in the commit comments, so add a commit comment if you want to question anything. Thanks to @TrevorBurnham and @satyr for their help/contributions. Also, closes #1487. And still no REPL tests...
Fixed by fff4c9c, which doesn't use |
CoffeeScript.eval. Instead of writing about all the changes and why I made those decisions, I'll just answer any questions in the commit comments, so add a commit comment if you want to question anything. Thanks to @TrevorBurnham and @satyr for their help/contributions. Also, closes #1487. And still no REPL tests...
Should probably fix tab completion as well.
Hitting tab here completes to |
A helpful reader of my book just reported an interesting issue. Michael, maybe you can figure this one out?
And it's not that functions can't be run in any context; it seems they just can't be run in
global
:Here's another rub: If you define and run the function all in one line, then it does run in the
global
context by default:Tested under CoffeeScript 1.1.1 and current master. Any ideas?
Btw, tested under the Node REPL; no issues there:
The text was updated successfully, but these errors were encountered: