diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-29 16:08:16 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-29 16:08:16 +0000 |
commit | 3fa5bd38af50fb3d98de0ea51043d73f8d06a24b (patch) | |
tree | d473b71cc6925ee1e17727215e9f9a66e3f24802 /spec/ruby/core/method | |
parent | 1e658d45e1f8dbadab18f9c35b5cfb5a5fec98bf (diff) | |
download | ruby-3fa5bd38af50fb3d98de0ea51043d73f8d06a24b.tar.gz |
Update to ruby/spec@83063a3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/core/method')
-rw-r--r-- | spec/ruby/core/method/call_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/method/case_compare_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/method/element_reference_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/method/eql_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/method/equal_value_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/method/inspect_spec.rb | 2 | ||||
-rw-r--r-- | spec/ruby/core/method/to_proc_spec.rb | 4 | ||||
-rw-r--r-- | spec/ruby/core/method/to_s_spec.rb | 2 |
8 files changed, 11 insertions, 7 deletions
diff --git a/spec/ruby/core/method/call_spec.rb b/spec/ruby/core/method/call_spec.rb index 1a90028176..1c2735de21 100644 --- a/spec/ruby/core/method/call_spec.rb +++ b/spec/ruby/core/method/call_spec.rb @@ -3,5 +3,5 @@ require File.expand_path('../fixtures/classes', __FILE__) require File.expand_path('../shared/call', __FILE__) describe "Method#call" do - it_behaves_like(:method_call, :call) + it_behaves_like :method_call, :call end diff --git a/spec/ruby/core/method/case_compare_spec.rb b/spec/ruby/core/method/case_compare_spec.rb index f75eff873c..a80e4b1782 100644 --- a/spec/ruby/core/method/case_compare_spec.rb +++ b/spec/ruby/core/method/case_compare_spec.rb @@ -4,6 +4,6 @@ require File.expand_path('../shared/call', __FILE__) ruby_version_is "2.5" do describe "Method#===" do - it_behaves_like(:method_call, :===) + it_behaves_like :method_call, :=== end end diff --git a/spec/ruby/core/method/element_reference_spec.rb b/spec/ruby/core/method/element_reference_spec.rb index 0be47afede..1e5efc0dd3 100644 --- a/spec/ruby/core/method/element_reference_spec.rb +++ b/spec/ruby/core/method/element_reference_spec.rb @@ -3,5 +3,5 @@ require File.expand_path('../fixtures/classes', __FILE__) require File.expand_path('../shared/call', __FILE__) describe "Method#[]" do - it_behaves_like(:method_call, :[]) + it_behaves_like :method_call, :[] end diff --git a/spec/ruby/core/method/eql_spec.rb b/spec/ruby/core/method/eql_spec.rb index f8914e1d12..da43c6d770 100644 --- a/spec/ruby/core/method/eql_spec.rb +++ b/spec/ruby/core/method/eql_spec.rb @@ -2,5 +2,5 @@ require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../shared/eql', __FILE__) describe "Method#eql?" do - it_behaves_like(:method_equal, :eql?) + it_behaves_like :method_equal, :eql? end diff --git a/spec/ruby/core/method/equal_value_spec.rb b/spec/ruby/core/method/equal_value_spec.rb index 365e0ac424..aba0c9f256 100644 --- a/spec/ruby/core/method/equal_value_spec.rb +++ b/spec/ruby/core/method/equal_value_spec.rb @@ -2,5 +2,5 @@ require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../shared/eql', __FILE__) describe "Method#==" do - it_behaves_like(:method_equal, :==) + it_behaves_like :method_equal, :== end diff --git a/spec/ruby/core/method/inspect_spec.rb b/spec/ruby/core/method/inspect_spec.rb index bfb61daf53..70aab95434 100644 --- a/spec/ruby/core/method/inspect_spec.rb +++ b/spec/ruby/core/method/inspect_spec.rb @@ -2,5 +2,5 @@ require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../shared/to_s', __FILE__) describe "Method#inspect" do - it_behaves_like(:method_to_s, :inspect) + it_behaves_like :method_to_s, :inspect end diff --git a/spec/ruby/core/method/to_proc_spec.rb b/spec/ruby/core/method/to_proc_spec.rb index 5a754f8597..87593108ff 100644 --- a/spec/ruby/core/method/to_proc_spec.rb +++ b/spec/ruby/core/method/to_proc_spec.rb @@ -55,6 +55,10 @@ describe "Method#to_proc" do x.baz(1,2,3,&m).should == [1,2,3] end + it "returns a proc whose binding has the same receiver as the method" do + @meth.receiver.should == @meth.to_proc.binding.receiver + end + # #5926 it "returns a proc that can receive a block" do x = Object.new diff --git a/spec/ruby/core/method/to_s_spec.rb b/spec/ruby/core/method/to_s_spec.rb index 1bf341f2a6..8234871855 100644 --- a/spec/ruby/core/method/to_s_spec.rb +++ b/spec/ruby/core/method/to_s_spec.rb @@ -2,5 +2,5 @@ require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../shared/to_s', __FILE__) describe "Method#to_s" do - it_behaves_like(:method_to_s, :to_s) + it_behaves_like :method_to_s, :to_s end |