diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-06-13 21:41:45 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-06-13 21:41:45 +0000 |
commit | 67078e81f57523fdf65ba7a9d919a146763363a5 (patch) | |
tree | 795ec86c6a90842d9168b0900d058c46244249f3 /spec/ruby/core/tracepoint | |
parent | 78890babe74e87aea79d1022ab455aeddf8a3310 (diff) | |
download | ruby-67078e81f57523fdf65ba7a9d919a146763363a5.tar.gz |
Update to ruby/spec@4bc7a2b
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/core/tracepoint')
-rw-r--r-- | spec/ruby/core/tracepoint/parameters_spec.rb | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/spec/ruby/core/tracepoint/parameters_spec.rb b/spec/ruby/core/tracepoint/parameters_spec.rb index 4728b0a448..550b9572c0 100644 --- a/spec/ruby/core/tracepoint/parameters_spec.rb +++ b/spec/ruby/core/tracepoint/parameters_spec.rb @@ -1,21 +1,23 @@ require_relative '../../spec_helper' -describe 'TracePoint#parameters' do - it 'returns the parameters of block' do - f = proc {|x, y, z| } - parameters = nil - TracePoint.new(:b_call) {|tp| parameters = tp.parameters }.enable do - f.call - parameters.should == [[:opt, :x], [:opt, :y], [:opt, :z]] +ruby_version_is "2.6" do + describe 'TracePoint#parameters' do + it 'returns the parameters of block' do + f = proc {|x, y, z| } + parameters = nil + TracePoint.new(:b_call) {|tp| parameters = tp.parameters }.enable do + f.call + parameters.should == [[:opt, :x], [:opt, :y], [:opt, :z]] + end end - end - it 'returns the parameters of lambda block' do - f = lambda {|x, y, z| } - parameters = nil - TracePoint.new(:b_call) {|tp| parameters = tp.parameters }.enable do - f.call(1, 2, 3) - parameters.should == [[:req, :x], [:req, :y], [:req, :z]] + it 'returns the parameters of lambda block' do + f = lambda {|x, y, z| } + parameters = nil + TracePoint.new(:b_call) {|tp| parameters = tp.parameters }.enable do + f.call(1, 2, 3) + parameters.should == [[:req, :x], [:req, :y], [:req, :z]] + end end end end |