From b22989a688bbd2e138adcb7fd695adb21c26dbc0 Mon Sep 17 00:00:00 2001 From: ksss Date: Fri, 30 Dec 2022 22:40:56 +0900 Subject: [PATCH] Support Symbol and _ToStr for Regexp#=~ --- core/regexp.rbs | 2 +- test/stdlib/Regexp_test.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/regexp.rbs b/core/regexp.rbs index fd6d9b102..783d1e686 100644 --- a/core/regexp.rbs +++ b/core/regexp.rbs @@ -948,7 +948,7 @@ class Regexp # " x = y " =~ /(?\w+)\s*=\s*(?\w+)/ # p lhs, rhs # undefined local variable # - def =~: (String? str) -> Integer? + def =~: (String? | Symbol | _ToStr str) -> Integer? #