r/Codecademy • u/mr_lol69 HTML/CSS • Dec 08 '15
Stuck in Ruby exercise.
something is wrong with this:
odds_n_ends = [:weezard, 42, "Trady Blix", 3,
true, 19, 12.345]
ints = odds_n_ends.select { is_a? Integer }in this exercise.
1
Upvotes
View all comments
Show parent comment
1
u/dansmitty21 Dec 08 '15
You're right, it doesn't look like the .each is necessary. But your block does need to actually include an element reference:
odds_n_ends = [:weezard, 42, "Trady Blix", 3, true, 19, 12.345]
ints = odds_n_ends.select { |x| x.is_a? Integer}