aboutsummaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2021-11-16 14:03:42 +0100
committerYusuke Endoh <mame@ruby-lang.org>2021-11-16 22:51:41 +0900
commita87c56f820dac90d50544ad33cc546daa9f29a9a (patch)
tree81314da4429aa710f572e86472590380214f602d /ext
parentfa674cf7230e40bc96625ee97a6057e48bb20f0f (diff)
downloadruby-a87c56f820dac90d50544ad33cc546daa9f29a9a.tar.gz
[ruby/date] check_limit: also handle symbols
https://github.com/ruby/date/commit/376c65942b
Diffstat (limited to 'ext')
-rw-r--r--ext/date/date_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/date/date_core.c b/ext/date/date_core.c
index d1d03fe407..f6579b81e4 100644
--- a/ext/date/date_core.c
+++ b/ext/date/date_core.c
@@ -4343,6 +4343,7 @@ static void
check_limit(VALUE str, VALUE opt)
{
if (NIL_P(str)) return;
+ if (SYMBOL_P(str)) str = rb_sym2str(str);
StringValue(str);
size_t slen = RSTRING_LEN(str);