[macruby-changes] [1441] MacRuby/branches/experimental/spec/frozen/core/kernel/taint_spec.rb

source_changes at macosforge.org source_changes at macosforge.org
Wed Apr 22 15:07:27 PDT 2009


Revision: 1441
          http://trac.macosforge.org/projects/ruby/changeset/1441
Author:   eloy.de.enige at gmail.com
Date:     2009-04-22 15:07:24 -0700 (Wed, 22 Apr 2009)
Log Message:
-----------
- Added a string value to core/kernel/taint_spec.rb
- Refactoring "has no effect on immediate values" exercise

Modified Paths:
--------------
    MacRuby/branches/experimental/spec/frozen/core/kernel/taint_spec.rb

Modified: MacRuby/branches/experimental/spec/frozen/core/kernel/taint_spec.rb
===================================================================
--- MacRuby/branches/experimental/spec/frozen/core/kernel/taint_spec.rb	2009-04-22 05:10:44 UTC (rev 1440)
+++ MacRuby/branches/experimental/spec/frozen/core/kernel/taint_spec.rb	2009-04-22 22:07:24 UTC (rev 1441)
@@ -5,15 +5,9 @@
   it "sets self to be tainted" do
     mock('tainted?').taint.tainted?.should == true
   end
-  
+
   it "has no effect on immediate values" do
-    a = nil
-    b = true
-    c = false
-    d = 1
-    a.tainted?.should == false
-    b.tainted?.should == false
-    c.tainted?.should == false
-    d.tainted?.should == false
+    inmediate_values = [a = nil, b = true, c = false, d = 1, e = "a string"]
+    inmediate_values.each{ |v| v.tainted?.should == false}
   end
 end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090422/3455d5b9/attachment.html>


More information about the macruby-changes mailing list