ruby-changes:28458
From: zzak <ko1@a...>
Date: Sun, 28 Apr 2013 10:36:06 +0900 (JST)
Subject: [ruby-changes:28458] zzak:r40510 (trunk): * object.c: With feedback from Steve Klabnik, reverted a change to
zzak 2013-04-28 10:35:56 +0900 (Sun, 28 Apr 2013) New Revision: 40510 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40510 Log: * object.c: With feedback from Steve Klabnik, reverted a change to #untrusted? and #tainted?. Also adjusted grammar for $SAFE levels Modified files: trunk/ChangeLog trunk/object.c Index: ChangeLog =================================================================== --- ChangeLog (revision 40509) +++ ChangeLog (revision 40510) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Apr 28 10:35:00 2013 Zachary Scott <zachary@z...> + + * object.c: With feedback from Steve Klabnik, reverted a change to + #untrusted? and #tainted?. Also adjusted grammar for $SAFE levels + Sun Apr 28 10:10:00 2013 Zachary Scott <zachary@z...> * lib/yaml.rb: Disable setting YAML const twice [ruby-core:54642] Index: object.c =================================================================== --- object.c (revision 40509) +++ object.c (revision 40510) @@ -844,7 +844,7 @@ rb_obj_dummy(void) https://github.com/ruby/ruby/blob/trunk/object.c#L844 * call-seq: * obj.tainted? -> true or false * - * Returns whether the object is tainted. + * Returns true if the object is tainted. * * See #taint for more information. */ @@ -863,18 +863,18 @@ rb_obj_tainted(VALUE obj) https://github.com/ruby/ruby/blob/trunk/object.c#L863 * * Mark the object as tainted. * - * To check whether an object is tainted, use #tainted? - * * Objects that are marked as tainted will be restricted from various built-in * methods. This is to prevent insecure data, such as command-line arguments * or strings read from Kernel#gets, from inadvertently compromising the users * system. * + * To check whether an object is tainted, use #tainted? + * * You should only untaint a tainted object if your code has inspected it and * determined that it is safe. To do so use #untaint * - * In $SAFE level 3 and 4, all objects are both tainted and untrusted, and the - * trust and taint methods will both raise a SecurityError exception. + * In $SAFE level 3 and 4, all objects are tainted and untrusted, any use of + * trust or taint methods will raise a SecurityError exception. */ VALUE @@ -913,7 +913,7 @@ rb_obj_untaint(VALUE obj) https://github.com/ruby/ruby/blob/trunk/object.c#L913 * call-seq: * obj.untrusted? -> true or false * - * Returns whether the object is untrusted. + * Returns true if the object is untrusted. * * See #untrust for more information. */ @@ -941,8 +941,8 @@ rb_obj_untrusted(VALUE obj) https://github.com/ruby/ruby/blob/trunk/object.c#L941 * You should only trust an untrusted object if your code has inspected it and * determined that it is safe. To do so use #trust * - * In $SAFE level 3 and 4, all objects are both tainted and untrusted, and the - * trust and taint methods will both raise a SecurityError exception. + * In $SAFE level 3 and 4, all objects are tainted and untrusted, any use of + * trust or taint methods will raise a SecurityError exception. */ VALUE -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/