diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-10-21 14:47:13 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-10-21 14:47:13 +0000 |
commit | 125b4b702089d65e74bc3f0d68b8a7ed41f4e39f (patch) | |
tree | 113d00de8361d2b3de662b70beb465a5133cb605 /dir.c | |
parent | f1dc85e237e4d1aa83f451ef4f85d3f7b8200d4a (diff) | |
download | ruby-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.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -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); } |