# I don't understand #{ }

**URL:** <https://www.ruby-forum.com/t/i-dont-understand/121774>\
**Category:** Rails\
**Created:** [November 30, 2007, 7:59pm UTC](https://www.ruby-forum.com/t/i-dont-understand/121774 "2007-11-30T19:59:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 30, 2007, 7:59pm UTC](https://www.ruby-forum.com/t/i-dont-understand/121774/1 "2007-11-30T19:59:02Z")

</div>

Hi there,

I’m new to ruby and rails. I’m going through a few tutorials and I got  
the updated agile book. One thing I keep seeing which hasn’t quite  
been properly explained is something like this:

puts “Hello #{name.capitalize}!”

At one place it stated that the {} merely insert a string into a  
string - I assume like concatenation. However the # has not been  
explained. Do the # and {} go together?

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 30, 2007, 8:02pm UTC](https://www.ruby-forum.com/t/i-dont-understand/121774/2 "2007-11-30T20:02:33Z")

</div>

Yes, they do go together. It just callse to\_s on the result of any ruby  
code between #{ and }.

-Bill

Pixelmech wrote:

> explained. Do the # and {} go together?
> 
> >

–  
Sincerely,

William P.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 30, 2007, 8:04pm UTC](https://www.ruby-forum.com/t/i-dont-understand/121774/3 "2007-11-30T20:04:18Z")

</div>

\*calls not callse…hit send to fast 🙂

William P. wrote:

> > the updated agile book. One thing I keep seeing which hasn’t quite

–  
Sincerely,

William P.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [November 30, 2007, 8:04pm UTC](https://www.ruby-forum.com/t/i-dont-understand/121774/4 "2007-11-30T20:04:18Z")

</div>

On Nov 30, 1:02 pm, William P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Yes, they do go together. It just callse to\_s on the result of any ruby  
> code between #{ and }.

Ah, gotcha. Thank you!
