Permalink
Browse files

fix operator in exception

  • Loading branch information...
1 parent b4cc506 commit bac9c1848bb4e53f73c8977d67a11f514cf61a9d @grosser committed Jul 30, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/RubyVM.js
View
@@ -185,7 +185,7 @@ HotRuby.prototype = {
*/
mainLoop : function(opcode, sf) {
// Create label to ip
- if(!("label2ip" in opcode)) {
+ if(typeof(opcode.label2ip) != 'undefined') { // label2ip in opcode would throw exception
opcode.label2ip = {};
for (var ip = 0;ip < opcode.length; ip++) {
// If "cmd is a String then it is a jump label

0 comments on commit bac9c18

Please sign in to comment.