FAQ: Blocks, Procs, and Lambdas - You Know This!

This community-built FAQ covers the “You Know This!” exercise from the lesson “Blocks, Procs, and Lambdas”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Learn Ruby

FAQs on the exercise You Know This!

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

In the I’m a block! excersize, the " ’ " character is a smart quote in the description. This is deceptive, and makes it look like the test is failing when it’s right.

The test should pass with

5.times{ puts "I'm a block!" }
and
5.times{ puts "I’m a block!" }

or indicate the discrepancy between the apostrophe characters in the output. Since I am not a beginner, I know this error very well (and I hate smart quotes). Someone else more beginner might give up thinking it’s completely broken.

6 Likes

I just did the same thing.

5.times { puts ““Codecademy”” }

and the test doesn´t pass the command. It is unfair, because I´d lost my time on that exercise.

I feel your pain, so-called ‘smart’ quotes are the absolute worst. If you are, in-fact, new to coding then consider it a lesson in and of itself. I wouldn’t be surprised if these stupid quotes cost corporate America millions a year in developer time.

It would be sweet if the code academy course actually pointed out the discrepancy for you.

Screen Shot 2020-12-21 at 22.25.54

what am i doing wrong?

It’s funny ha…just don’t do the copy paste…write by yourself

5.times { puts "I'm a block!" } # the correct answer

Since ruby is case sensetive there is difference between ’ and ’

Is this course still actually intended for use? 80% of the exercises don’t run in the terminal even when the solution has been copied and pasted. A little bit shocked that the school I enrolled in has pointed me to this course.

1 Like

Yh just had this and copied the phrase word for word including quotations and the solution looks identical to my code still didn’t like it.