Strings in Ruby

Watch out! This tutorial is over 8 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

Ruby has many ways of making strings, which are generally variations of the many ways Perl has of making strings. Double quotes allow values to be interpolated into the string, while single quotes do not. Most escapes are treated literally in single quotes, including the fact that \n is treated as two characters, a backward slash followed by an n.

Continue reading

Ruby Expressions

Watch out! This tutorial is over 8 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.

This is the first in a series for beginners on the Ruby Programming Language. Note that Ruby is a programming language. Ruby on Rails (“RoR”) is a web-application framework that is implemented in Ruby. Do not confuse the two. We will not covering Ruby on Rails in these tutorials.

These tutorials will be gather together under the tag #RubyTuesday, as we will be posting one each week from today to the end of term.  Ready? Here we go

Continue reading