ActionsLike0
Bug #9344
closedwarning origin incorrect with instance_eval
Description
File 'test.rb' contains:
$-w = 2
code = <<-RUBY
x = /]]/
y = /[a-z]+*/
RUBY
instance_eval code, 'foo.rb'
The execution reports:
foo.rb:1: warning: regular expression has ']' without escape: /]]/
test.rb:6: warning: nested repeat operator + and * was replaced with '*': /[a-z]+*/
The last line should state 'foo.rb:2
' instead of 'test.rb:6
'.
The bug is also present in: ruby 2.0.0p353 (2013-11-22) [i386-mingw32]
Files
Updated by srawlins (Sam Rawlins) about 11 years ago
- File 9344.patch 9344.patch added
Updated by srawlins (Sam Rawlins) about 11 years ago
- File 9344-v2.patch 9344-v2.patch added
Updated by nobu (Nobuyoshi Nakada) almost 11 years ago
- Description updated (diff)
- Category set to regexp
- Status changed from Open to Assigned
- Assignee set to k_takata (Ken Takata)
- Target version set to 2.2.0
- Backport changed from 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN to 1.9.3: REQUIRED, 2.0.0: REQUIRED, 2.1: REQUIRED
Updated by k_takata (Ken Takata) over 10 years ago
- Status changed from Assigned to Closed
Updated by nagachika (Tomoyuki Chikanaga) over 10 years ago
- Backport changed from 1.9.3: REQUIRED, 2.0.0: REQUIRED, 2.1: REQUIRED to 1.9.3: REQUIRED, 2.0.0: REQUIRED, 2.1: DONE
Updated by usa (Usaku NAKAMURA) over 10 years ago
- Backport changed from 1.9.3: REQUIRED, 2.0.0: REQUIRED, 2.1: DONE to 2.0.0: DONE, 2.1: DONE
ActionsLike0