summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-09-21 09:35:29 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-09-21 09:35:29 +0000
commitba19ba779cc232474d75eb190e7420bf667832dc (patch)
treeac9f317f71df73b44ce9a4b0b485f6df646d44bc /dir.c
parentde5a85496ac4ae7bd24b5fc7acb8001a5e4d8b7d (diff)
* array.c (rb_ary_uniq_bang): element size might change during
comparison. [ruby-dev:24298] * enum.c (enum_sort_by): do not use qsort directly. use rb_ary_sort_bang() instead. [ruby-dev:24291] * enum.c (enum_sort_by): pedantic type check added. [ruby-dev:24291] * hash.c (rb_hash_foreach_iter): check iter_lev after each iteration. [ruby-dev:24289] * array.c (rb_ary_and): element size might change during comparison. [ruby-dev:24290] * array.c (rb_ary_or): ditto. [ruby-dev:24292] * array.c (rb_ary_equal): wrong fix. [ruby-dev:24286] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index 9327022..6448634 100644
--- a/dir.c
+++ b/dir.c
@@ -648,8 +648,9 @@ dir_s_chdir(argc, argv, obj)
if (rb_block_given_p()) {
struct chdir_data args;
+ char *cwd = my_getcwd();
- args.old_path = rb_str_new2(my_getcwd());
+ args.old_path = rb_tainted_str_new2(cwd); free(cwd);
args.new_path = path;
args.done = Qfalse;
return rb_ensure(chdir_yield, (VALUE)&args, chdir_restore, (VALUE)&args);