Skip to content

Instantly share code, notes, and snippets.

@mharper
Created June 29, 2011 21:09
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 mharper/1054978 to your computer and use it in GitHub Desktop.
Save mharper/1054978 to your computer and use it in GitHub Desktop.
Even in Ruby, Bird is The Word
$ irb
ruby-1.9.2-p180 :001 > class String
ruby-1.9.2-p180 :002?> def is_the_word?
ruby-1.9.2-p180 :003?> self.casecmp("bird") == 0
ruby-1.9.2-p180 :004?> end
ruby-1.9.2-p180 :005?> end
=> nil
ruby-1.9.2-p180 :006 > "Bird".is_the_word?
=> true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment