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

get this bitch working on rubies that dont support keyword args

This commit is contained in:
John Mair 2018-02-23 01:25:47 +01:00
parent 5bd5a0eba1
commit 87e837f3b9

View file

@ -542,13 +542,13 @@ describe Pry::Method do
# keyword args are only on >= Ruby 2.1
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.1")
it 'should print the name of keyword args, with :? after the arg name' do
def @class.keyword(keyword_arg: "") end
eval %{def @class.keyword(keyword_arg: "") end}
signature = Pry::Method.new(@class.method(:keyword)).signature
expect(signature).to eq("keyword(keyword_arg:?)")
end
it 'should print the name of keyword args, with : after the arg name' do
def @class.required_keyword(required_key:) end
eval %{def @class.required_keyword(required_key:) end}
signature = Pry::Method.new(@class.method(:required_keyword)).signature
expect(signature).to eq("required_keyword(required_key:)")
end