[macruby-changes] [1106] MacRuby/branches/experimental/spec/frozen/language

source_changes at macosforge.org source_changes at macosforge.org
Mon Mar 23 07:19:57 PDT 2009


Revision: 1106
          http://trac.macosforge.org/projects/ruby/changeset/1106
Author:   eloy.de.enige at gmail.com
Date:     2009-03-23 07:19:56 -0700 (Mon, 23 Mar 2009)
Log Message:
-----------
Moved a 1.8 specific break example into a language version file and added a 1.9 example. There are still quite some failures on 1.9 and no tags, so if they should run on 1.9 or not is probably not investigated yet.

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

Added Paths:
-----------
    MacRuby/branches/experimental/spec/frozen/language/versions/break_1.8.rb
    MacRuby/branches/experimental/spec/frozen/language/versions/break_1.9.rb

Modified: MacRuby/branches/experimental/spec/frozen/language/break_spec.rb
===================================================================
--- MacRuby/branches/experimental/spec/frozen/language/break_spec.rb	2009-03-23 14:04:39 UTC (rev 1105)
+++ MacRuby/branches/experimental/spec/frozen/language/break_spec.rb	2009-03-23 14:19:56 UTC (rev 1106)
@@ -1,11 +1,6 @@
 require File.dirname(__FILE__) + '/../spec_helper'
 
 describe "The break statement" do
-  it "raises a LocalJumpError if used not within block or while/for loop" do
-    def x; break; end
-    lambda { x }.should raise_error(LocalJumpError)
-  end
-
   it "ends block execution if used whithin block" do
     a = []
     lambda {
@@ -218,3 +213,5 @@
   end
 
 end
+
+language_version __FILE__, "break"
\ No newline at end of file

Added: MacRuby/branches/experimental/spec/frozen/language/versions/break_1.8.rb
===================================================================
--- MacRuby/branches/experimental/spec/frozen/language/versions/break_1.8.rb	                        (rev 0)
+++ MacRuby/branches/experimental/spec/frozen/language/versions/break_1.8.rb	2009-03-23 14:19:56 UTC (rev 1106)
@@ -0,0 +1,6 @@
+describe "The break statement" do
+  it "raises a LocalJumpError if used not within block or while/for loop" do
+    def x; break; end
+    lambda { x }.should raise_error(LocalJumpError)
+  end
+end
\ No newline at end of file

Added: MacRuby/branches/experimental/spec/frozen/language/versions/break_1.9.rb
===================================================================
--- MacRuby/branches/experimental/spec/frozen/language/versions/break_1.9.rb	                        (rev 0)
+++ MacRuby/branches/experimental/spec/frozen/language/versions/break_1.9.rb	2009-03-23 14:19:56 UTC (rev 1106)
@@ -0,0 +1,5 @@
+describe "The break statement" do
+  it "raises a SyntaxError if used not within block or while/for loop" do
+    lambda { eval "def x; break; end" }.should raise_error(SyntaxError)
+  end
+end
\ No newline at end of file
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090323/b29a66c3/attachment.html>


More information about the macruby-changes mailing list