Giter Site home page Giter Site logo

Comments (5)

ruanyf avatar ruanyf commented on April 30, 2024

我在Node v0.11.11中试过了,确实第四次next方法会抛出一个错误。

> hw.next() 
{ value: 'hello', done: false }
> hw.next() 
{ value: 'world', done: false }
> hw.next() 
{ value: undefined, done: true }
> hw.next() 
Error: Generator has already finished
    at GeneratorFunctionPrototype.next (native)
    at repl:1:4
    at REPLServer.defaultEval (repl.js:129:27)
    at bound (domain.js:255:14)
    at REPLServer.runBound [as eval] (domain.js:268:12)
    at Interface.<anonymous> (repl.js:277:12)
    at Interface.EventEmitter.emit (events.js:104:17)
    at Interface._onLine (readline.js:194:10)
    at Interface._line (readline.js:523:8)
    at Interface._ttyWrite (readline.js:798:14)

from es6tutorial.

yleo77 avatar yleo77 commented on April 30, 2024

image

node 版本 v0.11.13

from es6tutorial.

ruanyf avatar ruanyf commented on April 30, 2024

谢谢指出,已经改过来了。

不好意思,上次没有仔细看源码,加上我的node是v0.11.11,确实会报错,就没试v0.11.13……

from es6tutorial.

yleo77 avatar yleo77 commented on April 30, 2024

😄

另外,从 nodejs 的不同版本来看,这里是有改动,但是从更新日志却没找到这部分说明。

from es6tutorial.

ruanyf avatar ruanyf commented on April 30, 2024

可能是v8改了……

On Mon, May 19, 2014 at 11:37 AM, yleo77 [email protected] wrote:

[image: 😄]

另外,从 nodejs 的不同版本来看,这里是有改动,但是从更新日志却没找到这部分说明。


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-43463851
.

from es6tutorial.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.