diff options
author | Jeremy Evans <code@jeremyevans.net> | 2019-09-24 20:59:12 -0700 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2019-11-18 01:00:25 +0200 |
commit | ffd0820ab317542f8780aac475da590a4bdbc7a8 (patch) | |
tree | 6a5d774933c15fd2b9ea948bd3ae2fa587faaf82 /dir.c | |
parent | c5c05460ac20abcbc0ed686eb4acf06da7a39a79 (diff) |
Deprecate taint/trust and related methods, and make the methods no-ops
This removes the related tests, and puts the related specs behind
version guards. This affects all code in lib, including some
libraries that may want to support older versions of Ruby.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2476
Diffstat (limited to 'dir.c')
-rw-r--r-- | dir.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -1129,9 +1129,8 @@ rb_dir_getwd_ospath(void) DATA_PTR(path_guard) = path; #ifdef __APPLE__ cwd = rb_str_normalize_ospath(path, strlen(path)); - OBJ_TAINT(cwd); #else - cwd = rb_tainted_str_new2(path); + cwd = rb_str_new2(path); #endif DATA_PTR(path_guard) = 0; @@ -2564,7 +2563,6 @@ push_pattern(const char *path, VALUE ary, void *enc) #if defined _WIN32 || defined __APPLE__ VALUE name = rb_utf8_str_new_cstr(path); rb_encoding *eenc = rb_default_internal_encoding(); - OBJ_TAINT(name); name = rb_str_conv_enc(name, NULL, eenc ? eenc : enc); #else VALUE name = rb_external_str_new_with_enc(path, strlen(path), enc); |