aboutsummaryrefslogtreecommitdiffstats
path: root/ext/date/date_parse.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-02 03:48:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-02 03:48:58 +0000
commite8f8cf111fc1cd6ee7a00b692ba208bd1c7ce539 (patch)
tree4823a53e50bae0a70903c7d46192c30458cf644c /ext/date/date_parse.c
parent1ad6dde9da48149f1998eb5b85916165867c2368 (diff)
downloadruby-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_parse.c')
-rw-r--r--ext/date/date_parse.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ext/date/date_parse.c b/ext/date/date_parse.c
index fcda847bd8..3237fb7f63 100644
--- a/ext/date/date_parse.c
+++ b/ext/date/date_parse.c
@@ -2177,7 +2177,7 @@ date__parse(VALUE str, VALUE comp)
#endif
{
- if (RTEST(ref_hash("_bc"))) {
+ if (RTEST(del_hash("_bc"))) {
VALUE y;
y = ref_hash("cwyear");
@@ -2192,7 +2192,7 @@ date__parse(VALUE str, VALUE comp)
}
}
- if (RTEST(ref_hash("_comp"))) {
+ if (RTEST(del_hash("_comp"))) {
VALUE y;
y = ref_hash("cwyear");
@@ -2215,9 +2215,6 @@ date__parse(VALUE str, VALUE comp)
}
- del_hash("_bc");
- del_hash("_comp");
-
{
VALUE zone = ref_hash("zone");
if (!NIL_P(zone) && NIL_P(ref_hash("offset")))