summaryrefslogtreecommitdiff
path: root/spec/ruby/core/kernel/then_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/kernel/then_spec.rb')
-rw-r--r--spec/ruby/core/kernel/then_spec.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/ruby/core/kernel/then_spec.rb b/spec/ruby/core/kernel/then_spec.rb
index 8109a2960a..bda5a69662 100644
--- a/spec/ruby/core/kernel/then_spec.rb
+++ b/spec/ruby/core/kernel/then_spec.rb
@@ -2,5 +2,13 @@ require_relative '../../spec_helper'
require_relative 'shared/then'
describe "Kernel#then" do
- it_behaves_like :kernel_then, :then
+ ruby_version_is ""..."3.4" do
+ it_behaves_like :kernel_then, :then
+ end
+
+ ruby_version_is "3.4" do
+ it "is an alias of Kernel#yield_self" do
+ Kernel.instance_method(:then).should == Kernel.instance_method(:yield_self)
+ end
+ end
end