Skip to content

Loading…

fix ruby errors in prototypes.md #43

Merged
merged 1 commit into from

2 participants

@dubek

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.

@dubek dubek fix ruby errors in prototypes.md
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.
90a4438
@raganwald raganwald merged commit 73f4f2d into raganwald-deprecated:master
@raganwald
Collaborator

!! was spurious, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 5, 2013
  1. @dubek

    fix ruby errors in prototypes.md

    dubek committed
    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.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 2013/02/prototypes.md
View
4 2013/02/prototypes.md
@@ -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
Something went wrong with that request. Please try again.