From a7fec4d6619384b0b0277e751a56f7b91e5d8d5b Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Tue, 30 Dec 2025 12:47:01 +0100 Subject: [PATCH] Update version guards in ruby/spec --- spec/ruby/core/method/source_location_spec.rb | 4 ++-- spec/ruby/core/proc/source_location_spec.rb | 8 ++++---- spec/ruby/core/unboundmethod/source_location_spec.rb | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/spec/ruby/core/method/source_location_spec.rb b/spec/ruby/core/method/source_location_spec.rb index 1b175ebaba..87413a2ab6 100644 --- a/spec/ruby/core/method/source_location_spec.rb +++ b/spec/ruby/core/method/source_location_spec.rb @@ -109,10 +109,10 @@ describe "Method#source_location" do eval('def self.m; end', nil, "foo", 100) end location = c.method(:m).source_location - ruby_version_is(""..."4.0") do + ruby_version_is(""..."4.1") do location.should == ["foo", 100] end - ruby_version_is("4.0") do + ruby_version_is("4.1") do location.should == ["foo", 100, 0, 100, 15] end end diff --git a/spec/ruby/core/proc/source_location_spec.rb b/spec/ruby/core/proc/source_location_spec.rb index 18f1ca274c..fd33f21a26 100644 --- a/spec/ruby/core/proc/source_location_spec.rb +++ b/spec/ruby/core/proc/source_location_spec.rb @@ -53,12 +53,12 @@ describe "Proc#source_location" do end it "works even if the proc was created on the same line" do - ruby_version_is(""..."4.0") do + ruby_version_is(""..."4.1") do proc { true }.source_location.should == [__FILE__, __LINE__] Proc.new { true }.source_location.should == [__FILE__, __LINE__] -> { true }.source_location.should == [__FILE__, __LINE__] end - ruby_version_is("4.0") do + ruby_version_is("4.1") do proc { true }.source_location.should == [__FILE__, __LINE__, 11, __LINE__, 19] Proc.new { true }.source_location.should == [__FILE__, __LINE__, 15, __LINE__, 23] -> { true }.source_location.should == [__FILE__, __LINE__, 6, __LINE__, 17] @@ -94,10 +94,10 @@ describe "Proc#source_location" do it "works for eval with a given line" do proc = eval('-> {}', nil, "foo", 100) location = proc.source_location - ruby_version_is(""..."4.0") do + ruby_version_is(""..."4.1") do location.should == ["foo", 100] end - ruby_version_is("4.0") do + ruby_version_is("4.1") do location.should == ["foo", 100, 0, 100, 5] end end diff --git a/spec/ruby/core/unboundmethod/source_location_spec.rb b/spec/ruby/core/unboundmethod/source_location_spec.rb index 85078ff34e..9cc2198017 100644 --- a/spec/ruby/core/unboundmethod/source_location_spec.rb +++ b/spec/ruby/core/unboundmethod/source_location_spec.rb @@ -55,10 +55,10 @@ describe "UnboundMethod#source_location" do eval('def m; end', nil, "foo", 100) end location = c.instance_method(:m).source_location - ruby_version_is(""..."4.0") do + ruby_version_is(""..."4.1") do location.should == ["foo", 100] end - ruby_version_is("4.0") do + ruby_version_is("4.1") do location.should == ["foo", 100, 0, 100, 10] end end