From 041fc599850c6eb2da28a6339645c8c5b555291b Mon Sep 17 00:00:00 2001 From: yui-knk Date: Mon, 8 Jul 2024 15:38:56 +0900 Subject: [PATCH] Implement `CaseNode#===` --- spec/spec_helper.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index d3dffdd..34b1aa3 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -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