[macruby-changes] [1297] MacRuby/branches/experimental/spec/frozen/language/loop_spec.rb

source_changes at macosforge.org source_changes at macosforge.org
Thu Apr 2 22:44:41 PDT 2009


Revision: 1297
          http://trac.macosforge.org/projects/ruby/changeset/1297
Author:   lsansonetti at apple.com
Date:     2009-04-02 22:44:40 -0700 (Thu, 02 Apr 2009)
Log Message:
-----------
uncommented code that now compiles (and works, yay)

Modified Paths:
--------------
    MacRuby/branches/experimental/spec/frozen/language/loop_spec.rb

Modified: MacRuby/branches/experimental/spec/frozen/language/loop_spec.rb
===================================================================
--- MacRuby/branches/experimental/spec/frozen/language/loop_spec.rb	2009-04-03 05:44:16 UTC (rev 1296)
+++ MacRuby/branches/experimental/spec/frozen/language/loop_spec.rb	2009-04-03 05:44:40 UTC (rev 1297)
@@ -42,29 +42,27 @@
     a.should == [1, 2, 4]
   end
   
-  # MacRuby TODO: These do not compile yet.
-  #
-  # it "restarts the current iteration with redo" do
-  #   a = []
-  #   loop do
-  #     a << 1
-  #     redo if a.size < 2
-  #     a << 2
-  #     break if a.size == 3 
-  #   end
-  #   a.should == [1, 1, 2]
-  # end
-  # 
-  # it "uses a spaghetti nightmare of redo, next and break" do
-  #   a = []
-  #   loop do
-  #     a << 1
-  #     redo if a.size == 1
-  #     a << 2
-  #     next if a.size == 3
-  #     a << 3
-  #     break if a.size > 6
-  #   end
-  #   a.should == [1, 1, 2, 1, 2, 3, 1, 2, 3]
-  # end
+  it "restarts the current iteration with redo" do
+    a = []
+    loop do
+      a << 1
+      redo if a.size < 2
+      a << 2
+      break if a.size == 3 
+    end
+    a.should == [1, 1, 2]
+  end
+  
+  it "uses a spaghetti nightmare of redo, next and break" do
+    a = []
+    loop do
+      a << 1
+      redo if a.size == 1
+      a << 2
+      next if a.size == 3
+      a << 3
+      break if a.size > 6
+    end
+    a.should == [1, 1, 2, 1, 2, 3, 1, 2, 3]
+  end
 end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090402/489b2ae7/attachment.html>


More information about the macruby-changes mailing list