Skip to content

Commit

Permalink
0-10-stable: [snapshot]
Browse files Browse the repository at this point in the history
  • Loading branch information
elia committed Jun 7, 2018
1 parent c775d82 commit ab2063f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/opal/nodes/literal.rb
Expand Up @@ -72,11 +72,11 @@ class RegexpNode < Base
children :value, :flags

def compile
old_flags = self.flags
flags = old_flags.gsub(/[^imuy]/, '') if old_flags
flags = self.flags
flags = flags.gsub(/[^gimuy]/, '') if flags

if old_flags != flags
warn "invalid js flags found #{old_flags.inspect}, replaced with #{flags.inspect}"
if flags != self.flags
warn "invalid js flags found #{self.flags.inspect}, replaced with #{flags.inspect}"
end

case value
Expand Down

0 comments on commit ab2063f

Please sign in to comment.