Skip to content

Commit

Permalink
Implement CaseNode#===
Browse files Browse the repository at this point in the history
  • Loading branch information
yui-knk committed Jul 8, 2024
1 parent 044b54a commit 041fc59
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ def ===(other)
end

class CaseNode
prepend Module.new {
def ===(other)
super(other) &&
self.location == other.location &&
self.case_keyword_loc == other.case_keyword_loc &&
self.end_keyword_loc == other.end_keyword_loc
end
}
end

class AndNode
Expand Down

0 comments on commit 041fc59

Please sign in to comment.