Skip to content

Commit

Permalink
Merge pull request #35 from yui-knk/CaseNode_eqq
Browse files Browse the repository at this point in the history
Implement `CaseNode#===`
  • Loading branch information
yui-knk authored Jul 8, 2024
2 parents ca56aea + 041fc59 commit ce531fa
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 @@ -81,6 +81,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 ce531fa

Please sign in to comment.