Show
Ignore:
Timestamp:
12/28/07 13:13:16 (7 years ago)
Author:
nshuyo
Message:

lang/javascript/jsruby: fixed some bugs

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/jsruby/trunk/tests/string.html

    r3590 r3718  
    6161        assertEquals("string[nth] 2", ruby.exec(' "ABC"[1] '), 66); 
    6262        //assertEquals("string[nth] 3", ruby.exec(' "ABC"[-1] '), 67); 
     63        assertEquals("string[nth] 4", ruby.exec(' n=2; "ABC"[n] '), 67); 
    6364} 
    6465 
     
    6667        assertEquals("string[nth]= 1", ruby.exec(' a="abc"; a[1]=66; a '), "aBc"); 
    6768        assertEquals("string[nth]= 2", ruby.exec(' a="abc"; a[1]="XYZ"; a '), "aXYZc"); 
     69        assertEquals("string[nth]= 3", ruby.exec(' a="abc"; n=2; a[n]="XYZ"; a '), "abXYZ"); 
    6870} 
    6971