Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Christopher Dickens
Christopher Dickens
3,921 Points

He never called the to_s method, so how did 'puts bank_account' print anything? 'to_s' doesn't even include 'puts'..?

How did puts bank_account print what it did?

1 Answer

Brandon McClelland
Brandon McClelland
4,645 Points

Hi Chris, the to_s method simply tells the code to treat the Object as a String. I'm not sure what you're referring to exactly since it's been awhile for me taking that course but probably bank_account already contains just a String and doesn't need any conversion. Hope that helps!