Skip to content

Commit

Permalink
Fixes #988 - 0 as third argument of .delay or .periodical were ignore…
Browse files Browse the repository at this point in the history
…d. .pass should handle it correctly
  • Loading branch information
Arian authored and cpojer committed Sep 10, 2010
1 parent 2b12d56 commit 3e867ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Types/Function.js
Expand Up @@ -49,7 +49,7 @@ Function.implement({
},

delay: function(delay, bind, args){
return setTimeout(this.pass(args || [], bind), delay);
return setTimeout(this.pass(args, bind), delay);
},

pass: function(args, bind){
Expand All @@ -61,7 +61,7 @@ Function.implement({
},

periodical: function(periodical, bind, args){
return setInterval(this.pass(args || [], bind), periodical);
return setInterval(this.pass(args, bind), periodical);
}

});
Expand Down

7 comments on commit 3e867ad

@kassens
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there specs for this bug?

@cpojer
Copy link
Member

@cpojer cpojer commented on 3e867ad Sep 10, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course. Can you please next time look into the specs repository before asking? :)

@ibolmo
Copy link
Member

@ibolmo ibolmo commented on 3e867ad Sep 10, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hehe score one for the "Annoying to look at another repo for something that should be inside of a single commit" camp.

@cpojer
Copy link
Member

@cpojer cpojer commented on 3e867ad Sep 10, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha. indeed.

@cpojer
Copy link
Member

@cpojer cpojer commented on 3e867ad Sep 10, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Sorry, I just get annoyed because everyone always asks "are there specs?" - Just watch the specs repo)

@kassens
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The specs weren't pulled from arian.

@cpojer
Copy link
Member

@cpojer cpojer commented on 3e867ad Sep 10, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh snap! How embarrassing. I forgot to push.

Please sign in to comment.