[macruby-changes] [1463] MacRuby/branches/experimental/spec/frozen/core/array/to_s_spec.rb

source_changes at macosforge.org source_changes at macosforge.org
Wed Apr 22 15:11:23 PDT 2009


Revision: 1463
          http://trac.macosforge.org/projects/ruby/changeset/1463
Author:   eloy.de.enige at gmail.com
Date:     2009-04-22 15:11:23 -0700 (Wed, 22 Apr 2009)
Log Message:
-----------
Fixing Array#to_s for 1.8.6.320/1.8.7

Modified Paths:
--------------
    MacRuby/branches/experimental/spec/frozen/core/array/to_s_spec.rb

Modified: MacRuby/branches/experimental/spec/frozen/core/array/to_s_spec.rb
===================================================================
--- MacRuby/branches/experimental/spec/frozen/core/array/to_s_spec.rb	2009-04-22 22:11:14 UTC (rev 1462)
+++ MacRuby/branches/experimental/spec/frozen/core/array/to_s_spec.rb	2009-04-22 22:11:23 UTC (rev 1463)
@@ -23,9 +23,27 @@
     end
   end
 
-  it "properly handles recursive arrays" do
-    ArraySpecs.empty_recursive_array.to_s.should == "[...]"
-    a = [1, 2, 3]; a << a
-    a.to_s.should == "123123[...]"
+  ruby_version_is "" .. "1.8.6.319" do
+    it "properly handles recursive arrays" do
+      ArraySpecs.empty_recursive_array.to_s.should == "[...]"
+      a = [1, 2, 3]; a << a
+      a.to_s.should == "123123[...]"
+    end
   end
+
+  ruby_version_is "1.8.6.320" ... "1.9" do
+    it "properly handles recursive arrays" do
+      ArraySpecs.empty_recursive_array.to_s.should == "[...]"
+      a = [1, 2, 3]; a << a
+      a.to_s.should == "123[...]"
+    end
+  end
+
+  ruby_version_is "1.9" do
+    it "properly handles recursive arrays" do
+      ArraySpecs.empty_recursive_array.to_s.should == "[...]"
+      a = [1, 2, 3]; a << a
+      a.to_s.should == "123123[...]"
+    end
+  end
 end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090422/e5938350/attachment-0001.html>


More information about the macruby-changes mailing list