Project

General

Profile

« Previous | Next » 

Revision d89280e8

Added by [email protected] (Dustin Brown) over 1 year ago

Copy encoding flags when copying a regex [Bug #20039]

When a Regexp is initialized with another Regexp, we simply copy the
properties from the original. However, the flags on the original were
not being copied correctly. This caused an issue when the original had
multibyte characters and was being compared with an ASCII string.
Without the forced encoding flag (KCODE_FIXED) transferred on to the
new Regexp, the comparison would fail. See the included test for an
example.

Co-authored-by: Nobuyoshi Nakada