[macruby-changes] [4923] MacRuby/trunk/string.c

source_changes at macosforge.org source_changes at macosforge.org
Sun Nov 21 06:25:22 PST 2010


Revision: 4923
          http://trac.macosforge.org/projects/ruby/changeset/4923
Author:   watson1978 at gmail.com
Date:     2010-11-21 06:25:19 -0800 (Sun, 21 Nov 2010)
Log Message:
-----------
String#inspect will copy the status of untrust.

Test Script:
{{{
require 'test/unit/assertions.rb'
include Test::Unit::Assertions

str = 'abcd'
str.taint
str.untrust

s = str.inspect
assert_equal(true, s.tainted?)
assert_equal(true, s.untrusted?)

puts :ok
}}}

Modified Paths:
--------------
    MacRuby/trunk/string.c

Modified: MacRuby/trunk/string.c
===================================================================
--- MacRuby/trunk/string.c	2010-11-21 10:14:20 UTC (rev 4922)
+++ MacRuby/trunk/string.c	2010-11-21 14:25:19 UTC (rev 4923)
@@ -2879,6 +2879,9 @@
     if (OBJ_TAINTED(str)) {
 	OBJ_TAINT(result);
     }
+    if (OBJ_UNTRUSTED(str)) {
+	OBJ_UNTRUST(result);
+    }
     return result; 
 }
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101121/e10774a6/attachment-0001.html>


More information about the macruby-changes mailing list