Actions
Bug #10987
closedWarning "warning “regex literal in condition” issued, even condition is not constant
Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.0.0p598 (2014-11-13) [x86_64-cygwin]
Description
The following program emits the warning 'regex literal in condition':
#!/usr/bin/ruby
while gets
print if /foo/../bar/
end
It seems that the parser does not recognize, that the "if" clause matches the regexp against $_
Updated by nobu (Nobuyoshi Nakada) about 9 years ago
- Description updated (diff)
- Status changed from Open to Rejected
The implicit matching in a flip-flop operator is warned.
Actions
Like0
Like0