parent
eb985f94b2
commit
05b94c3264
2 changed files with 5 additions and 1 deletions
|
@ -36,6 +36,8 @@ module Mutant
|
|||
at: %i[fetch key?],
|
||||
fetch: %i[key?],
|
||||
values_at: %i[fetch_values],
|
||||
match: %i[match?],
|
||||
'=~': %i[match?],
|
||||
:[] => %i[at fetch key?],
|
||||
:== => %i[eql? equal?],
|
||||
:>= => %i[> == eql? equal?],
|
||||
|
|
|
@ -625,7 +625,7 @@ Mutant::Meta::Example.add :send do
|
|||
mutation 'self[*bar]'
|
||||
end
|
||||
|
||||
(Mutant::AST::Types::BINARY_METHOD_OPERATORS - %i[<= >= < > == != eql?]).each do |operator|
|
||||
(Mutant::AST::Types::BINARY_METHOD_OPERATORS - %i[=~ <= >= < > == != eql?]).each do |operator|
|
||||
Mutant::Meta::Example.add :send do
|
||||
source "true #{operator} false"
|
||||
|
||||
|
@ -756,6 +756,7 @@ Mutant::Meta::Example.add :send do
|
|||
mutation 'self =~ //'
|
||||
mutation '//'
|
||||
mutation 'a =~ /nomatch\A/'
|
||||
mutation 'a.match?(//)'
|
||||
end
|
||||
|
||||
Mutant::Meta::Example.add :send do
|
||||
|
@ -766,6 +767,7 @@ Mutant::Meta::Example.add :send do
|
|||
mutation '//.match'
|
||||
mutation '//.match(nil)'
|
||||
mutation '//.match(self)'
|
||||
mutation '//.match?(a)'
|
||||
mutation '//'
|
||||
mutation '/nomatch\A/.match(a)'
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue