diff options
author | John Mair <jrmair@gmail.com> | 2018-02-23 01:25:47 +0100 |
---|---|---|
committer | John Mair <jrmair@gmail.com> | 2018-02-23 01:25:47 +0100 |
commit | 87e837f3b9830547debe52a808a8f8304fdcecfd (patch) | |
tree | 3af34648f3c145e116c251fb9eacdf1d754537e2 | |
parent | 5bd5a0eba11c6f1c3f9aca1c82ee4fb4069676f3 (diff) | |
download | pry-87e837f3b9830547debe52a808a8f8304fdcecfd.tar.gz |
get this bitch working on rubies that dont support keyword args
-rw-r--r-- | spec/method_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/method_spec.rb b/spec/method_spec.rb index 0fc7715b..29b1255b 100644 --- a/spec/method_spec.rb +++ b/spec/method_spec.rb @@ -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 |