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 Ruby Foundations Procs & Lambdas Working With Procs & Lambdas

Matthew Main
Matthew Main
7,566 Points

Error when running the procs versus lambdas test program

I've copied out the procs versus lambdas test code in the video, but when I run the program I get an error. I'm following the same process that's demonstrated for running the file in the terminal.

Could this be an issue related to using a version of ruby that's newer than what's used in the video? Otherwise, I'm stumped.

code

terminal

3 Answers

Matthew Main
Matthew Main
7,566 Points

I just figured it out: the problem only has to do with the style of the quotation marks in the code. I'd copied & pasted the code from my notes on a Word document to Sublime Text, and the quotes were "smart" quotes. By changing the quotes to straight quotes, the problem was solved. Final conclusion: d'oh.

Caleb Kleveter
MOD
Caleb Kleveter
Treehouse Moderator 37,862 Points

I can't think of anything else. That is a really old course. I'll just give a shout. Jason Seifer !