Sha256: 85c2c5563bf505b5b802713834da27d7d60759aa09d6fd2f55f60109efddf569
Contents?: true
Size: 400 Bytes
Versions: 108
Compression:
Stored size: 400 Bytes
Contents
describe "The 'case'-construct" do it "takes multiple expanded arrays" do a1 = ['f', 'o', 'o'] a2 = ['b', 'a', 'r'] case 'f' when *a1, *['x', 'y', 'z'] "foo" when *a2, *['x', 'y', 'z'] "bar" end.should == "foo" case 'b' when *a1, *['x', 'y', 'z'] "foo" when *a2, *['x', 'y', 'z'] "bar" end.should == "bar" end end
Version data entries
108 entries across 108 versions & 5 rubygems