Project

General

Profile

Actions

Backport #2943

closed

Regexp Hash Code Changes

Added by nex3 (Natalie Weizenbaum) about 14 years ago. Updated almost 5 years ago.

Status:
Closed
Assignee:
-
[ruby-core:28550]

Description

=begin
When a Regexp containing a sub-section with the case-insensitivity flag set is matched against a string, its hash code changes.

re = /(?i:.)/
p re.hash #=> -452142835
"_" =~ re
p re.hash #=> 21933550
=end

Actions

Also available in: Atom PDF

Like0
Like0