Tag Archives: gotcha

Ruby instance_eval gotcha

I don’t know how much of a “gotcha” this is since it’s just a defined behavior and feature of the language, but I still found it a little counterintuitive when I encountered it, and I had to actually read the … Continue reading

Posted in ruby | Tagged , , , , | 1 Comment

JavaScript Strings: instanceof vs. typeof

I’ve discovered some really interesting (read as “horrible”) behavior in Safari 5 and Internet Explorer 9. I was using this with great success in Chrome and Firefox. if (typeof this === ‘string’) {     doStuffWith(this); } Then I test … Continue reading

Posted in javascript | Tagged , , , , , , , , , , , , | Leave a comment