I get a strange behavior from instance_eval when reporting warnings on
regular expressions, both in 1.9.3p448 and 2.0.0p353.
The file “test.rb” contains:
$-w = 2
file = ‘foo.rb’
code = <<-RUBY
x = /]]/
y = /[a-z]+*/
instance_eval code, file
When run, I get:
foo.rb:1: warning: regular expression has ‘]’ without escape: /]]/
test.rb:7: warning: nested repeat operator + and * was replaced with
The second warning not reported as “foo.rb:2”: am I missing something,
or should I report a bug?