Permalink
Browse files

Making sure that we compare to a string.

  • Loading branch information...
1 parent 7e26e00 commit 47f99e39e60be15fdd5573c58b6a49327cee1568 @steveklabnik steveklabnik committed Dec 26, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 lessons/basic_ruby.rb
View
@@ -258,13 +258,17 @@
lesson "Example: a guessing game"
page "Guess!" do
para "Let's put this all together:"
- embed_code 'secret_number = 42
+ embed_code 'secret_number = 42.to_s
guess = ask "I have a secret number. Take a guess, see if you can figure it out!"
if guess == secret_number
alert "Yes! You guessed right!"
else
alert "Sorry, you\'ll have to try again."
end'
+ para "Can you guess what ", code("to_s"), " does, and why you need it? If you're ",
+ "stumped, try asking ", link("on the Hackety Hack site",
+ :click => "http://hackety-hack.com/stream"), " ",
+ "and we'll give you a hand."
end
lesson "Summary"

0 comments on commit 47f99e3

Please sign in to comment.