[n00b] Need a good reference for var-types/string-esc, etc

One of the problems with Ruby being so popular is that any google search
with “Ruby tutorial” or similar turns up about 8-bazillion pages, and
they all want you to dive right in to see how easy everything is.

…Which is really cool – BUT!

I’m having trouble groking the difference between foo, @foo, :foo,
#{foo}, [foo] {:#[foo]} (ok, I made that one up), etc. About the only
one I feel like I understand is $foo – but how often am I going to use
THAT?! (Hint: very-nearly “never.”)

(Heh. $ means “global”, right? I haven’t used a global var in the most
recent 15 yrs of programming…)

(Ok, and I sort-of get :foo, but not well enough to describe it, which
means “not really.”)

So, anyway… don’t TELL me the difference (well, you can if you want)
– what I’m REALLY asking is: what is a good reference that describes
all of these things, and how they’re different?

Thanks!

Olie D. wrote:

Thanks!
Dave T.’ Programming_Ruby is the canonical Ruby reference.

http://www.pragmaticprogrammer.com/titles/ruby/index.html

Quoth Olie D.:

Thanks!
http://www.zenspider.com/Languages/Ruby/QuickRef.html

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs