Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Using The % Notation

DZone's Guide to

Using The % Notation

·
Free Resource
 
  ... a (wacky) perl-inspired way to quote strings: by using % (percent character) and specifying a delimiting character, for example:
 

%(test) #=> "test"
%(#{Time.now}) #=> "2010-05-03 14:11:18 +0100"

Resources:
 - Ruby Programming/Syntax/Literals - Wikibooks, collection of open-content textbooks [wikibooks.org]
Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}