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:
parent
5bd5a0eba1
commit
87e837f3b9
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue