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 b526e4d commit f0d9d5c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/regexp_parser/expression/methods/negative.rb
Original file line number Diff line number Diff line change
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.start_with?('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 =~ /^non/ end }
PosixClass.class_eval { def negative?; type == :nonposixclass end }
UnicodeProperty::Base.class_eval { def negative?; type == :nonproperty end }
end

0 comments on commit f0d9d5c

Please sign in to comment.