From: jason.barnabe@... Date: 2018-03-15T18:57:43+00:00 Subject: [ruby-core:86149] [Ruby trunk Bug#14608] Regexp::union and forward slashes Issue #14608 has been reported by jason.barnabe (Jason Barnabe). ---------------------------------------- Bug #14608: Regexp::union and forward slashes https://bugs.ruby-lang.org/issues/14608 * Author: jason.barnabe (Jason Barnabe) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: 2.5.0 * Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN ---------------------------------------- When using Regexp::union and a regular expression with a forward slash, there seem to be some inconsistencies. ~~~ ruby # this is weird Regexp.union(/\//, '') # => /(?-mix:\/)|/ Regexp.union(/\//, '') == /(?-mix:\/)|/ # => false # here is the difference Regexp.union(/\//, '').source # => "(?-mix:\\/)|" /(?-mix:\/)|/.source # => "(?-mix:/)|" ~~~ Previously reported at https://github.com/janosch-x/js_regex/issues/6 -- https://bugs.ruby-lang.org/ Unsubscribe: