1 30 package org.jruby.test; 31 32 import org.jruby.Ruby; 33 34 public class TestRubyCollect extends TestRubyBase { 35 public TestRubyCollect(String name) { 36 super(name); 37 } 38 39 public void setUp() { 40 runtime = Ruby.getDefaultInstance(); 41 } 42 43 public void tearDown() { 44 super.tearDown(); 45 } 46 47 public void testRubyCollect() throws Exception { 48 String result = eval("a = ['a', 'b'].collect {|x| \"#{x}\"}; p a"); 49 assertEquals("Bug: [ #502036 ]", "[\"a\", \"b\"]", result); 50 } 51 } 52 | Popular Tags |