Skip to content

Commit

Permalink
Handle regexp options to support compat layer
Browse files Browse the repository at this point in the history
Signed-off-by: Kenji Okimoto <[email protected]>
  • Loading branch information
okkez committed Apr 5, 2018
1 parent 1bf920c commit 3d6d22f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/fluent/plugin/parser_regexp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ class RegexpParser < Parser

def configure(conf)
super
# For compat layer
if @ignorecase || @multiline
options = 0
options |= Regexp::IGNORECASE if @ignorecase
options |= Regexp::MULTILINE if @multiline
@expression = Regexp.compile(@expression.source, options)
end
@regexp = @expression # For backward compatibility
end

Expand Down

0 comments on commit 3d6d22f

Please sign in to comment.