summaryrefslogtreecommitdiff
path: root/spec/ruby/core/method/shared/to_s.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/method/shared/to_s.rb')
-rw-r--r--spec/ruby/core/method/shared/to_s.rb32
1 files changed, 14 insertions, 18 deletions
diff --git a/spec/ruby/core/method/shared/to_s.rb b/spec/ruby/core/method/shared/to_s.rb
index 0dcae41b59..6fdeaaf99c 100644
--- a/spec/ruby/core/method/shared/to_s.rb
+++ b/spec/ruby/core/method/shared/to_s.rb
@@ -24,19 +24,17 @@ describe :method_to_s, shared: true do
@string.should =~ /\#bar/
end
- ruby_version_is "2.7" do
- it "returns a String containing method arguments" do
- obj = MethodSpecs::Methods.new
- obj.method(:zero).send(@method).should.include?("()")
- obj.method(:one_req).send(@method).should.include?("(a)")
- obj.method(:one_req_named).send(@method).should.include?("(a:)")
- obj.method(:zero_with_block).send(@method).should.include?("(&blk)")
- obj.method(:one_opt).send(@method).should.include?("(a=...)")
- obj.method(:one_opt_named).send(@method).should.include?("(a: ...)")
- obj.method(:zero_with_splat).send(@method).should.include?("(*a)")
- obj.method(:zero_with_double_splat).send(@method).should.include?("(**a)")
- obj.method(:one_req_one_opt_with_splat_and_block).send(@method).should.include?("(a, b=..., *c, &blk)")
- end
+ it "returns a String containing method arguments" do
+ obj = MethodSpecs::Methods.new
+ obj.method(:zero).send(@method).should.include?("()")
+ obj.method(:one_req).send(@method).should.include?("(a)")
+ obj.method(:one_req_named).send(@method).should.include?("(a:)")
+ obj.method(:zero_with_block).send(@method).should.include?("(&blk)")
+ obj.method(:one_opt).send(@method).should.include?("(a=...)")
+ obj.method(:one_opt_named).send(@method).should.include?("(a: ...)")
+ obj.method(:zero_with_splat).send(@method).should.include?("(*a)")
+ obj.method(:zero_with_double_splat).send(@method).should.include?("(**a)")
+ obj.method(:one_req_one_opt_with_splat_and_block).send(@method).should.include?("(a, b=..., *c, &blk)")
end
it "returns a String containing the Module the method is defined in" do
@@ -79,11 +77,9 @@ describe :method_to_s, shared: true do
@string.should.start_with? "#<Method: #<MethodSpecs::MySub:0xXXXXXX>.bar"
end
- ruby_version_is '2.7' do
- ruby_bug '#17428', '2.7'...'3.0' do
- it "shows the metaclass and the owner for a Module instance method retrieved from a class" do
- String.method(:include).inspect.should.start_with?("#<Method: #<Class:String>(Module)#include")
- end
+ ruby_bug '#17428', ''...'3.0' do
+ it "shows the metaclass and the owner for a Module instance method retrieved from a class" do
+ String.method(:include).inspect.should.start_with?("#<Method: #<Class:String>(Module)#include")
end
end
end