Various String methods handle tainted flag incorrectly
------------------------------------------------------

                 Key: JRUBY-1746
                 URL: http://jira.codehaus.org/browse/JRUBY-1746
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.x
         Environment: Latest JRuby 1.1b1 from trunk.
            Reporter: Vladimir Sizikov
         Attachments: string-taint.patch

Consider the following example:

{noformat}
p "hello".taint.crypt("other").tainted?
p "hello".crypt("other".taint).tainted?
p "hello".taint.dump.tainted?
p "hello".taint.inspect.tainted?
p ("%s".taint % "hello").tainted?
p "hello".taint.inspect.tainted?
{noformat}

MRI 1.8.6, 1.9 ,  Rubinius print:
true
true
true
true
true
true

Jruby prints:
false
false
false
false
false
false

:)

This also leads to 4 or 5 rubinius spec failures.
The proposed patch fixes the problem, and the spec failures. Unit tests are 
included too.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to