Changeset 5141 for lang/javascript
- Timestamp:
- 01/21/08 02:30:33 (5 years ago)
- Location:
- lang/javascript/jsruby/trunk
- Files:
-
- 2 modified
-
src/smachine.js (modified) (4 diffs)
-
tests/jsobject.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/jsruby/trunk/src/smachine.js
r4949 r5141 8 8 9 9 this.command = []; 10 this.stack = [ ];10 this.stack = [null]; 11 11 12 12 // patch … … 48 48 if (block.vars) b.varname = block.vars[0].name; 49 49 this.command.push(b); 50 return self; 50 51 } 51 52 } … … 62 63 this.command.push(self); 63 64 this.command.push("popLevel"); 64 this.com mand.push(this.compile(self.block.block));65 this.compile(self.block.block); 65 66 } 66 67 } … … 184 185 if (Array.prototype.isPrototypeOf(x)) { 185 186 if (x.length==1) { 186 this.command.push( this.compile(x[0]) ); 187 this.stack.pop(); // anxious... 188 this.compile(x[0]); 187 189 } else { 188 190 this.command.push( new RubyEngine.SMachine.Iterator(x) ); -
lang/javascript/jsruby/trunk/tests/jsobject.html
r4448 r5141 20 20 def test2(x) 21 21 x.new 2 22 end 23 24 def test3(x) 25 x.bar = 3 22 26 end 23 27 … … 45 49 } 46 50 51 function testSetProperty() { 52 var foo = {} 53 ruby.test3(foo); 54 assertEquals("set property 1", foo.bar, 3); 55 } 56 47 57 </script> 48 58 </head>
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)