Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save neomindryan/640697 to your computer and use it in GitHub Desktop.
Save neomindryan/640697 to your computer and use it in GitHub Desktop.

Ruby 1.9.2

Ruby Koans for exercises http://github.com/edgecase/ruby_koans

Ruby for Developers Text Editors only Ruby 1.9.2 only

h1. Basics 1 + 2 1.to_string (1 + 2).to_string "1" + 2 Late-binding Strongly Typed Control Flow All Object Oriented leads to "Basic Data Structures" h1. Data Structures integer => Fixnum Float => in Ruby exact precision, but going to/from DB turns it into C double (not exact precision) Use BigDecimal to stop this behavior, or integers (cents) Strings - big topic! Symbols vs. Strings Regex -> like perl (Oniguruma regular expression library http://www.geocities.jp/kosako3/oniguruma/) yada yada Array Hash - Associative Array, Dictionary, etc.

h1. Control Flow

h1. Block, Procs & lambdas Refer to ragenwald post about this. Difference is in the scope of the passed main object I think.

h1. Classes and duck typing

h1. Environment "Every day usage of Ruby" Gems IRB Test::Unit

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