aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/method
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/method')
-rw-r--r--spec/ruby/core/method/call_spec.rb2
-rw-r--r--spec/ruby/core/method/case_compare_spec.rb2
-rw-r--r--spec/ruby/core/method/element_reference_spec.rb2
-rw-r--r--spec/ruby/core/method/eql_spec.rb2
-rw-r--r--spec/ruby/core/method/equal_value_spec.rb2
-rw-r--r--spec/ruby/core/method/inspect_spec.rb2
-rw-r--r--spec/ruby/core/method/to_proc_spec.rb4
-rw-r--r--spec/ruby/core/method/to_s_spec.rb2
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