From ea853dfa674a1be2c6d5e54b1307bf80693cf01d Mon Sep 17 00:00:00 2001 From: Nick LaMuro Date: Tue, 13 Aug 2013 17:42:03 -0500 Subject: Fixes array typos --- ruby.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ruby.html.markdown') diff --git a/ruby.html.markdown b/ruby.html.markdown index 68c5b524..46bfbb7c 100644 --- a/ruby.html.markdown +++ b/ruby.html.markdown @@ -117,11 +117,11 @@ status == :approved #=> false # Arrays # This is an array -[1, 2, 3, 4, 5] #=> [1, 2, 3, 4, 5] +array = [1, 2, 3, 4, 5] #=> [1, 2, 3, 4, 5] # Arrays can contain different types of items -array = [1, "hello", false] #=> => [1, "hello", false] +[1, "hello", false] #=> [1, "hello", false] # Arrays can be indexed # From the front -- cgit v1.2.3 From 7af884a9407c0b79aaede1edd3539e13a55552c8 Mon Sep 17 00:00:00 2001 From: Nick LaMuro Date: Tue, 13 Aug 2013 17:46:33 -0500 Subject: Fixes spacing issues --- ruby.html.markdown | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ruby.html.markdown') diff --git a/ruby.html.markdown b/ruby.html.markdown index 46bfbb7c..963d1fc1 100644 --- a/ruby.html.markdown +++ b/ruby.html.markdown @@ -173,9 +173,9 @@ new_hash.keys #=> [:defcon, :action] if true "if statement" elsif false - "else if, optional" + "else if, optional" else - "else, also optional" + "else, also optional" end for counter in 1..5 @@ -190,7 +190,8 @@ end # HOWEVER, No-one uses for loops. # Instead you should use the "each" method and pass it a block. # A block is a bunch of code that you can pass to a method like "each". -# It is analogous to lambdas, anonymous functions or closures in other programming languages. +# It is analogous to lambdas, anonymous functions or closures in other +# programming languages. # # The "each" method of a range runs the block once for each element of the range. # The block is passed a counter as a parameter. -- cgit v1.2.3 From 9fd70ffbb12e92a4bd129cfbe28d91e07138c398 Mon Sep 17 00:00:00 2001 From: Nick LaMuro Date: Tue, 13 Aug 2013 17:47:52 -0500 Subject: Giving myself some credit... I guess --- ruby.html.markdown | 1 + 1 file changed, 1 insertion(+) (limited to 'ruby.html.markdown') diff --git a/ruby.html.markdown b/ruby.html.markdown index 963d1fc1..19f2ec86 100644 --- a/ruby.html.markdown +++ b/ruby.html.markdown @@ -6,6 +6,7 @@ contributors: - ["Joel Walden", "http://joelwalden.net"] - ["Luke Holder", "http://twitter.com/lukeholder"] - ["Tristan Hume", "http://thume.ca/"] + - ["Nick LaMuro", "https://github.com/NickLaMuro"] --- ```ruby -- cgit v1.2.3