DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

General Delimited Input In Ruby

11.06.2006
| 3757 views |
  • submit to reddit
        In ruby there are several special literal notations:

%{blah}       # or %Q{blah} # same as "blah" but igornes " and '
%q{blah}      # same as 'blah' but no interpolation
%w{blah blah} # same as "blah blah".split
%r{blah}      # same as /blah/
%x{ls}        # same as `ls`