---
title: "Heredoc without interpolation"
description: "Sometimes you want to use Ruby's Heredoc without interpolation ('#{....}'). You can do this by adding single dashes around your keyword:"
canonical: https://oozou.com/til/heredoc-without-interpolation-74
locale: en
date: 2020-10-14
topic: ruby
---

# Heredoc without interpolation

> Sometimes you want to use Ruby's Heredoc without interpolation ('#{....}'). You can do this by adding single dashes around your keyword:

Published: 2020-10-14 · Topic: [ruby](https://oozou.com/til-topics/ruby) ([markdown](https://oozou.com/til-topics/ruby.md))

Sometimes you want to use Ruby's Heredoc without interpolation ('#\{....}'). You can do this by adding single dashes around your keyword:

```ruby
doc = <<-'SONG'
Business men, they drink my wine
#{person} dig my earth
None will level on the line
Nobody offered his word
Hey, hey
SONG
```

---

Contact OOZOU: hello@oozou.com · +66 2544 0000 · https://oozou.com/contact

More for AI agents: https://oozou.com/llms.txt · every page has a markdown twin at its URL plus ".md"
