Skip to main content

22 posts tagged with "Ruby"

Ruby Programming Language and RubyGems

View All Tags

How to Put Variables in a String in Ruby

· 3 min read
Jagdish Kumawat
Founder @ Dewiride

In a double-quoted Ruby string, # followed by an expression in curly braces drops the expression's value into the text. Any expression works there, from a variable to a calculation; in single quotes, nothing is replaced.