diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-02 03:48:58 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-04-02 03:48:58 +0000 |
commit | e8f8cf111fc1cd6ee7a00b692ba208bd1c7ce539 (patch) | |
tree | 4823a53e50bae0a70903c7d46192c30458cf644c /ext/date/date_core.c | |
parent | 1ad6dde9da48149f1998eb5b85916165867c2368 (diff) | |
download | ruby-e8f8cf111fc1cd6ee7a00b692ba208bd1c7ce539.tar.gz |
date: use del_hash to extract an element destructively
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/date/date_core.c')
-rw-r--r-- | ext/date/date_core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/date/date_core.c b/ext/date/date_core.c index 49027e92b1..88be90b6bc 100644 --- a/ext/date/date_core.c +++ b/ext/date/date_core.c @@ -3692,7 +3692,7 @@ rt_rewrite_frags(VALUE hash) { VALUE seconds; - seconds = ref_hash("seconds"); + seconds = del_hash("seconds"); if (!NIL_P(seconds)) { VALUE offset, d, h, min, s, fr; @@ -3717,7 +3717,6 @@ rt_rewrite_frags(VALUE hash) set_hash("min", min); set_hash("sec", s); set_hash("sec_fraction", fr); - del_hash("seconds"); } return hash; } |