summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-21 14:47:13 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-21 14:47:13 +0000
commit125b4b702089d65e74bc3f0d68b8a7ed41f4e39f (patch)
tree113d00de8361d2b3de662b70beb465a5133cb605 /dir.c
parentf1dc85e237e4d1aa83f451ef4f85d3f7b8200d4a (diff)
downloadruby-125b4b702089d65e74bc3f0d68b8a7ed41f4e39f.tar.gz
* dir.c (dir_initialize): remove useless intermediate variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/dir.c b/dir.c
index a5c6acd827..557f36df13 100644
--- a/dir.c
+++ b/dir.c
@@ -395,11 +395,7 @@ dir_initialize(int argc, VALUE *argv, VALUE dir)
argc = rb_scan_args(argc, argv, "1:", &dirname, &opt);
if (!NIL_P(opt)) {
- VALUE v, enc=Qnil;
-
- v = rb_hash_aref(opt, sym_enc);
- if (!NIL_P(v)) enc = v;
-
+ VALUE enc = rb_hash_aref(opt, sym_enc);
if (!NIL_P(enc)) {
fsenc = rb_to_encoding(enc);
}