[macruby-changes] [4922] MacRuby/trunk/string.c
source_changes at macosforge.org
source_changes at macosforge.org
Sun Nov 21 02:14:24 PST 2010
Revision: 4922
http://trac.macosforge.org/projects/ruby/changeset/4922
Author: watson1978 at gmail.com
Date: 2010-11-21 02:14:20 -0800 (Sun, 21 Nov 2010)
Log Message:
-----------
String#* will copy the status of untrust.
Test Script:
{{{
require 'test/unit/assertions.rb'
include Test::Unit::Assertions
str = 'hello'
str.taint
str.untrust
str.freeze
s = str * 5
assert_equal(true, s.tainted?)
assert_equal(true, s.untrusted?)
assert_equal(false, s.frozen?)
puts :ok
}}}
Modified Paths:
--------------
MacRuby/trunk/string.c
Modified: MacRuby/trunk/string.c
===================================================================
--- MacRuby/trunk/string.c 2010-11-21 04:36:55 UTC (rev 4921)
+++ MacRuby/trunk/string.c 2010-11-21 10:14:20 UTC (rev 4922)
@@ -2430,6 +2430,9 @@
if (OBJ_TAINTED(self)) {
OBJ_TAINT(new);
}
+ if (OBJ_UNTRUSTED(self)) {
+ OBJ_UNTRUST(new);
+ }
return new;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101121/04c1a30a/attachment.html>
More information about the macruby-changes
mailing list