Modified: MacRuby/branches/experimental/rakelib/spec.rake (1177 => 1178)
--- 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 (1177 => 1178)
--- 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 (0 => 1178)
--- 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