Skip to content

Commit

Permalink
Adding a more comprehensive test case for the previous commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Dec 14, 2011
1 parent 85286b8 commit b50315d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/classes.coffee
Expand Up @@ -537,3 +537,22 @@ test "#1842: Regression with bound functions within bound class methods", ->

Store.bound()

# And a fancier case:

class Store

eq this, Store

@bound: =>
do =>
eq this, Store

@unbound: ->
eq this, Store

instance: =>
ok this instanceof Store

Store.bound()
Store.unbound()
(new Store).instance()

0 comments on commit b50315d

Please sign in to comment.