lib/ruby_indexer/lib/ruby_indexer/entry.rb in ruby-lsp-0.17.5 vs lib/ruby_indexer/lib/ruby_indexer/entry.rb in ruby-lsp-0.17.6
- old
+ new
@@ -286,9 +286,17 @@
# A block method parameter, e.g. `def foo(&block)`
class BlockParameter < Parameter
DEFAULT_NAME = T.let(:"<anonymous block>", Symbol)
+ class << self
+ extend T::Sig
+ sig { returns(BlockParameter) }
+ def anonymous
+ new(name: DEFAULT_NAME)
+ end
+ end
+
sig { override.returns(Symbol) }
def decorated_name
:"&#{@name}"
end
end