Skip to content

Instantly share code, notes, and snippets.

@oneamtu
Created March 12, 2015 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oneamtu/99106fa4ee856878ad10 to your computer and use it in GitHub Desktop.
Save oneamtu/99106fa4ee856878ad10 to your computer and use it in GitHub Desktop.
def mapper(a)
b = a.map! { |x| x.nil? }
end
c = [nil]
expect(mapper(c)).to eq([true]) # => true
expect(mapper(c)).to eq([true]) # => false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment