<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>language/versions/case_1.8.rb</filename>
    </added>
    <added>
      <filename>language/versions/case_1.9.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -3,22 +3,34 @@ require File.dirname(__FILE__) + '/../spec_helper'
 describe &quot;The 'case'-construct&quot; do
   it &quot;evaluates the body of the when clause matching the case target expression&quot; do
     case 1
-      when 2: false
-      when 1: true
+      when 2; false
+      when 1; true
     end.should == true
   end
 
   it &quot;evaluates the body of the when clause whose array expression includes the case target expression&quot; do
     case 2
-      when 3, 4: false
-      when 1, 2: true
+      when 3, 4; false
+      when 1, 2; true
     end.should == true
   end
 
+  it &quot;evaluates the body of the when clause in left-to-right order if it's an array expression&quot; do
+    @calls = []
+    def foo; @calls &lt;&lt; :foo; end
+    def bar; @calls &lt;&lt; :bar; end
+
+    case true
+      when foo, bar;
+    end
+
+    @calls.should == [:foo, :bar]
+  end
+
   it &quot;evaluates the body of the when clause whose range expression includes the case target expression&quot; do
     case 5
-      when 21..30: false
-      when 1..20: true
+      when 21..30; false
+      when 1..20; true
     end.should == true
   end
 
@@ -28,19 +40,19 @@ describe &quot;The 'case'-construct&quot; do
       when &quot;b&quot;
     end.should == nil
   end
-  
+
   it &quot;evaluates the 'else'-body when no other expression matches&quot; do
     case &quot;c&quot;
-      when &quot;a&quot;: 'foo'
-      when &quot;b&quot;: 'bar'
+      when &quot;a&quot;; 'foo'
+      when &quot;b&quot;; 'bar'
       else 'zzz'
     end.should == 'zzz'
   end
-  
+
   it &quot;returns nil when no expression matches and 'else'-body is empty&quot; do
     case &quot;c&quot;
-      when &quot;a&quot;: &quot;a&quot;
-      when &quot;b&quot;: &quot;b&quot;
+      when &quot;a&quot;; &quot;a&quot;
+      when &quot;b&quot;; &quot;b&quot;
       else
     end.should == nil
   end
@@ -56,27 +68,13 @@ describe &quot;The 'case'-construct&quot; do
     end.should == 2
   end
 
-  it &quot;returns the statement following ':'&quot; do
-    case &quot;a&quot;
-      when &quot;a&quot;: 'foo'
-      when &quot;b&quot;: 'bar'
-    end.should == 'foo'
-  end
-    
   it &quot;returns the statement following 'then'&quot; do
     case &quot;a&quot;
       when &quot;a&quot; then 'foo'
       when &quot;b&quot; then 'bar'
     end.should == 'foo'
   end
-    
-  it &quot;allows mixing ':' and 'then'&quot; do
-    case &quot;b&quot;
-      when &quot;a&quot;: 'foo'
-      when &quot;b&quot; then 'bar'
-    end.should == 'bar'
-  end
-    
+
   it &quot;tests classes with case equality&quot; do
     case &quot;a&quot;
       when String
@@ -85,14 +83,14 @@ describe &quot;The 'case'-construct&quot; do
         'bar'
     end.should == 'foo'
   end
-  
+
   it &quot;tests with matching regexps&quot; do
     case &quot;hello&quot;
-      when /abc/: false
-      when /^hell/: true
+      when /abc/; false
+      when /^hell/; true
     end.should == true
   end
-  
+
   it &quot;does not test with equality when given classes&quot; do
     case :symbol.class
       when Symbol
@@ -103,7 +101,7 @@ describe &quot;The 'case'-construct&quot; do
         &quot;foo&quot;
     end.should == &quot;foo&quot;
   end
-  
+
   it &quot;takes lists of values&quot; do
     case 'z'
       when 'a', 'b', 'c', 'd'
@@ -145,10 +143,11 @@ describe &quot;The 'case'-construct&quot; do
     end.should == &quot;foo&quot;
   end
 
+  # MR: critical
   it &quot;concats arrays before expanding them&quot; do
     a = ['a', 'b', 'c', 'd']
     b = ['f']
-  
+
     case 'f'
       when 'f', *a|b
         &quot;foo&quot; 
@@ -156,14 +155,14 @@ describe &quot;The 'case'-construct&quot; do
         &quot;bar&quot; 
     end.should == &quot;foo&quot;
   end
-  
+
   it &quot;never matches when clauses with no values&quot; do
     case nil
       when *[]
         &quot;foo&quot;
     end.should == nil
   end
-  
+
   it &quot;lets you define a method after the case statement&quot; do
     case (def foo; 'foo'; end; 'f')
       when 'a'
@@ -172,7 +171,7 @@ describe &quot;The 'case'-construct&quot; do
         'bar'
     end.should == 'bar'
   end
-  
+
   it &quot;raises a SyntaxError when 'else' is used when no 'when' is given&quot; do
     lambda {
       eval &lt;&lt;-CODE
@@ -190,7 +189,7 @@ describe &quot;The 'case'-construct&quot; do
       case 4
         else
           true
-        when 4: false
+        when 4; false
       end
       CODE
     }.should raise_error(SyntaxError)
@@ -246,42 +245,42 @@ end
 
 describe &quot;The 'case'-construct with no target expression&quot; do
   it &quot;evaluates the body of the first clause when at least one of its condition expressions is true&quot; do
-      case
-        when true, false: 'foo'
-      end.should == 'foo'
-    end
-    
+    case
+      when true, false; 'foo'
+    end.should == 'foo'
+  end
+
   it &quot;evaluates the body of the first when clause that is not false/nil&quot; do
     case
-      when false: 'foo'
-      when 2: 'bar'
-      when 1 == 1: 'baz'
+      when false; 'foo'
+      when 2; 'bar'
+      when 1 == 1; 'baz'
     end.should == 'bar'
-  
+
     case
-      when false: 'foo'
-      when nil: 'foo'
-      when 1 == 1: 'bar'
+      when false; 'foo'
+      when nil; 'foo'
+      when 1 == 1; 'bar'
     end.should == 'bar'
   end
-      
+
   it &quot;evaluates the body of the else clause if all when clauses are false/nil&quot; do
     case
-      when false: 'foo'
-      when nil: 'foo'
-      when 1 == 2: 'bar'
+      when false; 'foo'
+      when nil; 'foo'
+      when 1 == 2; 'bar'
       else 'baz'
     end.should == 'baz'
   end
-  
+
   it &quot;evaluates multiple conditional expressions as a boolean disjunction&quot; do
     case
-      when true, false: 'foo'
+      when true, false; 'foo'
       else 'bar'
     end.should == 'foo'
 
     case
-      when false, true: 'foo'
+      when false, true; 'foo'
       else 'bar'
     end.should == 'foo'
   end
@@ -307,3 +306,5 @@ describe &quot;The 'case'-construct with no target expression&quot; do
     end.should == 'good'
   end
 end
+
+language_version __FILE__, &quot;case&quot;
\ No newline at end of file</diff>
      <filename>language/case_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4b934fe013246acbf093c1ac59d5be901201694f</id>
    </parent>
  </parents>
  <author>
    <name>Eloy Duran</name>
    <email>eloy.de.enige@gmail.com</email>
  </author>
  <url>http://github.com/rubyspec/rubyspec/commit/c7353c4d51ba007b3c33cbb7b3ec193067b1ce63</url>
  <id>c7353c4d51ba007b3c33cbb7b3ec193067b1ce63</id>
  <committed-date>2009-03-30T14:55:28-07:00</committed-date>
  <authored-date>2009-03-30T14:15:08-07:00</authored-date>
  <message>Fixed 1.9 failures in the 'case' spec. Added an example for execution order in the when clause and an example of multiple splats in the when clause (1.9).</message>
  <tree>d45b1254904b2eb5bfdc7f001241fdbc5308df0f</tree>
  <committer>
    <name>Eloy Duran</name>
    <email>eloy.de.enige@gmail.com</email>
  </committer>
</commit>
