Skip to content

Instantly share code, notes, and snippets.

@brettinternet
Created July 3, 2017 21:16
Show Gist options
  • Save brettinternet/0dae2a55bd3e90feca7c6dd39d2427eb to your computer and use it in GitHub Desktop.
Save brettinternet/0dae2a55bd3e90feca7c6dd39d2427eb to your computer and use it in GitHub Desktop.

This guy discovered a CodeWars hack that tricks the tests into passing.

class NilClass
  def ==(_)
    true
  end
end
def mymethod
end

I don't like the idea of cheating, but it's still an interesting trick and speaks somewhat to the silliness of relying on scores or grades.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment