From be37ef6efa6d7cf27f255571e86b0baaaf1f532e Mon Sep 17 00:00:00 2001 From: Joshua Young Date: Sun, 27 Oct 2024 12:08:22 +1000 Subject: [PATCH] fix incorrect super fallback in RedBlackTree::DataDelegation#respond_to_missing? --- CHANGELOG.md | 2 ++ lib/red_black_tree/node/data_delegation.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8f0fb4..8e36f9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## [Unreleased] +- Fix incorrect `super` fallback in `RedBlackTree::DataDelegation#respond_to_missing?` + ## [0.1.3] - 2024-10-21 - Make `RedBlackTree#left_most_node` public diff --git a/lib/red_black_tree/node/data_delegation.rb b/lib/red_black_tree/node/data_delegation.rb index 745a76d..d1f8853 100644 --- a/lib/red_black_tree/node/data_delegation.rb +++ b/lib/red_black_tree/node/data_delegation.rb @@ -11,7 +11,7 @@ def method_missing method_name, *args, &block end def respond_to_missing? method_name, include_private = false - @data.respond_to? method_name, include_private || super + (@data.respond_to? method_name, include_private) || super end end end