Project

General

Profile

Backport #7974 » re_group_i.rb

Minimal test case - ged (Michael Granger), 02/27/2013 08:24 AM

 
# -*- syntax: ruby -*-
#encoding: utf-8

# Doesn't match in Ruby 2.0, but does in 1.9.3
p(/(?i:a) B/ =~ "A B")
p(/(?i:a) B/ =~ "a B")

# Matches in both versions
p(/(?i:a) B/i =~ "a b")
p(/(?i:a B)/ =~ "a B")
p(/(?i:a b)/ =~ "a B")
p(/B (?i:a)/ =~ "B A")
p(/B (?i:a)/ =~ "B a")

(2-2/2)