[macruby-changes] [1178] MacRuby/branches/experimental

source_changes at macosforge.org source_changes at macosforge.org
Thu Mar 26 15:55:33 PDT 2009


Revision: 1178
          http://trac.macosforge.org/projects/ruby/changeset/1178
Author:   eloy.de.enige at gmail.com
Date:     2009-03-26 15:55:32 -0700 (Thu, 26 Mar 2009)
Log Message:
-----------
Tagged critical and failing examples of the loop spec and added it to the green list. TODO: Had to comment 2 specs which do not compile.

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

Added Paths:
-----------
    MacRuby/branches/experimental/spec/frozen/tags/macruby/language/loop_tags.txt

Modified: MacRuby/branches/experimental/rakelib/spec.rake
===================================================================
--- MacRuby/branches/experimental/rakelib/spec.rake	2009-03-26 22:55:18 UTC (rev 1177)
+++ MacRuby/branches/experimental/rakelib/spec.rake	2009-03-26 22:55:32 UTC (rev 1178)
@@ -19,6 +19,7 @@
     hash
     if
     line
+    loop
     module
     numbers
     not

Modified: MacRuby/branches/experimental/spec/frozen/language/loop_spec.rb
===================================================================
--- MacRuby/branches/experimental/spec/frozen/language/loop_spec.rb	2009-03-26 22:55:18 UTC (rev 1177)
+++ MacRuby/branches/experimental/spec/frozen/language/loop_spec.rb	2009-03-26 22:55:32 UTC (rev 1178)
@@ -42,27 +42,29 @@
     a.should == [1, 2, 4]
   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  
+  # 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
 end

Added: MacRuby/branches/experimental/spec/frozen/tags/macruby/language/loop_tags.txt
===================================================================
--- MacRuby/branches/experimental/spec/frozen/tags/macruby/language/loop_tags.txt	                        (rev 0)
+++ MacRuby/branches/experimental/spec/frozen/tags/macruby/language/loop_tags.txt	2009-03-26 22:55:32 UTC (rev 1178)
@@ -0,0 +1,3 @@
+critical:The loop expression restarts the current iteration with redo
+critical:The loop expression uses a spaghetti nightmare of redo, next and break
+fails:The loop expression returns the value passed to break if interrupted by break
\ No newline at end of file
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090326/33eb70d5/attachment-0001.html>


More information about the macruby-changes mailing list