[MacRuby/MacRuby] 690627: String#to_s will copy status of taint/untrust.
24 Apr
2011
24 Apr
'11
9:32 a.m.
Branch: refs/heads/master Home: https://github.com/MacRuby/MacRuby Commit: 69062719974a0b3f5e47c58f5afab9b423eeab99 https://github.com/MacRuby/MacRuby/commit/69062719974a0b3f5e47c58f5afab9b423... Author: Watson <watson1978@gmail.com> Date: 2011-04-24 (Sun, 24 Apr 2011) Changed paths: M string.c Log Message: ----------- String#to_s will copy status of taint/untrust. Test Script: {{{ require 'test/unit/assertions.rb' include Test::Unit::Assertions class SubStr < String def value "value : " + self end end str = SubStr.new("hello") str.taint str.untrust s = str.to_s assert_equal(true, s.tainted?) assert_equal(true, s.untrusted?) assert_equal(String, s.class) puts :ok }}}
5312
Age (days ago)
5312
Last active (days ago)
0 comments
1 participants
participants (1)
-
noreply@github.com