Skip to content

Commit

Permalink
fix ruby errors in prototypes.md
Browse files Browse the repository at this point in the history
The Queue example in ruby had a stray paren and a use of null instead of nil.

Also I'm not sure why !! is needed in Queue#isEmpty - the < operator will always return true/false. But I haven't changed that because I'm not sure.
  • Loading branch information
dubek committed Mar 5, 2013
1 parent e4ce9f6 commit 90a4438
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 2013/02/prototypes.md
Expand Up @@ -62,8 +62,8 @@ class Queue

def pullHead
if !@isEmpty
@array[@head]).tap { |value|
@array[@head] = null
@array[@head].tap { |value|
@array[@head] = nil
@head += 1
}
end
Expand Down

0 comments on commit 90a4438

Please sign in to comment.