From c72f8734b9433640ba6ce8fd8c245edbc182373e Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Tue, 21 Jan 2025 09:56:49 +0900 Subject: [PATCH] Prevent a warning: the block passed to 'map_type_name' .. may be ignored Fixes #2247 --- lib/rbs/types.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rbs/types.rb b/lib/rbs/types.rb index e0064cbb3..246ff31e6 100644 --- a/lib/rbs/types.rb +++ b/lib/rbs/types.rb @@ -15,7 +15,7 @@ def sub(s) end module NoTypeName - def map_type_name + def map_type_name(&) self end end @@ -229,7 +229,7 @@ def to_s(level = 0) include EmptyEachType - def map_type_name + def map_type_name(&) ClassSingleton.new( name: yield(name, location, self), location: location