Skip to content

Instantly share code, notes, and snippets.

@oneamtu
Created March 12, 2015 20:33
Show Gist options
  • 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