Skip to content

Instantly share code, notes, and snippets.

@rsl
Created June 8, 2010 15:44
Show Gist options
  • Save rsl/430212 to your computer and use it in GitHub Desktop.
Save rsl/430212 to your computer and use it in GitHub Desktop.
>> case "String".class
>> when String
>> puts "I'm a string"
>> else
?> puts "I can't tell what I am"
>> end
I can't tell what I am
@hardbap
Copy link

hardbap commented Jun 8, 2010

@raggi String === "string".class is also wrong. It should be String === "string".

@hardbap
Copy link

hardbap commented Jun 8, 2010

@raggi - ooops, misread your comment. sorry about that :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment