Modified: MacRuby/branches/experimental/spec/frozen/language/variables_spec.rb (1214 => 1215)
--- MacRuby/branches/experimental/spec/frozen/language/variables_spec.rb 2009-03-27 22:07:55 UTC (rev 1214)
+++ MacRuby/branches/experimental/spec/frozen/language/variables_spec.rb 2009-03-27 22:55:46 UTC (rev 1215)
@@ -28,6 +28,7 @@
a.should be_nil
end
end
+
ruby_version_is "1.9" do
it "assigns [] to lhs when rhs is an empty splat expression" do
a = *()
@@ -49,6 +50,7 @@
a = *[*[1,2]]; a.should == [1,2]
end
end
+
ruby_version_is "1.9" do
it "allows the assignment of the rhs to the lhs using the rhs splat operator" do
a = *nil; a.should == []
@@ -79,6 +81,7 @@
*a = [*[1,2]]; a.should == [[1,2]]
end
end
+
ruby_version_is "1.9" do
it "allows the assignment of the rhs to the lhs using the lhs splat operator" do
* = 1,2 # Valid syntax, but pretty useless! Nothing to test
@@ -109,6 +112,7 @@
*a = *[*[1,2]]; a.should == [1,2]
end
end
+
ruby_version_is "1.9" do
it "allows the assignment of rhs to the lhs using the lhs and rhs splat operators simultaneously" do
*a = *nil; a.should == []
@@ -193,6 +197,7 @@
x.should == [[1, 2, 3, 4, 5, 6, 7]]
end
end
+
ruby_version_is "1.9" do
it "succeeds without conversion" do
*x = (1..7).to_a