Skip to content

Commit

Permalink
Fix b526e4d for ancient rubies
Browse files Browse the repository at this point in the history
  • Loading branch information
jaynetics committed Jan 7, 2024
1 parent d603922 commit a984bd1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/regexp_parser/expression/methods/negative.rb
Expand Up @@ -10,11 +10,11 @@ def negated?
end
end

Anchor::NonWordBoundary.class_eval { def negative?; true end }
Assertion::NegativeLookahead.class_eval { def negative?; true end }
Assertion::NegativeLookbehind.class_eval { def negative?; true end }
CharacterSet.class_eval { def negative?; negative end }
CharacterType::Base.class_eval { def negative?; token.to_s =~ /^non/ end }
PosixClass.class_eval { def negative?; type == :nonposixclass end }
UnicodeProperty::Base.class_eval { def negative?; type == :nonproperty end }
Anchor::NonWordBoundary.class_eval { def negative?; true end }
Assertion::NegativeLookahead.class_eval { def negative?; true end }
Assertion::NegativeLookbehind.class_eval { def negative?; true end }
CharacterSet.class_eval { def negative?; negative end }
CharacterType::Base.class_eval { def negative?; token.to_s.start_with?('non') end }
PosixClass.class_eval { def negative?; type == :nonposixclass end }
UnicodeProperty::Base.class_eval { def negative?; type == :nonproperty end }
end

0 comments on commit a984bd1

Please sign in to comment.