1. Computing
Michael Morin

Ruby August 2012 Archive

By

Follow me on:

Variables Declared in the Global Scope

Friday August 31, 2012
Question:  I declared a variable in the global scope, but I cannot access it from a method. Answer:  Ruby's idea of the "global scope" is a bit different than in other ... Read More

What are 'taint' and 'trust'?

Friday August 31, 2012
Question:  I see these methods called taint, trust, untaint, untrust, tainted? and trusted?, but I can't seem to figure out what they do.  I change them, the flags seem to ... Read More

Can't Modify Frozen String

Friday August 31, 2012
Question:  I'm trying to modify a frozen string, but I keep getting this exception that says "can't modify frozen String."  How do I get around this? Answer:  You can't, but there ... Read More

Mapping Arrays

Thursday August 30, 2012
Say you want to double every number in a list, or transform every element of an array into something else.  You could iterate over the array and build a new ... Read More

Sorting Arrays

Wednesday August 29, 2012
Quick, how do you sort an array?  How you answer this depends on where you're coming from.  If you're a C programmer, you might go on about the merits of ... Read More

Basic Array Operations

Tuesday August 28, 2012
OK, so you know how to create Arrays with Array literals, but what now?  There's not much you can do with simply creating Arrays from literals and iterating over them. ... Read More

Introduction to Arrays

Monday August 27, 2012
It's impossible to escape Arrays.  They're the main (and really only) way of handing ordered collections in Ruby.  And while there are about a thousand different things you can do ... Read More

Everything You Ever Wanted To Know About Hashes

Tuesday August 14, 2012
This article is a handy hub to all of the Hash content on this site.  It provided a summation of all the articles, why you might want to read them, ... Read More

©2014 About.com. All rights reserved.