Export to GitHub

ruby-security - issue #8

String Interpolation


Posted on Sep 21, 2012 by Quick Bird

The wiki mentions the use of #{var} for string interpolation, but it should be noted that the curly brackets are not always necessary (depending on the variable type).

Examples are:

$user

@user

@@user

Comment #1

Posted on Sep 21, 2012 by Helpful Rhino

This behaviour was added in Ruby 1.9.1, which the wiki appears to be using for it's examples.

Comment #2

Posted on Sep 25, 2012 by Happy Bird

Added your examples, thanks for your report!

Status: Fixed

Labels:
Type-Defect Priority-Medium