1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

support keyword args in

This commit is contained in:
Chase 2018-02-20 16:44:16 -05:00
parent 913227ded3
commit 4a7e19e9da

View file

@ -354,8 +354,8 @@ class Pry
# @return [String] A representation of the method's signature, including its
# name and parameters. Optional and "rest" parameters are marked with `*`
# and block parameters with `&`. If the parameter names are unavailable,
# they're given numbered names instead.
# and block parameters with `&`. Keyword arguments are shown qith `={}`
# If the parameter names are unavailable, they're given numbered names instead.
# Paraphrased from `awesome_print` gem.
def signature
if respond_to?(:parameters)
@ -366,6 +366,7 @@ class Pry
when :opt then "#{nam}=?"
when :rest then "*#{nam}"
when :block then "&#{nam}"
when :key then "#{nam}={}"
else '?'
end
end